Ask the documentation
Type a plain-English question about the API and get the relevant section, pulled straight from this documentation — no digging through pages required.
Breaking Change Notice
Version 3.5 introduces one breaking change that requires action by all API integration partners before upgrading.
| Field | Previous Behaviour | New 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:
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.
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
| API | Base URL | Purpose |
|---|---|---|
| Content API | http://content-apiout.tripstickconnect.com | Countries, destinations, hotel listings |
| Shopping API | http://shopping-apiout.tripstickconnect.com | Real-time hotel availability and rates |
| Booking API | http://booking-apiout.tripstickconnect.com | Rate 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.
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.
| Step | Action | Endpoint | Key Output |
|---|---|---|---|
| 1 | Get hotel codes (one-time setup) | POST /hotels (Content API) | hotel.code values |
| 2 | Search availability | POST /availability (Shopping API) | group_id per room option |
| 3 | Validate the rate (before every booking) | POST /checkHotelRate (Booking API) | OK / RATE_CHANGED / EXPIRED |
| 4 | Confirm booking | POST /book (Booking API) | booking_reference |
| 5 | Retrieve booking | POST /retrieveBooking (Booking API) | Full booking details + status |
| 6 | Cancel if needed | POST /cancelBooking (Booking API) | Confirmation + updated status |
/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.
| Field | Type | Description |
|---|---|---|
| countries | array | Array of country objects |
| code | string | ISO 3166-1 alpha-2 country code (e.g. AE, GB) |
| name | string | Full English name of the country |
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.
| Field | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | Maximum number of destinations to return. Omit to return all. |
| Field | Type | Description |
|---|---|---|
| destinations | array | Array of destination objects |
| city_name | string | Name of the city |
| code | string | Unique destination identifier — use as destination in the /hotels request |
| country_code | string | ISO 3166-1 alpha-2 country code |
| locale_name | string | Name of the country or region |
| state_code | string | State code if applicable; may be empty |
| type | string | Destination type: city, region, etc. |
| language | string | Language of the response (default: 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.
| Field | Type | Required | Description |
|---|---|---|---|
| destination | integer | Optional | Destination code from /destinations |
| limit | integer | Optional | Maximum number of hotels to return |
| Field | Type | Description |
|---|---|---|
| hotels | array | Array of hotel objects |
| code | integer | Unique hotel identifier — use in hotel_codes[] |
| hotel_name | string | Name of the property |
| address | string | Street address |
| city_name | string | City name |
| locale_name | string | Region or locale name |
| country_code | string | ISO 3166-1 country code |
| postal_code | string | Postal / ZIP code |
| star_rating | string | Star rating (1–5) |
| chain_name | string | Hotel chain name if applicable; may be empty |
| latitude | string | Latitude coordinate |
| longitude | string | Longitude coordinate |
| image | string | URL of the primary property image |
| state_code | string | State code if applicable |
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.
| Field | Type | Required | Description |
|---|---|---|---|
| hotel_codes | array | Optional | List of hotel codes (integers) from the Content API |
| preferences | object | Optional | Search preferences |
| nationality | string | Optional | ISO 3166-1 alpha-2 guest nationality code (e.g. AE, GB) |
| checkin | string | Optional | Check-in date — format YYYY-MM-DD |
| currency | string | Optional | ISO 4217 currency code for pricing (e.g. AED, USD) |
| nights | integer | Optional | Number of nights for the stay (minimum 1) |
| timeout | integer | Optional | Search timeout in seconds. Defaults to your account's configured value (e.g. 15) |
| rooms | array | Optional | Array of room configurations — one object per room required |
| adults | integer | Optional | Number of adults in the room (minimum 1) |
| children | array | Optional | Ages of children (integers, 0–12). Send an empty array [] if no children. Ages outside 0–12 return HTTP 400 |
| Field | Type | Description |
|---|---|---|
| datetime | string | Response timestamp — format YYYY-MM-DDTHH:MM:SS+0000 |
| response_reference | string | Unique reference ID for this response |
| response | object | Availability response object |
| currency | string | Requested currency code |
| hotelCount | integer | Number of hotels with available options |
| hotelList | array | Array of hotel availability objects |
| hotel_code | integer | Hotel code |
| checkin | string | Check-in date — YYYY-MM-DD |
| checkout | string | Check-out date — YYYY-MM-DD |
| nights | integer | Number of nights |
| groupRooms | array | Array of available room group options |
| group_id | string | Unique room option identifier — use in /checkHotelRate and /book |
| name | string | Room type and category name |
| boardCode | string | Board type code (e.g. RO, BB, HB) |
| boardName | string | Board type name (e.g. Room Only) |
| adults | integer | Adults this option accommodates |
| children | integer | Children this option accommodates |
| groupPrice | object | Total price for the room group (amount, currency) |
| refundable | boolean | True if the booking can be cancelled without penalty |
| refundableUntil | string | Free-cancellation deadline — YYYY-MM-DD HH:MM:SS (GMT) |
| cancellationPolicyBreakdown | array | Tiered cancellation penalty schedule (amount, currency, hoursbefore, datebefore) |
| rooms | array | Individual room objects within this group option (id, name, boardCode, boardName, adults, children, ages) |
| language | string | Response language |
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.
| Field | Type | Required | Description |
|---|---|---|---|
| group_id | string | Optional | Room group identifier from /availability or a previous /checkHotelRate response |
Response Scenarios
Scenario 1 — Rate available and unchanged. Proceed to /book using the same group_id.
Scenario 2 — Rate expired or group_id invalid. Run a new availability search to get a fresh 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.
| Field | Type | Description |
|---|---|---|
| datetime | string | Response timestamp — format YYYY-MM-DDTHH:MM:SS+0000 |
| response_reference | string | Unique reference ID for this response |
| response | string | OK | EXPIRED_OR_INVALID_GROUP_ID | RATE_CHANGED |
| group_rooms | object | Present 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.
| Field | Type | Required | Description |
|---|---|---|---|
| holder | object | Required | Lead guest details |
| title | string | Required | Title: "Mr.", "Mrs.", or "Ms." |
| firstname | string | Required | First name of the booking holder |
| lastname | string | Required | Last name of the booking holder |
| string | Required | Email address of the booking holder or agent | |
| nationality | string | Required | ISO 3166-1 alpha-2 nationality code |
| phone | string | Required | Phone number of the booking holder |
| agent_reference | string | Required | Your 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. |
| hotel | array | Required | List of hotel booking objects |
| group_id | string | Required | Room group ID from /availability or /checkHotelRate |
| rooms | array | Required | List of room objects within the group |
| process_key | string | Required | Individual room ID (id field) from /availability rooms array |
| passengers | array | Required | List of guests for this room |
| type | string | Required | "AD" for adult, "CH" for child |
| title | string | Required | Title: "Mr.", "Mrs.", or "Ms." |
| first_name | string | Required | First name of the guest |
| last_name | string | Required | Last name of the guest |
| age | integer | Required | Age of the guest as integer (e.g. 35 for adult, 8 for child) |
| Field | Type | Description |
|---|---|---|
| datetime | string | Response timestamp — format YYYY-MM-DDTHH:MM:SS+0000 |
| response_reference | string | Unique reference ID for this API response |
| agent_reference | string | Your agent_reference echoed back for confirmation |
| response | object | Booking confirmation details |
| booking_reference | string | TripstickConnect unique booking reference — store this for retrieval and cancellation |
| holder | object | Lead guest details (mirrors request) |
| hotel | array | Booked property details (hotel_code, checkin, checkout, address, latitude, longitude, country, city, hotel, amount, rooms) |
| currency | string | ISO 4217 currency code |
| booking_status | integer | Status code — see Booking Status Codes table below |
| booking_status_label | string | Status label — VOUCHERED | CONFIRMED | FAILED | CANCELLED |
| amount | float | Total booking amount |
| Code | Label | Description |
|---|---|---|
| 1 | VOUCHERED | Booking confirmed and voucher issued. No further action required. |
| 2 | CONFIRMED | Booking confirmed by supplier; voucher processing in progress. |
| 3 | FAILED | Booking failed at the supplier level. Contact support with the response_reference if this occurs unexpectedly. |
| 9 | CANCELLED | Booking has been successfully cancelled. |
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.
| Field | Type | Required | Description |
|---|---|---|---|
| booking_reference | string | Optional | TripstickConnect booking reference (from /book response) |
| agent_reference | string | Optional | Your agent reference (from /book request). Can be used instead of booking_reference |
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.
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | Optional | Filter bookings by status code (see Booking Status Codes in 8.1) |
| page | integer | Optional | Page number for pagination. Defaults to 1. |
| per_page | integer | Optional | Number of bookings per page. Defaults to 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.
| Field | Type | Required | Description |
|---|---|---|---|
| booking_reference | string | Optional | TripstickConnect booking reference to cancel |
| Field | Type | Description |
|---|---|---|
| datetime | string | Response timestamp — format YYYY-MM-DDTHH:MM:SS+0000 |
| response_reference | string | Unique reference ID for this response |
| response | string | "OK" on successful cancellation |
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.
| Code | Label | Description |
|---|---|---|
| 200 | OK | Request successful. |
| 400 | Bad Request | Invalid JSON, missing required fields (including agent_reference), invalid dates, or child age outside 0–12. |
| 401 | Unauthorized | Authorization header missing or credentials invalid. Check your Base64-encoded username:password. |
| 403 | Forbidden | Account suspended or IP not whitelisted for the requested supplier. |
| 404 | Not Found | booking_reference or agent_reference not found. |
| 422 | Unprocessable Entity | Request structure is valid but contains semantic errors — e.g. check-in date in the past, invalid nationality code, or checkout before checkin. |
| 429 | Too Many Requests | Rate limit exceeded. Back off and retry after the period indicated in the Retry-After header. |
| 500 | Internal Server Error | Unexpected server error. Retry after a short delay; if persistent, contact support with the response_reference. |
| 503 | Service Unavailable | API temporarily unavailable. Retry with exponential backoff. |
Beyond HTTP codes, the Shopping and Booking APIs may return application-level error responses in the response body:
| response / error field | Meaning | Action |
|---|---|---|
| EXPIRED_OR_INVALID_GROUP_ID | The group_id has expired or is invalid | Run a new /availability search |
| RATE_CHANGED | Rate has changed since the availability search | Review new pricing in group_rooms and confirm with customer |
| IP_NOT_REGISTERED | Your outbound IP is not whitelisted on a supplier's firewall | Contact TripstickConnect support to whitelist the IP |
| FAILED (booking_status 3) | Supplier rejected the booking | Retry 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:
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:
| Field | Meaning |
|---|---|
| refundable | true = booking can be cancelled without penalty before refundableUntil |
| refundableUntil | Free-cancellation deadline (GMT). Cancel before this time to avoid charges. |
| amount in breakdown | Penalty charged if cancelled after datebefore |
| hoursbefore | Hours 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