⇡ POST /reservation

The reservation request allows you to reserve seats from the supplier whilst the customer completes the payment on your end.

If the product is freesale, there is no need to make a reservation or query availability. Instead you should just go straight to making a booking_confirmation, and assume all dates are available.

The /reservation request must be made as a POST request to https://api.cityconnect.net/v1/reservation. You must use your email and token created in your account as HTTP Basic Authentication header to authenticate the request.

{
  "supplier": "[email protected]",
  "product": "WINETOUR",
  "option": "WITHLUNCH",
  "promotion": null,
  "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
supplierThe email of the supplier you are querying the availability from.
productThe product code for this booking.
optionThe option code for this booking. (if applicable)
promotionThe promotion code (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.

We will respond with a 200 OK status code with the following response body:

{
  "reservation": "RESERVATION00004214",
  "rrp": 52.30,
  "net": 45.00,
  "discount": 10.00
}

The reservation value is the reservation ID that will be re-used in the booking request once the customer has completed the payment. Other fields are as follows:

ParameterDescription
rrpThe recommended retail price for the whole booking.
netThe total net rate for the booking.
discountThe discount given

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 might receive a HTTP 400 Bad Request response. For example:

{ "error": "SOLD_OUT" }

Possible error messages are:

Error CodeDescription
SOLD_OUTThe requested product/option/time on the chosen date has since sold out having made the request.
NOT_AVAILABLEThe product/option/time 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.