⇣ 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 supplier set 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:

ParamDescription
agentThe email of the agent account that initiated this reservation request. (The booking agent)
productThe product code for this booking.
optionThe option code for this booking. (if applicable)
timeThe chosen time for this booking. (if applicable)
dateThe travel date of this booking.
pickupThe pickup chosen by the customer. (if applicable)
adultHow many adult tickets to reserve
childHow many child tickets to reserve
youthHow many youth tickets to reserve
infantHow many infant tickets to reserve
seniorHow many senior tickets to reserve
studentHow many student tickets to reserve
expiresAn 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 CodeDescription
SOLD_OUTThe requested product/option/time_slot on the chosen date has since sold out having made the request.
NOT_AVAILABLEThe product/option/time_slot combination on the chosen date is not available.
PAST_CUTOFF_DATEThe chosen date is past the cut off date for this product, the customer should call up the venue directly to book.