CREATE PRICES FOR OWN HOTEL
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" } } |
Response Body
{
"contract": {
"id": 6025425,
"accommodationName": "Hotel Charles OLD",
"supplierId": 5654899,
"transactionsCurrency": "USD",
"sameBoard": false,
"hotelId": 11814738,
"active": true
}
}
2. In order to add prices on price-lists, it is required to create price-list first with API method PUT /accommodationPrices:
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" } ] }
|
Response Body
3. 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:
Response Body