Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. In order to create an own contract linked to a certain hotel, you need to use method POST /accommodationContract with the possibility to choose to which hotel this contract should be linked.

Example of the request POST /accommodationContract API method: 

For example:

{

  "supplierId": 5654899,

  "hotelId": 11814738,

  "active": true,

  "transactionsCurrency": "USD",

  "sameBoard": false,

  "name": {

    "en": "Hotel Charles OLD"

  }

}

...

  • to specify for which contact it is to be done use method GET /contracts;

  • to specify for which room to add prices use method GET /availability (roomTypeId=categoryId and serviceId);

  • to specify which meal type are included into room price you add, please use method GET /prices (secondaryServiceId and mealTypeId).

Example of the request PUT /accommodationPrices  API method to create a price-list:

{

  "priceLists": [

    {

      "prices": [

        {

          "roomTypeId": 2290035,

          "amount": 80,

          "placeType": "Base",

          "formula": "80",

          "currency": "USD",

          "mealTypeId": 2290041,

          "serviceId": 6025393

        }

              ],

      "priceTypeCode": "PerUnit",

      "calculationType": "PRICE_PER_SERVICE",

      "active": true,

      "name": "Low Season"

    }

  ]

}

...

  1. After price-list is created you need to link it to a certain tariff using the same method PUT /accommodationPrices specifying additional details like dates, week days and etc.

Example of the request PUT /accommodationPrices  API method to create tariff:

{

  "tariffs": [

{

      "priceLists": [

     {

          "weekDays": [

            true,

            true,

            true,

            true,

            true,

            true,

         true

       ],

          "dateFrom": "2023-01-02",

          "dateTo": "2023-12-31",

       "referedToId": 6025469, 

          "minDay": 3,

          "maxDay": 14

     }

   ]

   }

  ]

}

...