home > support > API > webhooks > Check tour availability
Called when a request is made to the Check Tour Availability API. TourCMS will expect a response indicating which dates provided in the payload are available and optionally the total price to charge the client.
Can can be used alongside the various Managing dates and prices outside of TourCMS APIs and the post-booking webhook to keep TourCMS in sync with a third party reservation system. Alternatively TourCMS can carry out the integration work for you by adding your reservation system to our Sync tool - contact us for more information.
When filtering departures in TourCMS API request, avail webhook will include a new field "filtered" with true value.
A call is made to the Check Tour Availability API that would return dates TourCMS thinks are available.
Currently only fired for "Departures", not "Freesale Seasons" or "Hotel" type dates - those currently continue to be booked without calling the webhook).
Configure your URL in Configuration & Setup > Webhooks and TourCMS will immediately begin checking it for availability data, to remove the check just remove the URL.
TourCMS sends a JSON payload containing basic tour information plus an array of the departures it believes are available.
The payload may be extended in the future with additional data fields without warning.
{
"account_id": 4069,
"account_name": "Testoperator",
"channel_id": 3930,
"tour_id": 1,
"tour_code": "",
"supplier_tour_code": "",
"supplier_id": "0",
"agent_id": "0",
"agent_credentials": "",
"sale_currency": "EUR",
"filtered": "true",
"dates": [
{
"date_id": "1234",
"date_type": "departure",
"start_date": "2025-06-01",
"end_date": "2025-06-01",
"code": "",
"guide_language": ["en", "fr"],
"note": "",
"start_time": "",
"end_time": "",
"spaces_remaining": "20",
"supplier_note": "abc",
"rates": [
{
"rate_id": "r1",
"name": "",
"agecat": "a",
"quantity": 3,
"rate_code": ""
}
]
}
]
}
Key | Notes | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
account_id | TourCMS Account ID | ||||||||||||||||||||||||||||||||||||||
channel_id | TourCMS Channel ID | ||||||||||||||||||||||||||||||||||||||
tour_id | TourCMS ID for the Tour to be checked, this is the unique identifier for this particular tour on this account | ||||||||||||||||||||||||||||||||||||||
tour_code | TourCMS tour code, freetext entered by tour operator staff and may not be unique | ||||||||||||||||||||||||||||||||||||||
supplier_tour_code | Freetext entered by tour operator staff within TourCMS, designed to store an identifier for the tour in a third party system. E.g. if you are using this webhook to integrate with a third party reservation system, this would be a good place to store the third party reservation system ID for this tour. | ||||||||||||||||||||||||||||||||||||||
supplier_id | ID for the internal supplier record if one is configured within TourCMS, otherwise "0". | ||||||||||||||||||||||||||||||||||||||
agent_id | TourCMS internal ID for agent (if an agent is set on the booking), otherwise 0. This is the unique ID for this agent in this account. | ||||||||||||||||||||||||||||||||||||||
marketplace_agent_id | TourCMS global ID for this agent (if an agent is set on the booking AND if that agent has a TourCMS Marketplace profile), otherwise 0. This is the unique ID for this agent across the TourCMS system, but if the agent does not have a TourCMS Marketplace Account this will be 0. i.e. agent_id will always be set if an agent is making the request, marketplace_agent_id might be. | ||||||||||||||||||||||||||||||||||||||
agent_credentials | Further information | ||||||||||||||||||||||||||||||||||||||
sale_currency | The currency TourCMS is selling in. If you are responding with prices they must be expressed in this currency otherwise your response will be considered invalid. | ||||||||||||||||||||||||||||||||||||||
filtered | Boolean. True if API request has been filtered by start time, supplier note or departure code, otherwise false. | ||||||||||||||||||||||||||||||||||||||
dates[ ] |
An array of objects, one for each date TourCMS thinks are available, containing:
|
TourCMS will include an X-Request-Id header in the request when sending you the webhook. The value of this header will be a random semi-unique value (currently a UUID4). If you are able to log this header it may help debugging or tracing specific requests.
TourCMS will wait 20 seconds for a response in the format detailed below, if the correct response is not returned within that time TourCMS will return a no availability message.
However, you should aim to reply within 2 seconds (as the customer will not wait much longer than that, on a website), or 250 milliseconds if you are selling via TourCMS to Expedia (To comply with TourCMS/Expedia SLA)
Return a JSON array containing the date ID(s) that are available.
[2109, 111]
Return an array of JSON objects, one for each of the date ID(s) that are available.
The currency in the response must match the sale_currency from the payload.
Requires a single "total price" for the date, per rate_id (i.e. total for Adults, total for Children)
{
"2169":{
"r1":{
"price":10,
"currency":"GBP"
},
"r2":{
"price":20,
"currency":"GBP"
}
},
"2170":{
"r1":{
"price":30,
"currency":"GBP"
},
"r2":{
"price":40,
"currency":"GBP"
}
}
}