Product API

In the Hotel Trader system, a Product is defined as a combination of a Rateplan and a Roomtype. The Products API, initiated by Hotel Trader, provides information that is configured at the Product level rather than separately for a Rateplan or a Roomtype. Tax mappings to the products will be sent through this API. A single request will be sent for each rateplan, containing all the products associated with that rateplan. Each product within the request will include its complete set of information; partial data is not provided at either the rateplan or product level.

To ensure scalability and efficiency in message delivery and processing, products are sent one rateplan at a time. This design decision helps avoid the overhead of sending an excessively large payload. For instance, with 30 rateplans and 30 roomtypes, the system would need to handle 900 products. Bundling all of these into a single message could result in network delays, higher memory usage, and slower downstream processing. By limiting each request to a single rateplan’s products, the system maintains better performance and reliability.

Initiator - Hotel Trader

Endpoint

For creating new Products in the client system. Each request contains complete product information for a single rate plan.

[POST] https://<client-base-url>/products

There is no updateType field included. Partner Systems must create, update, or delete corresponding content types from the product mapping within their system.

Request

HTTP Headers

All the HTTP Headers are mandatory. These headers are applicable and remain the same for both end-points of the Products API.


Header Name Type
Content-Type application/json
Accept-Encoding gzip
Authorization Basic <token>

Request Description

All the fields in the request are described below.


Field/Object Datatype Required Description
messageId String Yes A string that uniquely identifies this particular message. This should be returned in the response.
propertyCode String Yes A unique hotel code provided by Hotel Trader identifies the hotel for which Products metadata is being sent in this request.
rateplanCode String Yes A unique rateplan code provided by Hotel Trader that identifies the rateplan for products metadata is being sent in this request.
products Array Yes A list of product objects, which contain the product metadata.

Product

Field/Object Datatype Required Description
rateplanCode String Yes Hotel Trader's unique identifier for rateplan code.
roomtypeCode
String
Yes Hotel Trader's unique identifier for roomtype code.
taxes
Array Yes List of Strings. Each value is a unique tax identifier provided by Hotel Trader in its Tax API.


Example

{
    "messageId": "s6aa3d81-6c1d-4e12-b374-c76735b49fc7",
    "rateplanCode": "HTPKG",
    "propertyCode": "NYCMIL",
    "products": [
        {
            "rateplanCode": "HTPKG",
            "roomtypeCode": "KING",
            "taxes": [
                "CITYTAX",
                "STATETAX"
            ]
        },
        {
            "rateplanCode": "HTPKG",
            "roomtypeCode": "QUEEN",
            "taxes": [
                "CITYTAX",
                "STATETAX"
            ]
        }
    ]
}

Response

This API follows the Standard Response model of the Metadata Push API.