POST
/
v2
/
booking
curl --request POST \
  --url https://api.sonderplan.com/v2/booking \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --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",
  "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,
      "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": [
        {
          "name": "Colour Grading",
          "description": "Opening scenes completed",
          "start": 1547501100,
          "end": 1547538900
        }
      ]
    }
  ],
  "project": [
    {
      "id": 2342354
    }
  ],
  "client": [
    {
      "uuid": "p4",
      "contact_person": {
        "id": 2837
      }
    }
  ],
  "status": [
    {
      "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",
      "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"
    }
  ]
}'
{
  "success": {
    "id": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

check_clashes
boolean
default:true

Report any clashes with new resources supplied, or existing resources on the booking

notify_user_resources
boolean
default:true

Specifies if user resources (resources with a contact attached) should be sent an email notification about the created booking

Body

application/json
Booking object that needs to be added

Standard booking model that returns most properties by default

name
string
required

Booking Name

Example:

"Test Booking"

start
integer
required

Unix Timestamp of the booking start. Alternatively use start_date_time_iso which automatically calculates the unix timestamp.

Example:

1547501100

end
integer
required

Unix timestamp of the booking end. Alternatively use end_date_time_iso which automatically calculates the unix timestamp.

Example:

1547538900

id
integer

Booking ID

Example:

1

start_date_time_iso
string

ISO-8601 formatted result of the booking start

Example:

"2022-02-22T09:00:00+11:00"

end_date_time_iso
string

ISO-8601 formatted result of the booking end

Example:

"2022-02-22T17:00:00+11:00"

all_day
boolean

Is the booking all day

Example:

"false"

notes
string

Additional booking information

Example:

"Additional note"

repeat_master
boolean

Is this booking designated as the master booking linked to repeats

Example:

"true"

repeat_master_id
integer

If this booking is a repeat, this is the id of the master booking

Example:

"0"

repeat_rule
string

Specifically formatted rule for the repeat logic

Example:

"FREQ=daily;INTERVAL=2;REPENDTYPE=date;UNTIL=20220228T130000;"

resources
object[]

Resources added to a booking

project
object[]

Simplified project model containing only a subset of fields

client
object[]

The client (either person or organization) attached to this booking

Client model with some fields

status
object[]

A simplified version of the complete Status Model

billable_items
object[]
custom_fields
object[]

Used to show the values of custom fields on linked modules

Response

200
application/json
Successful Operation
success
object