Instance
Billable Item
Booking
Calendar Subscription
Invoice
Quote
Invoice Template
Project
Time Activity
Get Bookings
Bookings can be understood as time-based events (with start and end dates / times), which are typically represented on a calendar.
Bookings include details about the event’s timing, the resources being used, and additional information such as the client, associated project, rate details, and any custom attributes defined through custom fields.
READ
access to the SCHEDULE
module is required to access this endpointcurl --request GET \
--url https://api.sonderplan.com/v2/booking \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": 1,
"name": "Test Booking",
"start": 1547501100,
"end": 1547538900,
"start_date_time_iso": "2022-02-22T09:00:00+11:00",
"end_date_time_iso": "2022-02-22T17:00:00+11:00",
"duration_min": "480",
"all_day": "false",
"notes": "Additional note",
"repeat_master": "true",
"repeat_master_id": "0",
"repeat_rule": "FREQ=daily;INTERVAL=2;REPENDTYPE=date;UNTIL=20220228T130000;",
"resources": [
{
"id": 9458,
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"updated": 1388552400,
"parent_id": 99472,
"parent_name": "Edit Suites",
"icon": [
{
"id": 2342354,
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
],
"rates": [
{
"rate_scheme_id": 984312,
"rate_scheme_name": "Resource Rate",
"currency": "AUD",
"buy": {
"unit": "hourly",
"unit_amount": "20.65",
"quantity": "2.4",
"discount": "20.00%"
},
"sell": {
"unit": "hourly",
"unit_amount": "20.65",
"quantity": "2.4",
"discount": "20.00%"
}
}
],
"time_entries": [
{
"id": 9879871,
"name": "Colour Grading",
"description": "Opening scenes completed",
"start": 1547501100,
"end": 1547538900
}
]
}
],
"project": [
{
"id": 2342354,
"name": "Andor S1 EP7 Annoucement",
"code": "AND-S1-EP7",
"description": "Colonel Yularen announces that the ISB has gained more surveillance and punitive authority, while Meero is challenged by Blevin for breaking protocol by accessing Imperial data without authorization.",
"status_id": 1
}
],
"client": [
{
"id": 4,
"uuid": "p4",
"name": "Jane Someone",
"type": "person",
"email": "[email protected]",
"contact_person": {
"id": 2837,
"name": "Fred Flintstone"
}
}
],
"status": [
{
"id": 2,
"name": "Second Hold",
"description": "Has second priority if the first hold cancels",
"notification": true
}
],
"billable_items": [
{
"id": 2342354,
"name": "NAS Storage",
"description": "Rented per TB, per month",
"cost": "25.23",
"buy_cost": "20",
"currency": "AUD",
"quantity": "4",
"total": "100.92",
"buy_total": "80",
"billable_item_id": 897832,
"taxes": [
{
"id": 3247,
"name": "GST",
"rate": "10.00",
"total": "151.00"
}
],
"create_new": true
}
],
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
],
"created_id": 3,
"created": 1388552400,
"created_name": "John Smith",
"updated_id": 3,
"updated": 1388552400,
"updated_name": "John Smith"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
One or more (comma seperated) IDs of booking's to retrieve
Perform a full text search for the booking name
Specify one or more resource ids and return only the bookings that have these as resources
Specify one or more resource ids and return only the bookings that have these as resources
Specify one or more project ids and return only the bookings are booked to thes projects
Return any bookings starting after the given UNIX timestamp
Return any bookings starting before the given UNIX timestamp
The resources object will contain icon information for each resource
The resources object will contain rates data for each resource relatd to the current booking
The resources object will contain the name of the parent of the resource
When set to true
, only return bookings that include all the specified resource_ids
. If false
(default), bookings will be returned if they include any of the specified resource_ids
.
When set to true
, time entries will be output within each of the the relevant booking resource objects
Return results that were added, edited or deleted since this UNIX timestamp
Comma seperated list of fields you wish to return
Specify the page of results you wish to return
The number of results returned per page. Default if not specified is 10
Specify the field (with type of string or integer) you wish to order (ascending) the response with
Specify the field (with type of string or integer) you wish to order (descending) the response with
Specify if multiple filters should be combined with OR or AND logic
OR
, AND
Response
Standard booking model that returns most properties by default
Booking ID
1
Booking Name
"Test Booking"
Unix Timestamp of the booking start. Alternatively use start_date_time_iso
which automatically calculates the unix timestamp.
1547501100
Unix timestamp of the booking end. Alternatively use end_date_time_iso
which automatically calculates the unix timestamp.
1547538900
ISO-8601 formatted result of the booking start
"2022-02-22T09:00:00+11:00"
ISO-8601 formatted result of the booking end
"2022-02-22T17:00:00+11:00"
Duration of booking in minutes
"480"
Is the booking all day
"false"
Additional booking information
"Additional note"
Is this booking designated as the master booking linked to repeats
"true"
If this booking is a repeat, this is the id of the master booking
"0"
Specifically formatted rule for the repeat logic
"FREQ=daily;INTERVAL=2;REPENDTYPE=date;UNTIL=20220228T130000;"
Resources added to a booking
Automatically generated unique resource id
9458
Name of the resource
"Edit Suite 1"
Additional info about the resource
"Sydney Office, Level 2"
1 = Room, 2 = Person, 3 = Equipment, 4 = Resource Group, 5 = Action
1
, 2
, 3
, 4
, 5
1
Unique id of the person (only applies if this resource is a person)
0
The UNIX time value of the last update
1388552400
The id of the resource group that is the parent of this resource
99472
The name of the resource group that is the parent of this resource. Only appears when resource_parent
is supplied as true
as a query parameter
"Edit Suites"
Only appears when resource_icon
is supplied as true
as a query parameter
Simplified file model containing only a subset of fields
Automatically generated File ID
2342354
Original file name
"Avid_Icon"
File size (in bytes)
174285
Automatically generated file alias
"7e73ab25155974c230d09494548201b9f5056ef"
File extension
"png"
File mime type
"image/png"
Only appears when resource_rates
is supplied as true
as a query parameter
The rates associated with a resource for a booking
The ID (if applicable) of the rate scheme used to populate this rate
984312
The name of the rate scheme used to populate this rate
"Resource Rate"
Currency code (three character format)
"AUD"
Contains the properties related to buy expenses
Unit of the buy outgoing
hourly
, daily
, fixed
, auto
"hourly"
Unit cost of the buy outgoing
"20.65"
The quantity of the unit
"2.4"
Discount amount that applies to this item. Suffix with a % symbol to make this a percentage discount
"20.00%"
Contains the properties related to sell expenses
Unit of the sell incoming
hourly
, daily
, fixed
, auto
"hourly"
Unit cost of the sell incoming
"20.65"
The quantity of the unit
"2.4"
Discount amount that applies to this item. Suffix with a % symbol to make this a percentage discount
"20.00%"
Only appears when resource_time_entries
is supplied as true
as a query parameter
Time entries recorded by the owner against this booking resource
Automatically generated, unique time entry id
9879871
Name of the activity that is being worked on
"Colour Grading"
Short description or notes about what was worked on
"Opening scenes completed"
Unix Time Entry Start
1547501100
Unix Time Entry End
1547538900
Simplified project model containing only a subset of fields
Automatically generated Project ID
2342354
Title of the project
"Andor S1 EP7 Annoucement"
Short code used to identify the project
"AND-S1-EP7"
A short description or synopsis of the project
"Colonel Yularen announces that the ISB has gained more surveillance and punitive authority, while Meero is challenged by Blevin for breaking protocol by accessing Imperial data without authorization."
Project Status ID
1
The client (either person or organization) attached to this booking
Client model with some fields
4
"p4"
"Jane Someone"
person
, organization
"person"
The primary email for this contact
A simplified version of the complete Status Model
Automatically generated unique identifier of the status
2
The name of the status
"Second Hold"
Description of the status
"Has second priority if the first hold cancels"
Determines if notifications are sent if this status is selected
true
Name of the billable item
"NAS Storage"
Automatically generated id
2342354
Brief description of the item
"Rented per TB, per month"
Individual unit cost charged to the client
"25.23"
Individual unit cost payed by this business
"20"
Currency code (three character format)
"AUD"
Quantity of the item
"4"
Total, excluding taxes
"100.92"
Buy Total, excluding taxes
"80"
ID of the billable item (null if created adhoc)
897832
Standard invoice item taxes model that returns tax information
Set to true to create a global billable item
true
Used to show the values of custom fields on linked modules
The ID of the custom field
7823
The name of the custom field
"Type"
The text value of the custom field, null if not defined
"Video Editing"
The ID of the selected option, (applied only if the custom field is of type select
)
8973
The update key to pass back when updating this field
"2_1_7823"
The unique ID of the person (user) who created this record
3
The UNIX time value of the creation time
1388552400
The full name of the person (user) who created this record
"John Smith"
The unique ID of the person (user) who last updated this record
3
The UNIX time value of the last update
1388552400
The full name of the person (user) who last updated this record
"John Smith"
curl --request GET \
--url https://api.sonderplan.com/v2/booking \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": 1,
"name": "Test Booking",
"start": 1547501100,
"end": 1547538900,
"start_date_time_iso": "2022-02-22T09:00:00+11:00",
"end_date_time_iso": "2022-02-22T17:00:00+11:00",
"duration_min": "480",
"all_day": "false",
"notes": "Additional note",
"repeat_master": "true",
"repeat_master_id": "0",
"repeat_rule": "FREQ=daily;INTERVAL=2;REPENDTYPE=date;UNTIL=20220228T130000;",
"resources": [
{
"id": 9458,
"name": "Edit Suite 1",
"description": "Sydney Office, Level 2",
"type_id": 1,
"type_person_id": 0,
"updated": 1388552400,
"parent_id": 99472,
"parent_name": "Edit Suites",
"icon": [
{
"id": 2342354,
"name": "Avid_Icon",
"size": 174285,
"alias": "7e73ab25155974c230d09494548201b9f5056ef",
"extension": "png",
"mime_type": "image/png"
}
],
"rates": [
{
"rate_scheme_id": 984312,
"rate_scheme_name": "Resource Rate",
"currency": "AUD",
"buy": {
"unit": "hourly",
"unit_amount": "20.65",
"quantity": "2.4",
"discount": "20.00%"
},
"sell": {
"unit": "hourly",
"unit_amount": "20.65",
"quantity": "2.4",
"discount": "20.00%"
}
}
],
"time_entries": [
{
"id": 9879871,
"name": "Colour Grading",
"description": "Opening scenes completed",
"start": 1547501100,
"end": 1547538900
}
]
}
],
"project": [
{
"id": 2342354,
"name": "Andor S1 EP7 Annoucement",
"code": "AND-S1-EP7",
"description": "Colonel Yularen announces that the ISB has gained more surveillance and punitive authority, while Meero is challenged by Blevin for breaking protocol by accessing Imperial data without authorization.",
"status_id": 1
}
],
"client": [
{
"id": 4,
"uuid": "p4",
"name": "Jane Someone",
"type": "person",
"email": "[email protected]",
"contact_person": {
"id": 2837,
"name": "Fred Flintstone"
}
}
],
"status": [
{
"id": 2,
"name": "Second Hold",
"description": "Has second priority if the first hold cancels",
"notification": true
}
],
"billable_items": [
{
"id": 2342354,
"name": "NAS Storage",
"description": "Rented per TB, per month",
"cost": "25.23",
"buy_cost": "20",
"currency": "AUD",
"quantity": "4",
"total": "100.92",
"buy_total": "80",
"billable_item_id": 897832,
"taxes": [
{
"id": 3247,
"name": "GST",
"rate": "10.00",
"total": "151.00"
}
],
"create_new": true
}
],
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
],
"created_id": 3,
"created": 1388552400,
"created_name": "John Smith",
"updated_id": 3,
"updated": 1388552400,
"updated_name": "John Smith"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}