⇡ 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:
| Param | Description |
|---|---|
supplier | The email of the supplier you are querying the availability from. |
product | The product code for this booking. |
option | The option code for this booking. (if applicable) |
promotion | The promotion code (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. |
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:
| Parameter | Description |
|---|---|
rrp | The recommended retail price for the whole booking. |
net | The total net rate for the booking. |
discount | The 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 Code | Description |
|---|---|
| SOLD_OUT | The requested product/option/time on the chosen date has since sold out having made the request. |
| NOT_AVAILABLE | The product/option/time 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 about 8 years ago
