# Create or update rates Use the `OTA_HotelRateAmountNotif` endpoint to update the price per rate/room/date on Booking.com. ```http POST https://supply-xml.booking.com/hotels/ota/OTA_HotelRateAmountNotif ``` The `OTA_HotelRateAmountNotif` endpoint has two versions currently. The functionality outlined in this topic captures the v1.0 OTA_HotelRateAmountNotif behaviour. ## Difference between OTA_HotelRateAmountNotif endpoint v1.0 and v1.1 When migrating to the v1.1 `OTA_HotelRateAmountNotif` endpoint, you get: - [Improved API behaviour.](/connectivity/docs/migration-guides/migrating-to-new-versions/#changes-to-the-ota_hotelrateamountnotif-behaviour) - Improved error handling and error description. - Improved latency. For a complete list of changes to the v1.1 `OTA_HotelRateAmountNotif` endpoint, see the [migration guide.](/connectivity/docs/migration-guides/migrating-to-new-versions/#changes-to-the-ota_hotelrateamountnotif-endpoint) ### Header parameter | Header | Description | Type | Required/Optional | Notes | | --- | --- | --- | --- | --- | | `Accept-Version` | Specify the version number to get the API functionality specific to that version. | string | optional | Supports the following values: - 1.1: New version. - 1.0: Previous version. | #### Sample header ```https POST 'https://supply-xml.booking.com/hotels/ota/OTA_HotelRateAmountNotif' \ --header 'Accept-Version: 1.1' \ --header 'Authorization: Basic THVjLVNhbXVlbMblhWTdlOCghQ29qaU9pNmxlWSpIWXU9OigvS2meQpQ12puj' \ --header 'Content-Type: application/xml' ``` ## Request body example The following example performs the following: - Sets price for room (id=36745604) and rate (id=1278606) to 38.00 for 1 person from the 19th of October to and including the 20th of November 2012. - Sets price for room (id=36745604) and rate (id=1278606) to 45.00 for the room per night from the 19th of October to and including the 20th of November 2012. - Sets price for room (id=36745604) and rate (id=1278607) to 55.00 for the room per night from the 19th of October to and including the 20th of November 2012. ```xml ``` ## Response body example ```xml ``` ## Request fields ### OTA_HotelRateAmountNotifRQ All the below XML is fixed and mandatory, except: **timestamp:** Should contain the current time and date **target:** Either 'Production' or, may contain 'Test', which will not update anything in the Booking.com database. ```xml ``` ### RateAmountMessages The RateAmountMessages element is mandatory for the OTA_HotelRateAmountNotif request. ```xml ... ``` ### RateAmountMessage **LocatorID (required):** should contain a unique ID (used as RecordID in OTA_HotelRateAmountNotifRS) ```xml ``` ### StatusApplicationControl **`Mon`/`Tue`/`Wed`/`Thu`/`Fri`/`Sat`/`Sun` (Optional, default: `true`):** Specifies the days of the week when the rate is active. If only a few weekdays are marked as `true` then the API marks the other days as `false`. However, if some weekdays are marked as `false`, then the API considers this as sending none as `true` and therefore marks all weekdays as `true`. **Start / End (required):** the period which you are updating (inclusive end date). Please note, you can update for periods in the future and up to two day in the past, in the Central European Time (CET) timezone. **RatePlanCode (required):** the Booking.com rate category ID which you are updating. **InvTypeCode (required):** the Booking.com room ID which you are updating. ```xml ``` ### Rates The Rates element is optional for the OTA_HotelRateAmountNotif request. ```xml ... ``` ### Rate The Rate element is mandatory for the OTA_HotelRateAmountNotif request when specifying the Rates element. ```xml ... ``` ### BaseByGuestAmts the BaseByGuestAmts element is optional for the OTA_HotelRateAmountNotif request. ```xml ... ``` ### BaseByGuestAmt the BaseByGuestAmt element is mandatory for the OTA_HotelRateAmountNotif request when specifying the BaseByGuestAmts element. **AmountAfterTax/AmountBeforeTax (required):** the price for the given room for the given date for the given rate category. The currency used for pricing is always the same for the hotel and set by Booking.com. The currencies used per country can be found in the documentation under Overview, static information. Prices cannot be removed after a value has been set. v1.0 behaviour: €50000 maximum price The maximum price you can set for a room is €50000 (or equivalent) per night. If you try to set a higher price, we set the price to zero, which automatically closes the room. The v1.0 endpoint returns an error message like the following code block. ```xml ``` If the room has both 'Including VAT' and 'Including taxes' enabled in the Booking.com system, AmountAfterTax must be supplied, otherwise AmountBeforeTax. **DecimalPlaces (optional):** the number of decimal places for a particular currency (eg. 8550 with DecimalPlaces="2" represents 85.50). **NumberOfGuests (optional):** 1, if set, the single use price is set. Please note, Booking.com is only able to set prices per room night or for 1 person in a room, per night (so called single-use) **CurrencyCode:** [Currency code](/connectivity/docs/b_xml-countrycurrencies) of the hotel. It must match the hotel currency code configuration on Booking.com, Otherwise you will get an error. ```xml ``` ## Response fields ### OTA_HotelAvailNotifRS All the below code is fixed, except: **TimeStamp:** contains current time **Target:** set to same value as in corresponding OTA_HotelAvailNotifRQ. ```xml ``` ### Success Success element is optional, depending on whether the request contained mistakes. ```xml ``` ### Warnings Warnings can be combined with success messages if the request was still processed. **Type:** OTA error code (see OTA codetable). **Code:** OTA EWT code (see OTA codetable). **RecordID:** same as LocatorID in OTA_HotelAvailNotifRQ. **Status:** NotProcessed (error) / Complete (only warning). **ShortText (may be empty):** warning message. ```xml ``` ### Errors Errors are optional and only used alone, without success/warnings. **Code:** OTA EWT code (see OTA codetable). **Type:** OTA error code (see OTA codetable). **RecordID:** same as LocatorID in OTA_HotelAvailNotifRQ. **Status:** NotProcessed. **ShortText (may be empty):** error message. ```xml ``` ### RUID strings The Booking.com responses will always contain a "RUID" string, which is an encoded string used by the Booking.com staff to trace back any updates made before. Whenever the Connectivity Partner wishes the XML-Team to look at any logfiles for debugging or the like; the RUID string needs to be provided. This will enable the Booking.com technical staff to provide Connectivity Partners with support. ```xml ```