Traveller's Choice Hotel API
  • 🚩Getting Started with Hotel API
  • πŸ•ΈοΈUnderstanding the API structure
  • πŸ”‘Authentication API
    • Access token
  • πŸ“šHotel Content API
    • Content API
      • Hotels Master
        • Hotels API
        • Hotel detail API
      • Location Master
        • countries
        • States
        • Cities
        • Areas
      • Types Master
        • Room Types Master
          • Room Types API
          • Room Types Detail API
        • Board Type Master
          • Board Types API
          • Board Types Detail API
        • Accommodation Type Master
          • Accommodation Types API
          • Accommodation Type Detail API
        • Chains Master
          • Chains API
          • Chain Detail API
        • Amenities Master
          • Amenities API
          • Amenity Detail API
        • Amenity Group Master
          • Amenity group API
          • Amenity Group Detail API
      • πŸ”„Sync Id
  • 🏨Hotel Booking API
    • Booking API
      • Availability APIs
        • MinRate Availability API
        • Availability API
      • Check Rate API
      • Booking APIs
        • Create a Booking - API
        • Booking Details API
        • Cancel Booking API
  • πŸ•΅οΈTest cases
    • Booking API
  • Webhook
  • Errors
    • Token Error
Powered by GitBook
On this page
  1. Hotel Content API
  2. Content API

Sync Id

Most of the ContentAPI masters contain a large volume of data, which can be challenging to process in a single API request due to its size.

To ensure optimal performance, we limit the data to a maximum of 1000 objects per request, processing the data in batches.

Because of this limitation, you may need to make multiple API requests to the same ContentAPI endpoint to retrieve the complete dataset from a master.

The TCTT API gateway will remember the details of the last ContentAPI request and will automatically process the next batch of data for the client. The SyncId is used to manage this batch operation effectively.


How to use SyncId

Every ContentAPI endpoint will return a seperate SyncId as part of the response with each API request.

The client system must retain this SyncId and include it as a query parameter in the next API request to the same API endpoint for retrieving the following batch of data.

Sample Response
{
    "success": true,
    "data": {
        
        "total": 2372,
        "from": 1,
        "to": 1000,
        "countries": [
            {
                "countryId": 111,
                "countryName": "united states",
                "isocode": "US",
                "phonecode": "+1"
            }
        ]
    }
}

No need to pass syncId as query parameter on the first request for a specific ContentAPI endpoint.

Each ContentAPI will have its own separate SyncId.Once the entire dataset from a master has been consumed, the API endpoint will return an empty array.

PreviousAmenity Group Detail APINextBooking API

Last updated 7 months ago

πŸ“š
πŸ”„