⇣ POST /booking_notification

Whenever a booking is created, updated or cancelled, you'll receive a booking notification.

The request will be made as a POST request to the url provided in the notification_url field of your account.

The following notifications can be sent:

Notification PathDescription
/booking_confirmationA new booking was confirmed
/booking_updateA booking was updated
/booking_cancellationA booking was cancelled

The request will be made by City Connect as a POST to the notification_url you setup in your account, and the path will be appended to it.

For example: POST https://api.example.com/cc/notifications/booking_confirmation

The request body given will always be the full booking object (after any updates have taken place), an example is shown below:

{
  "supplier": "[email protected]",
  "supplier_reference": "BOOKING00004232",
  "agent": "viator.com",
  "agent_reference": "VIATOR0000424123",
  "cancelled": false,
  "product": "WINETOUR",
  "option": "WITHLUNCH",
  "pickup": "Tour Office & Travel Depot",
  "date": "2017-10-07",
  "time": "10:30",
  "adult": 2,
  "child": 1,
  "customer": {
    "first_name": "John",
    "last_name": "Smith",
    "email": "[email protected]",
    "mobile": "+17345551212",
    "language": "en",
    "country": "GB"
  },
  "mobile": true,
  "barcode": "128465552",
  "tickets": [
    { "type": "adult", "barcode": "7485936482", "redeemed": false },
    { "type": "adult", "barcode": "2512356846", "redeemed": false },
    { "type": "child", "barcode": "9257377533", "redeemed": false }
  ],
  "notes": "Allergic to nuts"
}

The fields mean the following:

ParameterDescription
supplier[reference]The reference you gave to this booking in the Booking Request section.
supplier[account]The email or domain of the account that supplied the product. If you have an alternative supplier for your product, this will be there, otherwise it will be you.
agent[reference]This is the reference given by the agent for the booking.
agent[account]This is the account email or domain that identifies the agent that initiated the booking.
cancelledIf this booking is cancelled or not.
productThis is your product code.
optionThis is your option code. (if applicable)
timeThis is your time. (if applicable)
pickupThe name of the pickup the customer chose. (if applicable)
dateThe travel date of this booking.
adultThe number of adult tickets in this booking
childThe number of child tickets in this booking
youthThe number of youth tickets in this booking
infantThe number of infant tickets in this booking
seniorThe number of senior tickets in this booking
studentThe number of student tickets in this booking
customer[first_name]The customer's first name
customer[last_name]The customer's last name
customer[email]The customer's email
customer[mobile]The customer's mobile
customer[language]The customer's spoken language
customer[country]The customer's country of origin
mobileWhether the booking codes can be represented as 2D barcodes on a mobile screen.
barcodeAn individual barcode that can be used for all the tickets in the booking.
tickets[][type]The type of the ticket, as requested in the request body.
tickets[][barcode]The ticket's barcode data as a string. This will be encoded within the barcode itself.
notesAny notes the customer specified for this booking.