Editing… Click any heading, paragraph, or table cell to edit it.
Answer from the documentation
Read before upgrading

Breaking Change Notice

Version 3.5 introduces one breaking change that requires action by all API integration partners before upgrading.

Version 3.5 introduces one breaking change that requires action by all API integration partners before upgrading.
FieldPrevious BehaviourNew Behaviour (v3.5)Impact
agent_reference Optional — could be omitted or sent as null MANDATORY — must be present and unique on every /book request Requests without a valid agent_reference will be rejected with HTTP 400 Bad Request

What You Need To Do

Update your /book request to always include a non-null, unique agent_reference. Use your internal booking or order ID. The recommended format is:

"agent_reference": "AGT-20261015-00142" // prefix-date-sequence

The value must be unique per booking (do not reuse references). Max 50 characters. This field is also accepted by /retrieveBooking so you can look up any booking using your own reference.

Note All other changes in v3.5 are corrections to existing documentation and do not require any changes to your integration. Contact support@tripstick.com with any questions.

1. Introduction

TripstickConnect API provides programmatic access to hotel content, real-time availability, and full booking lifecycle management. Designed for B2B API clients — tour operators, OTAs, and travel tech platforms — the API aggregates inventory from multiple global suppliers behind a single, normalised interface. All hotel identifiers are Vervotech-mapped universal codes, ensuring consistency across suppliers.

This documentation covers all endpoints, request/response schemas, authentication, error handling, and best practices. Read the Quick Start section (Section 4) before integrating — it describes the correct API call sequence to avoid common errors.

2. Base URLs

APIBase URLPurpose
Content APIhttp://content-apiout.tripstickconnect.comCountries, destinations, hotel listings
Shopping APIhttp://shopping-apiout.tripstickconnect.comReal-time hotel availability and rates
Booking APIhttp://booking-apiout.tripstickconnect.comRate check, confirm, retrieve, and cancel bookings

3. Authorization

All TripstickConnect API requests require HTTP Basic Authentication. Encode your credentials as a Base64 string and include them in the Authorization header on every request. Authentication failures return HTTP 401 Unauthorized.

Header format
Authorization: Basic <base64(username:password)>
Example request (curl)
curl -X POST http://shopping-apiout.tripstickconnect.com/availability \ --header "Content-Type: application/json" \ --header "Authorization: Basic <base64-encoded-username:password>" \ --data '{ "hotel_codes": [39619181], "preferences": { "nationality": "AE", "checkin": "2026-10-15", "currency": "AED", "nights": 1 }, "rooms": [{"adults": 2, "children": []}] }'
Note To generate your Base64 string on Linux/macOS: echo -n 'username:password' | base64. To request API credentials, contact support@tripstick.com.

4. Quick Start — Recommended API Flow

Follow this sequence for a complete hotel booking. Skipping steps — especially the Rate Check — can result in price mismatches or booking errors.

StepActionEndpointKey Output
1Get hotel codes (one-time setup)POST /hotels (Content API)hotel.code values
2Search availabilityPOST /availability (Shopping API)group_id per room option
3Validate the rate (before every booking)POST /checkHotelRate (Booking API)OK / RATE_CHANGED / EXPIRED
4Confirm bookingPOST /book (Booking API)booking_reference
5Retrieve bookingPOST /retrieveBooking (Booking API)Full booking details + status
6Cancel if neededPOST /cancelBooking (Booking API)Confirmation + updated status
Note Always call /checkHotelRate immediately before /book. Availability rates can change or expire between search and booking. Booking directly from an old group_id risks price errors or failures.

5. Content API

The Content API provides static reference data: countries, destinations, and hotel listings. Use these endpoints during initial setup and periodic content refreshes — they are not called per booking transaction.

5.1 Countries

Returns all countries supported by the TripstickConnect platform. Country codes follow the ISO 3166-1 alpha-2 standard and are used across other endpoints to specify guest nationality.

