⇣ POST /booking_confirmation

A booking request is sent when the customer has completed the payment and the reservation needs to be booked in. You should respond to this callback with live barcodes which are redeemable at your venue.

The /booking_confirmation request will be made as a POST request to your callback_url for example: POST https://api.example.com/cc/callbacks/booking_confirmation.

{
  "reservation": "RESERVATION00004214",
  "reference": "VIATOR0000424123",
  "agent": "viator.com",
  "product": "WINETOUR",
  "option": "WITHLUNCH",
  "pickup": "Tour Office & Travel Depot",
  "time": "10:30",
  "date": "2017-10-07",
  "adult": 2,
  "child": 1,
  "customer": {
    "first_name": "John",
    "last_name": "Smith",
    "email": "[email protected]",
    "mobile": "+17345551212",
    "language": "en",
    "country": "GB"
  },
  "notes": "Allergic to nuts"
}

📘

Note that the reservation field will be null for freesale products as we do not check availability or make a reservation beforehand.

Below is a list of parameters and descriptions of what they mean:

ParamDescription
reservationThe reservation code that you originally returned in the reservation request. This will be null if the product is freesale.
agentThe email of the account that initiated this reservation request. (The booking agent)
referenceThe agent's reference for this booking that you should use if you need to contact them in relation to this booking.
productYour product code for this booking.
optionYour option code for this booking. (if applicable)
pickupThe name of the pickup the customer chose (if applicable)
timeYour time slot for this booking. (if applicable)
dateThe travel date of this booking.
adultThe number of adult tickets in the booking
childThe number of child tickets in the booking
youthThe number of youth tickets in the booking
infantThe number of infant tickets in the booking
seniorThe number of senior tickets in the booking
studentThe number of student tickets in the 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
notesAny notes the customer specified for this booking.

Note none of the customer fields are required to be set, and no guarantee is given as to the format of the values. They are just what the agent sent City Connect.

You must respond to this request with a HTTP 200 status code, and a JSON body which includes a barcode for each of the tickets requested. For example:

{
  "mobile": true,
  "reference": "BOOKING00004232",
  "barcode": "128465552",
  "tickets": [
    { "type": "adult", "barcode": "7485936482" },
    { "type": "adult", "barcode": "2512356846" },
    { "type": "child", "barcode": "9257377533" }
  ]
}

Below is a description of each of the fields:

ParamDescription
mobileWether the tickets will be accepted on a mobile phone or must be printed before arrival.
referenceA unique reference that you will use to reference this booking from now on.
barcodeAn 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.

The minimum requirements imposed on all venues is that you support the following 1D barcode formats:

  • Code128 (default)
  • Code39

If mobile is set to true, then you also permit mobile vouchers, and are required to additionally support the following 2D barcodes:

  • QR Code (default)
  • Data Matrix
  • Aztec

If you return mobile set to false, then a 1D barcode will be used, otherwise a 2D barcode will be used on the mobile phone.


A booking request should never fail. City Connect will ensure that if it is made within the expiry date set on the reservation request, no other conditions should cause you to respond to this request with an error.