post
https://api.hostex.io/v3/channel_accounts/booking/promotions
Create a promotion on a Booking.com property. The promotion goes on sale on Booking.com as soon as it is created, so check the discount, dates, rooms and rate plans before sending. The required fields and allowed values depend on type (see the fields below); Hostex rejects requests that cannot be valid with 400 before calling Booking.com.
idempotency_keyis required. Booking.com creates a new promotion for every request, so retry a failed or timed-out request with the same key: Hostex returns the promotion created by the first request (created: false) instead of creating a duplicate. This holds for 24 hours from the first request. Do not retry with a new key before checkingGET /channel_accounts/booking/promotions. When the502message lists promotion ids, one of them may be the promotion this request created: check them instead of retrying.- Send a JSON body.
- Booking.com keeps one
mobile_ratepromotion per property and onegeo_ratepromotion per country channel (target_channel), with fixed ids (MR,GR<target_channel>). Creating one while it already exists, active or inactive, would replace it, so Hostex reads the property first and returns409with the existing id: change that promotion withPATCH /channel_accounts/booking/promotions/{promotion_id}instead. If you were retrying a create that may already have succeeded, the id in that409is the promotion it created. non_refundable: truemakes Booking.com create a 3-day non-refundable policy for the property if it has none.- Booking.com promotions cannot be deleted; to remove one, deactivate it with
POST /channel_accounts/booking/promotions/{promotion_id}/deactivate. - In addition to the per-minute limit below, at most 20 creation requests per Booking.com property per day (server time zone);
429responses includeRetry-After. - Returns
501while creating and editing promotions is not enabled for your account (it is enabled separately fromPOST /channel_accounts/booking/promotions/excluded_dates). - Limited to 10 promotion writes per minute per Booking.com property, shared with
POST /channel_accounts/booking/promotions/excluded_dates, in addition to the account rate limits;429responses includeRetry-After. - Values Booking.com rejects return
400with the Booking.com code inerror_msg(for exampleDISCOUNT_NOT_IN_RANGE,ROOMS_INVALID,TARGET_CHANNEL_NO_ACCESS). 502means Booking.com was unavailable or the result could not be confirmed; the change may still be applied within the next few minutes.
Requires a writable access token.
