Reserving availability when making a booking. The steps to make a reservation are:
Check Availability: Check the availability on the /availability endpoint to retrieve an availabilityId
Booking Reservation (this step): Create a booking that reserves the availability while you collect payment and contact information from the customer. The booking will remain with status ON_HOLD until the booking is confirmed or the reservation hold expires.
The availability for the booking is held for the amount of time equal to theexpirationMinutes parameter (if provided), up to an internal limit set by either the supplier or the OCTo provider. The utc_expires_at parameter in the response object will indicate when a reservtion will expire. A reservation can be extended by calling the /bookings/{uuid}/extend endpoint.
A reserved booking can be confirmed after the customer finalizes their choice on the /bookings/{uuid}/confirm endpoint provided the reservation had not expired.
POSThttps://api.example.com/octo/bookings
Header parameters
Body
uuidstring (uuid)
A unique UUID to identify the booking. Setting this value acts like an idempotency key preventing you from double booking.
Example: "559aed3d-6d5b-4fe0-bfca-99f5e7218a56"
productId*string
The product ID for this booking.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
optionId*string
The option ID for this booking.
Example: "DEFAULT"
availabilityId*string
The availability ID for the selected timeslot.
Example: "2021-10-27T00:00:00-04:00"
expirationMinutesinteger
How many minutes to reserve the availability, otherwise defaults to the supplier default amount.
Example: 30
notesstring
Optional notes for the booking.
Example: "Optional notes"
unitItems*array of object
An list of unit items that will be included in the booking.
Response
OK
Body
id*string
A unique ID / UUID generated by the supplier system to identify the booking.
Example: "bbbb6227-54fc-4c32-9ed7-dc3eb99966ea"
uuid*string (uuid)
A UUID you can set when generating the booking to use as an idempotency key.
Example: "559aed3d-6d5b-4fe0-bfca-99f5e7218a56"
testMode*boolean
If TRUE, booking was created on test mode
resellerReference*stringnull
The reference set by the Reseller. A mandatory field for resellers to be set in the booking confirmation request.
supplierReference*stringnull
The Supplier's / booking platform reference.
status*BookingStatus
The status of the booking, possible values are:
ON_HOLD The booking is pending confirmation, this is the default value when you first create the booking.
EXPIRED If the booking is not confirmed before the expiration hold expires, it goes into an expired state.
CONFIRMED Once the confirmation call is made the booking is ready to be used.
CANCELLED If the booking is cancelled.
PENDING If the booking is pending outside availability confirmation.
REDEEMED If the booking is already redeemed.
An ISO8601 date time in UTC when the booking was created.
Example: "2021-10-27T23:28:43Z"
utcUpdatedAt*stringnull
An ISO8601 date time in UTC when the booking was updated.
Example: "2021-10-27T23:28:43Z"
utcExpiresAt*stringnull
An ISO8601 date times in UTC for when this booking is due to expire if the status is ON_HOLD.
Example: "2021-10-27T23:58:43Z"
utcRedeemedAt*stringnull
An ISO8601 date time in UTC at when the booking was redeemed.
utcConfirmedAt*stringnull
An ISO8601 date time in UTC when the booking was confirmed.
Example: "2021-10-27T23:28:43Z"
productId*string
The product ID that identifies the product in the booking system to make this reservation.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
product*object
A bookable product listed by a supplier.
optionId*string
The product ID that identifies the product option in the booking system to make this reservation.
Example: "DEFAULT"
option*object
Product options are subdivisions of the original product that will affect price and / or duration. Within the OCTo spec, every product must contain an option.
cancellable*boolean
A boolean field indicating whether this booking can be cancelled.
cancellation*nullobject
An object with information about why and when the booking was cancelled. This is NULL if the booking is not cancelled.
freesale*boolean
Whether the booking was made as freesale (without checking availability first).
availabilityId*string
The availability id that was used in the request.
availability*object
The availability object that was booked.
contact*object
Contact details for the guests that will attend the tour/attraction. Contact schema can be applied to both the booking object (the main reservation) or the unit object (individual ticket holders - if the supplier requires this information)
notes*stringnull
Example: "Optional notes for the booking"
deliveryMethods*array of DeliveryMethod
An array of delivery methods available for this booking.
voucherone of
unitItems*array of object
An array of unit items that will be included in the booking.
Request
constresponse=awaitfetch('https://api.example.com/octo/bookings', { method:'POST', headers: {"Content-Type":"application/json" }, body:JSON.stringify({"productId":"1a7213eb-3a33-4cbb-b114-64d771c201ac","optionId":"DEFAULT","availabilityId":"2020-07-01T14:30:00-05:00","notes":"Optional notes for the booking","unitItems": [ {"unitId":"adult" }, {"unitId":"adult" }, {"unitId":"child" } ] }),});constdata=awaitresponse.json();
A unique ID / UUID generated by the supplier system to identify the booking.
Example: "bbbb6227-54fc-4c32-9ed7-dc3eb99966ea"
uuid*string (uuid)
A UUID you can set when generating the booking to use as an idempotency key.
Example: "559aed3d-6d5b-4fe0-bfca-99f5e7218a56"
testMode*boolean
If TRUE, booking was created on test mode
resellerReference*stringnull
The reference set by the Reseller. A mandatory field for resellers to be set in the booking confirmation request.
supplierReference*stringnull
The Supplier's / booking platform reference.
status*BookingStatus
The status of the booking, possible values are:
ON_HOLD The booking is pending confirmation, this is the default value when you first create the booking.
EXPIRED If the booking is not confirmed before the expiration hold expires, it goes into an expired state.
CONFIRMED Once the confirmation call is made the booking is ready to be used.
CANCELLED If the booking is cancelled.
PENDING If the booking is pending outside availability confirmation.
REDEEMED If the booking is already redeemed.
An ISO8601 date time in UTC when the booking was created.
Example: "2021-10-27T23:28:43Z"
utcUpdatedAt*stringnull
An ISO8601 date time in UTC when the booking was updated.
Example: "2021-10-27T23:28:43Z"
utcExpiresAt*stringnull
An ISO8601 date times in UTC for when this booking is due to expire if the status is ON_HOLD.
Example: "2021-10-27T23:58:43Z"
utcRedeemedAt*stringnull
An ISO8601 date time in UTC at when the booking was redeemed.
utcConfirmedAt*stringnull
An ISO8601 date time in UTC when the booking was confirmed.
Example: "2021-10-27T23:28:43Z"
productId*string
The product ID that identifies the product in the booking system to make this reservation.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
product*object
A bookable product listed by a supplier.
optionId*string
The product ID that identifies the product option in the booking system to make this reservation.
Example: "DEFAULT"
option*object
Product options are subdivisions of the original product that will affect price and / or duration. Within the OCTo spec, every product must contain an option.
cancellable*boolean
A boolean field indicating whether this booking can be cancelled.
cancellation*nullobject
An object with information about why and when the booking was cancelled. This is NULL if the booking is not cancelled.
freesale*boolean
Whether the booking was made as freesale (without checking availability first).
availabilityId*string
The availability id that was used in the request.
availability*object
The availability object that was booked.
contact*object
Contact details for the guests that will attend the tour/attraction. Contact schema can be applied to both the booking object (the main reservation) or the unit object (individual ticket holders - if the supplier requires this information)
notes*stringnull
Example: "Optional notes for the booking"
deliveryMethods*array of DeliveryMethod
An array of delivery methods available for this booking.
voucherone of
unitItems*array of object
An array of unit items that will be included in the booking.
A text value describing why the cancellation happened.
Example: "Customer Requested"
forceboolean
Response
OK
Body
id*string
A unique ID / UUID generated by the supplier system to identify the booking.
Example: "bbbb6227-54fc-4c32-9ed7-dc3eb99966ea"
uuid*string (uuid)
A UUID you can set when generating the booking to use as an idempotency key.
Example: "559aed3d-6d5b-4fe0-bfca-99f5e7218a56"
testMode*boolean
If TRUE, booking was created on test mode
resellerReference*stringnull
The reference set by the Reseller. A mandatory field for resellers to be set in the booking confirmation request.
supplierReference*stringnull
The Supplier's / booking platform reference.
status*BookingStatus
The status of the booking, possible values are:
ON_HOLD The booking is pending confirmation, this is the default value when you first create the booking.
EXPIRED If the booking is not confirmed before the expiration hold expires, it goes into an expired state.
CONFIRMED Once the confirmation call is made the booking is ready to be used.
CANCELLED If the booking is cancelled.
PENDING If the booking is pending outside availability confirmation.
REDEEMED If the booking is already redeemed.
An ISO8601 date time in UTC when the booking was created.
Example: "2021-10-27T23:28:43Z"
utcUpdatedAt*stringnull
An ISO8601 date time in UTC when the booking was updated.
Example: "2021-10-27T23:28:43Z"
utcExpiresAt*stringnull
An ISO8601 date times in UTC for when this booking is due to expire if the status is ON_HOLD.
Example: "2021-10-27T23:58:43Z"
utcRedeemedAt*stringnull
An ISO8601 date time in UTC at when the booking was redeemed.
utcConfirmedAt*stringnull
An ISO8601 date time in UTC when the booking was confirmed.
Example: "2021-10-27T23:28:43Z"
productId*string
The product ID that identifies the product in the booking system to make this reservation.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
product*object
A bookable product listed by a supplier.
optionId*string
The product ID that identifies the product option in the booking system to make this reservation.
Example: "DEFAULT"
option*object
Product options are subdivisions of the original product that will affect price and / or duration. Within the OCTo spec, every product must contain an option.
cancellable*boolean
A boolean field indicating whether this booking can be cancelled.
cancellation*nullobject
An object with information about why and when the booking was cancelled. This is NULL if the booking is not cancelled.
freesale*boolean
Whether the booking was made as freesale (without checking availability first).
availabilityId*string
The availability id that was used in the request.
availability*object
The availability object that was booked.
contact*object
Contact details for the guests that will attend the tour/attraction. Contact schema can be applied to both the booking object (the main reservation) or the unit object (individual ticket holders - if the supplier requires this information)
notes*stringnull
Example: "Optional notes for the booking"
deliveryMethods*array of DeliveryMethod
An array of delivery methods available for this booking.
voucherone of
unitItems*array of object
An array of unit items that will be included in the booking.
This endpoint will fetch the bookings you have made for the given filters.
When using this endpoint you must include one of the following query parameters:
resellerReference
supplierReference
localDate
localDateStart and localDateEnd
GEThttps://api.example.com/octo/bookings
Authorization
Query parameters
Response
OK
Body
id*string
A unique ID / UUID generated by the supplier system to identify the booking.
Example: "bbbb6227-54fc-4c32-9ed7-dc3eb99966ea"
uuid*string (uuid)
A UUID you can set when generating the booking to use as an idempotency key.
Example: "559aed3d-6d5b-4fe0-bfca-99f5e7218a56"
testMode*boolean
If TRUE, booking was created on test mode
resellerReference*stringnull
The reference set by the Reseller. A mandatory field for resellers to be set in the booking confirmation request.
supplierReference*stringnull
The Supplier's / booking platform reference.
status*BookingStatus
The status of the booking, possible values are:
ON_HOLD The booking is pending confirmation, this is the default value when you first create the booking.
EXPIRED If the booking is not confirmed before the expiration hold expires, it goes into an expired state.
CONFIRMED Once the confirmation call is made the booking is ready to be used.
CANCELLED If the booking is cancelled.
PENDING If the booking is pending outside availability confirmation.
REDEEMED If the booking is already redeemed.
An ISO8601 date time in UTC when the booking was created.
Example: "2021-10-27T23:28:43Z"
utcUpdatedAt*stringnull
An ISO8601 date time in UTC when the booking was updated.
Example: "2021-10-27T23:28:43Z"
utcExpiresAt*stringnull
An ISO8601 date times in UTC for when this booking is due to expire if the status is ON_HOLD.
Example: "2021-10-27T23:58:43Z"
utcRedeemedAt*stringnull
An ISO8601 date time in UTC at when the booking was redeemed.
utcConfirmedAt*stringnull
An ISO8601 date time in UTC when the booking was confirmed.
Example: "2021-10-27T23:28:43Z"
productId*string
The product ID that identifies the product in the booking system to make this reservation.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
product*object
A bookable product listed by a supplier.
optionId*string
The product ID that identifies the product option in the booking system to make this reservation.
Example: "DEFAULT"
option*object
Product options are subdivisions of the original product that will affect price and / or duration. Within the OCTo spec, every product must contain an option.
cancellable*boolean
A boolean field indicating whether this booking can be cancelled.
cancellation*nullobject
An object with information about why and when the booking was cancelled. This is NULL if the booking is not cancelled.
freesale*boolean
Whether the booking was made as freesale (without checking availability first).
availabilityId*string
The availability id that was used in the request.
availability*object
The availability object that was booked.
contact*object
Contact details for the guests that will attend the tour/attraction. Contact schema can be applied to both the booking object (the main reservation) or the unit object (individual ticket holders - if the supplier requires this information)
notes*stringnull
Example: "Optional notes for the booking"
deliveryMethods*array of DeliveryMethod
An array of delivery methods available for this booking.
voucherone of
unitItems*array of object
An array of unit items that will be included in the booking.
A unique ID / UUID generated by the supplier system to identify the booking.
Example: "bbbb6227-54fc-4c32-9ed7-dc3eb99966ea"
uuid*string (uuid)
A UUID you can set when generating the booking to use as an idempotency key.
Example: "559aed3d-6d5b-4fe0-bfca-99f5e7218a56"
testMode*boolean
If TRUE, booking was created on test mode
resellerReference*stringnull
The reference set by the Reseller. A mandatory field for resellers to be set in the booking confirmation request.
supplierReference*stringnull
The Supplier's / booking platform reference.
status*BookingStatus
The status of the booking, possible values are:
ON_HOLD The booking is pending confirmation, this is the default value when you first create the booking.
EXPIRED If the booking is not confirmed before the expiration hold expires, it goes into an expired state.
CONFIRMED Once the confirmation call is made the booking is ready to be used.
CANCELLED If the booking is cancelled.
PENDING If the booking is pending outside availability confirmation.
REDEEMED If the booking is already redeemed.
An ISO8601 date time in UTC when the booking was created.
Example: "2021-10-27T23:28:43Z"
utcUpdatedAt*stringnull
An ISO8601 date time in UTC when the booking was updated.
Example: "2021-10-27T23:28:43Z"
utcExpiresAt*stringnull
An ISO8601 date times in UTC for when this booking is due to expire if the status is ON_HOLD.
Example: "2021-10-27T23:58:43Z"
utcRedeemedAt*stringnull
An ISO8601 date time in UTC at when the booking was redeemed.
utcConfirmedAt*stringnull
An ISO8601 date time in UTC when the booking was confirmed.
Example: "2021-10-27T23:28:43Z"
productId*string
The product ID that identifies the product in the booking system to make this reservation.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
product*object
A bookable product listed by a supplier.
optionId*string
The product ID that identifies the product option in the booking system to make this reservation.
Example: "DEFAULT"
option*object
Product options are subdivisions of the original product that will affect price and / or duration. Within the OCTo spec, every product must contain an option.
cancellable*boolean
A boolean field indicating whether this booking can be cancelled.
cancellation*nullobject
An object with information about why and when the booking was cancelled. This is NULL if the booking is not cancelled.
freesale*boolean
Whether the booking was made as freesale (without checking availability first).
availabilityId*string
The availability id that was used in the request.
availability*object
The availability object that was booked.
contact*object
Contact details for the guests that will attend the tour/attraction. Contact schema can be applied to both the booking object (the main reservation) or the unit object (individual ticket holders - if the supplier requires this information)
notes*stringnull
Example: "Optional notes for the booking"
deliveryMethods*array of DeliveryMethod
An array of delivery methods available for this booking.
voucherone of
unitItems*array of object
An array of unit items that will be included in the booking.
Updates a booking before and after it has been confirmed as long as it hasn''t been redeemed or within the cancellation cutoff window. To know if the booking can be updated check the booking''s cancellable field. If the booking can be cancelled, it can also be updated. It''s generally preferred to update a booking rather than cancelling it and rebooking.
PATCHhttps://api.example.com/octo/bookings/{uuid}
Path parameters
uuid*string
The UUID of the booking
Header parameters
Body
resellerReferencestring
Your reference for this booking. Also known as a Voucher Number.
Example: "ec08a62-892c-48c1-a608-dc946531a33b"
productIdstring
The product ID.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
optionIdstring
The option id.
Example: "DEFAULT"
availabilityIdstring
The availability ID for the selected timeslot.
expirationMinutesstring
How many minutes to reserve the availability, otherwise defaults to the supplier default amount.
notesstring
Optional notes for the booking.
emailReceiptboolean
Whether you want OCTO Cloud to email the guest a copy of their receipt and tickets. (defaults to false).
unitItemsarray of object
An array of unit items in the booking. To retain or modify existing unit items, you must include the unit item with the associated uuid, otherwise that unit item will be removed.
contactobject
Response
OK
Body
id*string
A unique ID / UUID generated by the supplier system to identify the booking.
Example: "bbbb6227-54fc-4c32-9ed7-dc3eb99966ea"
uuid*string (uuid)
A UUID you can set when generating the booking to use as an idempotency key.
Example: "559aed3d-6d5b-4fe0-bfca-99f5e7218a56"
testMode*boolean
If TRUE, booking was created on test mode
resellerReference*stringnull
The reference set by the Reseller. A mandatory field for resellers to be set in the booking confirmation request.
supplierReference*stringnull
The Supplier's / booking platform reference.
status*BookingStatus
The status of the booking, possible values are:
ON_HOLD The booking is pending confirmation, this is the default value when you first create the booking.
EXPIRED If the booking is not confirmed before the expiration hold expires, it goes into an expired state.
CONFIRMED Once the confirmation call is made the booking is ready to be used.
CANCELLED If the booking is cancelled.
PENDING If the booking is pending outside availability confirmation.
REDEEMED If the booking is already redeemed.
An ISO8601 date time in UTC when the booking was created.
Example: "2021-10-27T23:28:43Z"
utcUpdatedAt*stringnull
An ISO8601 date time in UTC when the booking was updated.
Example: "2021-10-27T23:28:43Z"
utcExpiresAt*stringnull
An ISO8601 date times in UTC for when this booking is due to expire if the status is ON_HOLD.
Example: "2021-10-27T23:58:43Z"
utcRedeemedAt*stringnull
An ISO8601 date time in UTC at when the booking was redeemed.
utcConfirmedAt*stringnull
An ISO8601 date time in UTC when the booking was confirmed.
Example: "2021-10-27T23:28:43Z"
productId*string
The product ID that identifies the product in the booking system to make this reservation.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
product*object
A bookable product listed by a supplier.
optionId*string
The product ID that identifies the product option in the booking system to make this reservation.
Example: "DEFAULT"
option*object
Product options are subdivisions of the original product that will affect price and / or duration. Within the OCTo spec, every product must contain an option.
cancellable*boolean
A boolean field indicating whether this booking can be cancelled.
cancellation*nullobject
An object with information about why and when the booking was cancelled. This is NULL if the booking is not cancelled.
freesale*boolean
Whether the booking was made as freesale (without checking availability first).
availabilityId*string
The availability id that was used in the request.
availability*object
The availability object that was booked.
contact*object
Contact details for the guests that will attend the tour/attraction. Contact schema can be applied to both the booking object (the main reservation) or the unit object (individual ticket holders - if the supplier requires this information)
notes*stringnull
Example: "Optional notes for the booking"
deliveryMethods*array of DeliveryMethod
An array of delivery methods available for this booking.
voucherone of
unitItems*array of object
An array of unit items that will be included in the booking.
Whether you want OCTO Cloud to email the guest a copy of their receipt and tickets. (defaults to false)
resellerReferencestring
Your reference for this booking. Also known as a Voucher Number.
Example: "4ec08a62-892c-48c1-a608-dc946531a33b"
contact*object
Contact details for the main guest who will attend the tour/attraction. Contact schema can be applied to both the booking object (the main reservation) or the unit object (individual ticket holders - if the supplier requires this information).
unitItemsarray of object
An array of unit items that will be included in the booking. This allows you to provide contact details or a reseller reference for each unit item. Be careful to make sure you include ALL unit items that you also had in the original booking reservation request, if you provide more or less than in the booking reservation call this will change the number of unit items being purchased also.
Response
OK
Body
id*string
A unique ID / UUID generated by the supplier system to identify the booking.
Example: "bbbb6227-54fc-4c32-9ed7-dc3eb99966ea"
uuid*string (uuid)
A UUID you can set when generating the booking to use as an idempotency key.
Example: "559aed3d-6d5b-4fe0-bfca-99f5e7218a56"
testMode*boolean
If TRUE, booking was created on test mode
resellerReference*stringnull
The reference set by the Reseller. A mandatory field for resellers to be set in the booking confirmation request.
supplierReference*stringnull
The Supplier's / booking platform reference.
status*BookingStatus
The status of the booking, possible values are:
ON_HOLD The booking is pending confirmation, this is the default value when you first create the booking.
EXPIRED If the booking is not confirmed before the expiration hold expires, it goes into an expired state.
CONFIRMED Once the confirmation call is made the booking is ready to be used.
CANCELLED If the booking is cancelled.
PENDING If the booking is pending outside availability confirmation.
REDEEMED If the booking is already redeemed.
An ISO8601 date time in UTC when the booking was created.
Example: "2021-10-27T23:28:43Z"
utcUpdatedAt*stringnull
An ISO8601 date time in UTC when the booking was updated.
Example: "2021-10-27T23:28:43Z"
utcExpiresAt*stringnull
An ISO8601 date times in UTC for when this booking is due to expire if the status is ON_HOLD.
Example: "2021-10-27T23:58:43Z"
utcRedeemedAt*stringnull
An ISO8601 date time in UTC at when the booking was redeemed.
utcConfirmedAt*stringnull
An ISO8601 date time in UTC when the booking was confirmed.
Example: "2021-10-27T23:28:43Z"
productId*string
The product ID that identifies the product in the booking system to make this reservation.
Example: "6b903d44-dc24-4ca4-ae71-6bde6c4f4854"
product*object
A bookable product listed by a supplier.
optionId*string
The product ID that identifies the product option in the booking system to make this reservation.
Example: "DEFAULT"
option*object
Product options are subdivisions of the original product that will affect price and / or duration. Within the OCTo spec, every product must contain an option.
cancellable*boolean
A boolean field indicating whether this booking can be cancelled.
cancellation*nullobject
An object with information about why and when the booking was cancelled. This is NULL if the booking is not cancelled.
freesale*boolean
Whether the booking was made as freesale (without checking availability first).
availabilityId*string
The availability id that was used in the request.
availability*object
The availability object that was booked.
contact*object
Contact details for the guests that will attend the tour/attraction. Contact schema can be applied to both the booking object (the main reservation) or the unit object (individual ticket holders - if the supplier requires this information)
notes*stringnull
Example: "Optional notes for the booking"
deliveryMethods*array of DeliveryMethod
An array of delivery methods available for this booking.
voucherone of
unitItems*array of object
An array of unit items that will be included in the booking.