⇣ POST /reservation
The reservation request callback allows us to reserve seats on your system whilst the customer completes the payment.
City Connect will not make a reservation request before making a booking if you have freesale set to true on your product.
The /reservation request will be made as a POST request to your callback_url for example: POST https://api.example.com/cc/callbacks/reservation.
If you have the
supplierset on your product, the reservation request will be deferred to that supplier account instead of your own.
{
"agent": "viator.com",
"product": "WINETOUR",
"option": "WITHLUNCH",
"date": "2017-10-07",
"time": "10:30",
"adult": 2,
"child": 1,
"expires": "2017-03-18T21:24:50Z"
}
Below is a list of parameters and descriptions of what they mean:
| Param | Description |
|---|---|
agent | The email of the agent account that initiated this reservation request. (The booking agent) |
product | The product code for this booking. |
option | The option code for this booking. (if applicable) |
time | The chosen time for this booking. (if applicable) |
date | The travel date of this booking. |
pickup | The pickup chosen by the customer. (if applicable) |
adult | How many adult tickets to reserve |
child | How many child tickets to reserve |
youth | How many youth tickets to reserve |
infant | How many infant tickets to reserve |
senior | How many senior tickets to reserve |
student | How many student tickets to reserve |
expires | An ISO8601 date-time value for when this reservation should expire. You are required to keep the seats vacant until the expiry time elapses. |
You must respond with a 200 OK status code with the following response body:
{ "reservation": "RESERVATION00004214" }
The code value is the reservation ID that will be re-used in the booking request once the customer has completed the payment with the agent.
In the case when a reservation has failed, possibly due to a race condition between when the availability was first queried, and when the reservation request was made, you should instead return a HTTP 400 Bad Request response. For example:
{ "error": "SOLD_OUT" }
Possible error messages are:
| Error Code | Description |
|---|---|
| SOLD_OUT | The requested product/option/time_slot on the chosen date has since sold out having made the request. |
| NOT_AVAILABLE | The product/option/time_slot combination on the chosen date is not available. |
| PAST_CUTOFF_DATE | The chosen date is past the cut off date for this product, the customer should call up the venue directly to book. |
Updated over 8 years ago