GEThttp://content-apiout.tripstickconnect.com/countries
Response Schema
FieldTypeDescription
countriesarrayArray of country objects
codestringISO 3166-1 alpha-2 country code (e.g. AE, GB)
namestringFull English name of the country
Response Example
{ "countries": [ { "code": "AE", "name": "United Arab Emirates" }, { "code": "AF", "name": "Afghanistan" } ] }

5.2 Destinations

Returns all available destinations. Use the optional limit query parameter to paginate large result sets. The code returned here is the destination value required by the /hotels endpoint.

GEThttp://content-apiout.tripstickconnect.com/destinations?limit=
Query Parameters
FieldTypeRequiredDescription
limitintegerOptionalMaximum number of destinations to return. Omit to return all.
Response Schema
FieldTypeDescription
destinationsarrayArray of destination objects
city_namestringName of the city
codestringUnique destination identifier — use as destination in the /hotels request
country_codestringISO 3166-1 alpha-2 country code
locale_namestringName of the country or region
state_codestringState code if applicable; may be empty
typestringDestination type: city, region, etc.
languagestringLanguage of the response (default: en)
Response Example
{ "destinations": [ { "city_name": "Dubai", "code": "678516887551164416", "country_code": "AE", "locale_name": "United Arab Emirates", "state_code": "", "type": "city" } ], "language": "en" }

5.3 Hotels in Destination

Returns all hotels available in a given destination. You must provide a valid destination code obtained from the /destinations endpoint. The code in each hotel response is the value used as hotel_codes[] in availability searches.

POSThttp://content-apiout.tripstickconnect.com/hotels
Request Schema
FieldTypeRequiredDescription
destinationintegerOptionalDestination code from /destinations
limitintegerOptionalMaximum number of hotels to return
Request Example
{ "destination": 678516887551164416, "limit": 10 }
Response Schema
FieldTypeDescription
hotelsarrayArray of hotel objects
codeintegerUnique hotel identifier — use in hotel_codes[]
hotel_namestringName of the property
addressstringStreet address
city_namestringCity name
locale_namestringRegion or locale name
country_codestringISO 3166-1 country code
postal_codestringPostal / ZIP code
star_ratingstringStar rating (1–5)
chain_namestringHotel chain name if applicable; may be empty
latitudestringLatitude coordinate
longitudestringLongitude coordinate
imagestringURL of the primary property image
state_codestringState code if applicable
Response Example
{ "hotels": [ { "code": 15066967, "hotel_name": "Apartments Ljubic", "address": "A.Senoe 44", "city_name": "Pag", "locale_name": "Zadar", "country_code": "HR", "postal_code": "23250", "star_rating": "3", "chain_name": "", "latitude": "44.45439", "longitude": "15.02813", "image": "http://i.travelapi.com/lodging/.../3aadbf91_z.jpg", "state_code": "HR" } ] }

6. Shopping API

The Shopping API returns real-time hotel availability — room options, rates, board types, and cancellation policies — aggregated from all active suppliers assigned to your account. All responses are in English.

6.1 Availability

Returns available rooms and rates for one or more hotels for a given stay period and room configuration. For single-property searches, the response includes a group_id — pass this to /checkHotelRate before booking.

