Skip to content

Create Booking
Alpha

Request

Create a new booking for an event.

Security
OAuth2(Required scopes: booking.write)
Bodyapplication/jsonrequired
event_idstringrequired

The unique identifier of the event.

customerCompanyCustomer (object) or PrivateCustomer (object)required
One of:

The customer making the booking.

localestringrequired

A lowercase ISO 639-1 language code (e.g. "da"), optionally followed by a hyphen and an uppercase ISO 3166-1 country code (e.g. "en-US").

itemsArray of objects, non-empty(Item)required
metadataobject

Additional metadata for the booking.

This property lets you add custom data to the booking, e.g. your own booking reference. The key has a limit of 40 characters and the value has a limit of 500 characters.

POST
/v1/bookings
curl -i -X POST \
  https://api.understory.io/v1/bookings \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "event_id": "string",
    "customer": {
      "customer_type": "PRIVATE",
      "company_name": "string",
      "vat_number": "string",
      "email": "user@example.com",
      "name": "string",
      "phone": "string",
      "address": {
        "address_lines": [
          "string"
        ],
        "city": "string",
        "zip_code": "string",
        "region": "string",
        "country": "string"
      }
    },
    "locale": "string",
    "items": [
      {
        "type_id": "string",
        "item_type": "VARIANT",
        "quantity": 1
      }
    ],
    "metadata": {
      "property1": "string",
      "property2": "string"
    }
  }'

Responses

Booking successfully created.

Bodyapplication/json
idstringrequired

The unique identifier of the booking.

statusstring(BookingStatus)required

The status of the booking.

This will always be "ACTIVE" when the booking is created.

Enum:"ACTIVE""CANCELLED""MOVED""PROCESSING""CHECKED_IN""UNKNOWN"
Response
{ "id": "string", "status": "ACTIVE" }