Instance
Billable Item
Booking
Calendar Subscription
Invoice
Quote
Invoice Template
Project
Time Activity
Bulk Bookings
This endpoint implements Create, Update and Delete of bulk bookings. It is intended for one time import operations, or other use cases that require higher performance at the expense of notification and realtime update features.
WRITE
access to the SCHEDULE
module is required to access this endpointcurl --request POST \
--url https://api.sonderplan.com/v2/booking/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"save": {
"common_properties": [
{
"calendar_subscription_id": 234982,
"resources": [
{
"id": 34982
}
],
"project": [
{
"id": 239909
}
],
"status": [
{
"id": 40123
}
],
"client": [
{
"uuid": "p209809"
}
]
}
],
"columns": [
"external_id",
"start",
"end",
"name",
"notes"
],
"values": [
"<any>"
]
},
"delete": {
"id": [
98923,
19812,
23838
],
"external_id": [
"1234j@kf9i094-090-9435aasdas"
],
"calendar_subscription_id": [
989232349
]
}
}'
{
"save": {
"success": [
{
"id": 2340,
"external_id": "1234j@kf9i094-090-9435aasdas"
}
]
},
"delete": {
"id": {
"success": true
},
"external_id": {
"success": true
},
"calendar_subscription_id": {
"success": true
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Allows bulk creation, modification and deletion of bookings
Create new or update existing bookings (be sure to include an external_id
column so we know which bookings to update
Define the parameters common across all bookings being saved
ID of calendar subscription to attach to each booking
234982
ID of the resource to attach to each booking
34982
ID of the project to attach to each booking
239909
ID of the status to attach to each booking
40123
Define the columns that we are inserting. The order of these must be the order must match the values
array.
external_id
, start
, end
, name
, notes
[
"external_id",
"start",
"end",
"name",
"notes"
]
An array of values in the order defined in columns
array.
Response
curl --request POST \
--url https://api.sonderplan.com/v2/booking/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"save": {
"common_properties": [
{
"calendar_subscription_id": 234982,
"resources": [
{
"id": 34982
}
],
"project": [
{
"id": 239909
}
],
"status": [
{
"id": 40123
}
],
"client": [
{
"uuid": "p209809"
}
]
}
],
"columns": [
"external_id",
"start",
"end",
"name",
"notes"
],
"values": [
"<any>"
]
},
"delete": {
"id": [
98923,
19812,
23838
],
"external_id": [
"1234j@kf9i094-090-9435aasdas"
],
"calendar_subscription_id": [
989232349
]
}
}'
{
"save": {
"success": [
{
"id": 2340,
"external_id": "1234j@kf9i094-090-9435aasdas"
}
]
},
"delete": {
"id": {
"success": true
},
"external_id": {
"success": true
},
"calendar_subscription_id": {
"success": true
}
}
}