patch
https://api.myhostex.com/v3/channel_accounts/booking/promotions/
修改某个 Booking.com 优惠活动的部分字段:折扣、名称、客群、最少入住、不可退款、入住日期与生效星期、附加日期、可预订日期与时段、最后一分钟或提前预订窗口、房型与价格计划。只改动你传入的字段,其余字段在 Booking.com 上保持不变,包括排除日期(用 POST /channel_accounts/booking/promotions/excluded_dates 修改)。rooms、parent_rates、additional_dates 与 stay_date.active_weekdays 是整列表替换。book_date: null 与 book_time: null 表示去掉对应限制;这需要使用 JSON 请求体,表单请求体分不清空值和 null(返回 400)。优惠类型不能修改。
- Booking.com 每次更新成功都会把优惠设为启用,所以已停用的优惠会返回
409,除非你传activate: true。 - 部分优惠(如
new_property_deal)不能修改(409)。geo_rate优惠只能改discount,mobile_rate优惠只能改discount、target_channel与parent_rates,因为 Booking.com 不返回它们的其他字段;改其他字段返回409。 - 重发同样的请求是安全的。
- 你的账号未开放新建与编辑优惠时返回
501(与POST /channel_accounts/booking/promotions/excluded_dates分开开放)。 - 每个 Booking.com 住宿每分钟最多 10 次优惠写入,与
POST /channel_accounts/booking/promotions/excluded_dates共用,此外仍受账号级限流约束;429响应带有Retry-After。 - Booking.com 拒绝的取值返回
400,error_msg中带有 Booking.com 错误码(如DISCOUNT_NOT_IN_RANGE、ROOMS_INVALID、TARGET_CHANNEL_NO_ACCESS)。 502表示 Booking.com 暂时不可用或结果无法确认,改动仍可能在之后几分钟内生效。
需要可写的访问令牌。