POSThttp://shopping-apiout.tripstickconnect.com/availability
Request Schema
FieldTypeRequiredDescription
hotel_codesarrayOptionalList of hotel codes (integers) from the Content API
preferencesobjectOptionalSearch preferences
nationalitystringOptionalISO 3166-1 alpha-2 guest nationality code (e.g. AE, GB)
checkinstringOptionalCheck-in date — format YYYY-MM-DD
currencystringOptionalISO 4217 currency code for pricing (e.g. AED, USD)
nightsintegerOptionalNumber of nights for the stay (minimum 1)
timeoutintegerOptionalSearch timeout in seconds. Defaults to your account's configured value (e.g. 15)
roomsarrayOptionalArray of room configurations — one object per room required
adultsintegerOptionalNumber of adults in the room (minimum 1)
childrenarrayOptionalAges of children (integers, 0–12). Send an empty array [] if no children. Ages outside 0–12 return HTTP 400
Note Children ages must be exact integers between 0 and 12 inclusive. An age of 0 represents an infant. Ages outside this range will return HTTP 400 Bad Request.
Request Example
{ "hotel_codes": [38772617], "preferences": { "nationality": "AE", "checkin": "2026-10-15", "currency": "AED", "nights": 1, "timeout": 7 }, "rooms": [ { "adults": 2, "children": [] } ] }
Response Schema
FieldTypeDescription
datetimestringResponse timestamp — format YYYY-MM-DDTHH:MM:SS+0000
response_referencestringUnique reference ID for this response
responseobjectAvailability response object
currencystringRequested currency code
hotelCountintegerNumber of hotels with available options
hotelListarrayArray of hotel availability objects
hotel_codeintegerHotel code
checkinstringCheck-in date — YYYY-MM-DD
checkoutstringCheck-out date — YYYY-MM-DD
nightsintegerNumber of nights
groupRoomsarrayArray of available room group options
group_idstringUnique room option identifier — use in /checkHotelRate and /book
namestringRoom type and category name
boardCodestringBoard type code (e.g. RO, BB, HB)
boardNamestringBoard type name (e.g. Room Only)
adultsintegerAdults this option accommodates
childrenintegerChildren this option accommodates
groupPriceobjectTotal price for the room group (amount, currency)
refundablebooleanTrue if the booking can be cancelled without penalty
refundableUntilstringFree-cancellation deadline — YYYY-MM-DD HH:MM:SS (GMT)
cancellationPolicyBreakdownarrayTiered cancellation penalty schedule (amount, currency, hoursbefore, datebefore)
roomsarrayIndividual room objects within this group option (id, name, boardCode, boardName, adults, children, ages)
languagestringResponse language
Response Example
{ "datetime": "2026-01-10T08:17:28+0000", "response_reference": "11268692434", "response": { "currency": "AED", "hotelCount": 1, "hotelList": [ { "hotel_code": 38772617, "checkin": "2026-10-15", "checkout": "2026-10-16", "nights": 1, "groupRooms": [ { "group_id": "Z0FBQUFBQm5WX2tYaXg3S2FFcFpkTk==", "name": "Deluxe Room - Double", "boardCode": "RO", "boardName": "ROOM ONLY", "adults": 2, "children": 0, "groupPrice": { "amount": 203.92, "currency": "AED" }, "refundable": true, "refundableUntil": "2026-10-12 23:59:00", "cancellationPolicyBreakdown": [ { "amount": 0, "currency": "AED", "hoursbefore": 6615, "datebefore": "2026-10-12 23:59:00" }, { "amount": 203.92, "currency": "AED", "hoursbefore": 6663, "datebefore": "2026-10-15 00:00:00" } ], "rooms": [ { "id": "Z0FBQUFBQm5WX2lYaWg3UkdZWnJsam10==", "name": "Deluxe Room - Double", "boardCode": "RO", "boardName": "Room Only", "adults": 2, "children": 0, "ages": [] } ] } ] } ], "language": "en" } }

7. Check Hotel Rate

Validates whether a rate is still available and at the correct price before booking. Always call this endpoint immediately before /book — rates can change or expire between availability search and booking confirmation.

POSThttp://booking-apiout.tripstickconnect.com/checkHotelRate
Request Schema
FieldTypeRequiredDescription
group_idstringOptionalRoom group identifier from /availability or a previous /checkHotelRate response
Request Example
{ "group_id": "Z0FBQUFBQm5WX2tYaXg3S2FFcFpkTk==" }

Response Scenarios

Scenario 1 — Rate available and unchanged. Proceed to /book using the same group_id.

{ "datetime": "2026-01-10 08:19:25", "response_reference": "123456789", "response": "OK" }

