⇣ 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 Path | Description |
|---|---|
| /booking_confirmation | A new booking was confirmed |
| /booking_update | A booking was updated |
| /booking_cancellation | A 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:
| Parameter | Description |
|---|---|
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. |
cancelled | If this booking is cancelled or not. |
product | This is your product code. |
option | This is your option code. (if applicable) |
time | This is your time. (if applicable) |
pickup | The name of the pickup the customer chose. (if applicable) |
date | The travel date of this booking. |
adult | The number of adult tickets in this booking |
child | The number of child tickets in this booking |
youth | The number of youth tickets in this booking |
infant | The number of infant tickets in this booking |
senior | The number of senior tickets in this booking |
student | The 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 |
mobile | Whether the booking codes can be represented as 2D barcodes on a mobile screen. |
barcode | An 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. |
notes | Any notes the customer specified for this booking. |
Updated over 8 years ago