Scenario 2 — Rate expired or group_id invalid. Run a new availability search to get a fresh group_id.

{ "datetime": "2026-01-10 08:19:25", "response_reference": "123456789", "response": "EXPIRED_OR_INVALID_GROUP_ID" }

Scenario 3 — Rate changed. A new group_id and updated pricing are returned in group_rooms. Present the new price to the customer before booking. Use the new group_id for the booking request.

{ "datetime": "2026-01-10 08:19:25", "response_reference": "123456789", "response": "RATE_CHANGED", "group_rooms": [ { "group_id": "Z0FBQUFBQm5WX2NEWID==", "name": "Deluxe Room - Double", "boardCode": "RO", "boardName": "ROOM ONLY", "adults": 2, "children": 0, "groupPrice": { "amount": 253.00, "currency": "AED" }, "refundable": true, "refundableUntil": "2026-10-12 23:59:00", "cancellationPolicyBreakdown": [ ... ], "rooms": [ ... ] } ] }
Response Schema
FieldTypeDescription
datetimestringResponse timestamp — format YYYY-MM-DDTHH:MM:SS+0000
response_referencestringUnique reference ID for this response
responsestringOK | EXPIRED_OR_INVALID_GROUP_ID | RATE_CHANGED
group_roomsobjectPresent only when response is RATE_CHANGED. Contains updated room options with new group_id and pricing. Follows /availability groupRooms schema.

8. Booking API

The Booking API manages the full reservation lifecycle: confirm, retrieve, list, and cancel bookings. All endpoints use HTTP Basic Authentication.

8.1 Confirm Booking

Confirms a hotel reservation using the group_id from /availability or /checkHotelRate.

POSThttp://booking-apiout.tripstickconnect.com/book
Important: agent_reference is MANDATORY. Every booking request must include a non-null, unique agent_reference. Use your internal booking or order ID. Requests without a valid agent_reference will return HTTP 400. This field enables end-to-end traceability and is essential for reconciliation and support.
Request Schema
FieldTypeRequiredDescription
holderobjectRequiredLead guest details
titlestringRequiredTitle: "Mr.", "Mrs.", or "Ms."
firstnamestringRequiredFirst name of the booking holder
lastnamestringRequiredLast name of the booking holder
emailstringRequiredEmail address of the booking holder or agent
nationalitystringRequiredISO 3166-1 alpha-2 nationality code
phonestringRequiredPhone number of the booking holder
agent_referencestringRequiredYour unique booking reference. Must be unique per booking. Recommended format: AGENCY-YYYYMMDD-NNNNN. Max 50 characters. Requests without this field will be rejected with HTTP 400.
hotelarrayRequiredList of hotel booking objects
group_idstringRequiredRoom group ID from /availability or /checkHotelRate
roomsarrayRequiredList of room objects within the group
process_keystringRequiredIndividual room ID (id field) from /availability rooms array
passengersarrayRequiredList of guests for this room
typestringRequired"AD" for adult, "CH" for child
titlestringRequiredTitle: "Mr.", "Mrs.", or "Ms."
first_namestringRequiredFirst name of the guest
last_namestringRequiredLast name of the guest
ageintegerRequiredAge of the guest as integer (e.g. 35 for adult, 8 for child)
Request Example
{ "holder": { "title": "Mr.", "firstname": "John", "lastname": "Smith", "email": "jsmith@agency.com", "nationality": "AE", "phone": "971501234567" }, "agent_reference": "AGT-20261015-00142", "hotel": [ { "group_id": "Z0FBQUFBQm5WX2tYaXg3S2FFcFpkTk==", "rooms": [ { "process_key": "Z0FBQUFBQm5WX2lYaWg3UkdZWnJsam10==", "passengers": [ { "type": "AD", "title": "Mr.", "first_name": "John", "last_name": "Smith", "age": 35 } ] } ] } ] }
Response Schema
FieldTypeDescription
datetimestringResponse timestamp — format YYYY-MM-DDTHH:MM:SS+0000
response_referencestringUnique reference ID for this API response
agent_referencestringYour agent_reference echoed back for confirmation
responseobjectBooking confirmation details
booking_referencestringTripstickConnect unique booking reference — store this for retrieval and cancellation
holderobjectLead guest details (mirrors request)
hotelarrayBooked property details (hotel_code, checkin, checkout, address, latitude, longitude, country, city, hotel, amount, rooms)
currencystringISO 4217 currency code
booking_statusintegerStatus code — see Booking Status Codes table below
booking_status_labelstringStatus label — VOUCHERED | CONFIRMED | FAILED | CANCELLED
amountfloatTotal booking amount
Booking Status Codes
CodeLabelDescription
1VOUCHEREDBooking confirmed and voucher issued. No further action required.
2CONFIRMEDBooking confirmed by supplier; voucher processing in progress.
3FAILEDBooking failed at the supplier level. Contact support with the response_reference if this occurs unexpectedly.
9CANCELLEDBooking has been successfully cancelled.
Response Example
{ "datetime": "2026-01-10T16:07:22+0000", "response_reference": "1662739642841619905", "agent_reference": "AGT-20261015-00142", "response": { "booking_reference": "356614330513", "holder": { "title": "Mr.", "first_name": "John", "last_name": "Smith", "email": "jsmith@agency.com", "phone": "971501234567", "nationality": "AE" }, "hotel": [ { "hotel_code": 38772617, "checkin": "2026-10-15", "checkout": "2026-10-16", "address": "Al Barsha 1; Behind Mall of Emirates; Dubai", "country": "United Arab Emirates", "city": "Dubai", "hotel": "Citymax Hotel Al Barsha At The Mall", "amount": 203.92, "rooms": [ { "board_code": "RO", "board_name": "Room Only", "room_name": "Deluxe Room - Double", "adults": 2, "children": 0, "passengers": [{ "first_name": "John", "last_name": "Smith" }] } ] } ], "currency": "AED", "booking_status": 1, "booking_status_label": "VOUCHERED", "amount": 203.92 } }

8.2 Retrieve Booking

Returns full details of a specific booking. Provide either booking_reference (TripstickConnect reference) or agent_reference (your reference) — at least one is required.

POSThttp://booking-apiout.tripstickconnect.com/retrieveBooking
FieldTypeRequiredDescription
booking_referencestringOptionalTripstickConnect booking reference (from /book response)
agent_referencestringOptionalYour agent reference (from /book request). Can be used instead of booking_reference
Note At least one of booking_reference or agent_reference must be provided.
Request Example
{ "booking_reference": "356614330513" }

Response follows the same schema as the /book response, including booking status, guest details, room information, pricing, and cancellation policy.

8.3 Retrieve All Bookings

Returns a paginated list of bookings. Filter by status code and control page size using the optional parameters below.

POSThttp://booking-apiout.tripstickconnect.com/retrieveBookingList
FieldTypeRequiredDescription
statusstringOptionalFilter bookings by status code (see Booking Status Codes in 8.1)
pageintegerOptionalPage number for pagination. Defaults to 1.
per_pageintegerOptionalNumber of bookings per page. Defaults to 10.
Request Example
{ "status": "", "page": 1, "per_page": 10 }

Returns a list of booking objects. Each object follows the same schema as the /book response.

8.4 Cancel Booking

Cancels a confirmed booking. If no cancellation fee applies per the booking's cancellation policy, the booking amount is set to 0. Always check refundableUntil from the availability response before cancelling to avoid unexpected charges.

POSThttp://booking-apiout.tripstickconnect.com/cancelBooking
FieldTypeRequiredDescription
booking_referencestringOptionalTripstickConnect booking reference to cancel
Request Example
{ "booking_reference": "356614330513" }
Response Schema
FieldTypeDescription
datetimestringResponse timestamp — format YYYY-MM-DDTHH:MM:SS+0000
response_referencestringUnique reference ID for this response
responsestring"OK" on successful cancellation
Response Example
{ "datetime": "2026-01-10T11:50:52+0000", "response": "OK", "response_reference": "123456789" }
Note After successful cancellation, the booking status updates to 9 (CANCELLED). Confirm by calling /retrieveBooking.

9. Error Reference

All APIs use standard HTTP status codes. When an error occurs, the response body will contain a message or error field with a human-readable description.

HTTP Status Codes
CodeLabelDescription
200OKRequest successful.
400Bad RequestInvalid JSON, missing required fields (including agent_reference), invalid dates, or child age outside 0–12.
401UnauthorizedAuthorization header missing or credentials invalid. Check your Base64-encoded username:password.
403ForbiddenAccount suspended or IP not whitelisted for the requested supplier.
404Not Foundbooking_reference or agent_reference not found.
422Unprocessable EntityRequest structure is valid but contains semantic errors — e.g. check-in date in the past, invalid nationality code, or checkout before checkin.
429Too Many RequestsRate limit exceeded. Back off and retry after the period indicated in the Retry-After header.
500Internal Server ErrorUnexpected server error. Retry after a short delay; if persistent, contact support with the response_reference.
503Service UnavailableAPI temporarily unavailable. Retry with exponential backoff.
Common API-Level Error Responses

Beyond HTTP codes, the Shopping and Booking APIs may return application-level error responses in the response body:

response / error fieldMeaningAction
EXPIRED_OR_INVALID_GROUP_IDThe group_id has expired or is invalidRun a new /availability search
RATE_CHANGEDRate has changed since the availability searchReview new pricing in group_rooms and confirm with customer
IP_NOT_REGISTEREDYour outbound IP is not whitelisted on a supplier's firewallContact TripstickConnect support to whitelist the IP
FAILED (booking_status 3)Supplier rejected the bookingRetry with a fresh availability search; contact support if persistent

10. Best Practices

agent_reference Strategy

Always generate a unique agent_reference per booking using your internal booking ID. A good format combines your agency prefix, date, and sequence number:

AGT-20261015-00142 (prefix-date-sequence)

This field enables you to retrieve bookings by your own reference (/retrieveBooking accepts agent_reference as well as booking_reference), and is essential for TripstickConnect support to trace any booking issue rapidly.

Always Validate Before Booking

Call /checkHotelRate immediately before /book — even if only seconds have passed since the availability search. Supplier rates can change in real time. If the response is RATE_CHANGED, present the new price to the customer before proceeding.

Cancellation Policy Handling

Always read and display cancellationPolicyBreakdown from the availability response to your end customer before booking. Key fields:

FieldMeaning
refundabletrue = booking can be cancelled without penalty before refundableUntil
refundableUntilFree-cancellation deadline (GMT). Cancel before this time to avoid charges.
amount in breakdownPenalty charged if cancelled after datebefore
hoursbeforeHours before check-in when the penalty tier activates

Children Age Rules

Supply the exact age (integer, 0–12) for each child in the children array. An infant is age 0. Ages 13 and above should be booked as adults (adults count). Sending an age outside 0–12 will return HTTP 400.

Content API Refresh Schedule

The Content API (countries, destinations, hotels) is updated periodically but not in real time. We recommend refreshing your local copy weekly at minimum to catch new properties and deprecated codes. Do not call content endpoints on every booking transaction.

Rate Limiting

If you receive HTTP 429, back off using exponential retry — wait 1 second, then 2, then 4, up to a maximum of 60 seconds. Implement request queuing in your integration layer rather than retrying immediately. Contact support@tripstick.com to discuss rate limit increases if your volume requires it.

Error Logging

Always log the response_reference returned by every API response alongside your agent_reference. When contacting TripstickConnect support, providing both references allows the team to trace the exact supplier transaction and resolve issues significantly faster.

TripstickConnect Hotel API v3.5 · June 2026 · Confidential — For Authorized API Partners Only · Technical Support: support@tripstick.com