营销规则接口
收藏
我的收藏接口说明
营销规则推送
基本信息
名称 | 描述 |
---|---|
HTTP URL | https://open.douyin.com/goodlife/v1/trip/promotion/push/ |
HTTP Method | POST |
Scope | life.capacity.trip_hotel_promotion_push |
权限要求 | 酒店行业日历房解决方案-营销规则推送 |
请求参数
请求头
access-token必填String
示例:clt.943da17996fb5cebfbc70c044c3fc25a57T54DcjT6HNKGqnUdxzy1KcxFnZ
content-type必填String
固定值"application/json"
Body展开全部子属性
account_id必填String
商户account_id
applicable_date必填Struct
营销适用日期
展开子属性
applicable_resource必填Struct
营销适用资源
展开子属性
is_auto_extension必填Bool
是否自动延期(如果开通自动延期,需要有效期大于30天)
promotion_basic_info必填Struct
营销基础信息
展开子属性
activeBool
活动是否生效,如果非生效,下面所有的售卖房型也失效,默认生效(false时需要传promotion_id)
daily_sale_promotionStruct
天天特价
展开子属性
early_bird_promotionStruct
提前优惠
展开子属性
flash_sale_promotionStruct
限时抢购
展开子属性
hotel_new_customer_promotionStruct
门店新客
展开子属性
night_sale_promotionStruct
今夜甩卖
展开子属性
promotion_idString
营销ID(为空新增,不为空更新)
succession_promotionStruct
连住优惠
展开子属性
unapplicable_dateStruct
营销不适用日期
展开子属性
请求示例
curl --location --request POST 'https:// open.douyin.com/goodlife/v1/trip/promotion/push/' \ --header 'content-type: application/json' \ --header 'access-token: 0801121846735352506a356a6' \ --data '{"flash_sale_promotion":{"flash_sale_detail":[{"start_hour":395831006485028300,"end_hour":4488206917464325318,"discount_value":1809356501486748433}],"discount_type":1},"early_bird_promotion":{"discount_type":1,"early_bird_promotion_detail":[{"advance_day":8773659999782677133,"discount_value":2781786980478318573}]},"hotel_new_customer_promotion":{"hotel_new_customer_promotion_detail":{"discount_value":1388561221659507283,"discount_type":1}},"unapplicable_date":{"unapplicable_date_range":[{"start_days":"u4dD338oLS","end_days":"NrafyRrXLh"}]},"active":false,"applicable_date":{"start_days":"KZRBMHybRa","end_days":"PlDKCEpMUU","days_of_week":[4164673004067388143]},"succession_promotion":{"discount_type":1,"succession_promotion_detail":[{"stay_length":5449833613360178766,"discount_value":3894096920552875033}]},"night_sale_promotion":{"night_saleDetail":[{"discount_value":3398139014190620850,"start_hour":8621730194156930725,"end_hour":3107521073957478771}],"discount_type":1},"applicable_resource":{"resources":[{"rate_plan_id":"YnOtBVYkqK","rate_plan_status":2995307309333558742}]},"base":{"extra":{"9s1MUJxwcF":"sDo65KZRRy"},"log_i_d":"jDmmZHP9HA","caller":"sc40e3RN4Y","addr":"cGiWcfdtbq","client":"tJybqQiamt","traffic_env":{"open":false,"env":"NAv18sXp8H"}},"promotion_id":"JBWOtB0dJ2","promotion_basic_info":{"sub_type_code":"xFDQ0v4JGi","sub_type_code_name":"eEXk8ST7H4","out_type":"eJIPyXQVIz","type_code":"WXryjd4nl8","type_name":"6bR5Dr2AJV"},"daily_sale_promotion":{"daily_sale_promotion_detail":{"discount_type":1,"discount_value":4784002192689245178}},"account_id":"98AkmJ2IjD","is_auto_extension":false}'
响应参数
Body展开全部子属性
dataStruct
展开子属性
extraStruct
展开子属性
响应示例
正常响应示例异常响应示例
{ "base_resp": { "status_message": "lAWjU9qP9y", "status_code": 4020758616165832000, "extra": { "wrP41yPzBU": "8IFWg8YfTE" } }, "data": { "promotion_id": "jvpppK8CHB", "status": 1, "message_detail": [ { "rate_plan_id": "doyuFlvoYD", "error_message": "mx4IyQ3wbv" } ], "error_code": 0, "description": "" }, "extra": { "error_code": 0, "description": "", "sub_error_code": 0, "sub_description": "", "logid": "202412050130285494F6A42EC2A8709D92", "now": 1733333428 } }
切换单列布局
错误码
HTTP 状态码 | 错误码 | 错误码描述 | 排查建议 |
---|---|---|---|
200 | 2100001 | 未知错误 | 重试接口,重试3次仍报错联系抖音生活服务技术支持 |
200 | 2100004 | 系统繁忙,此时请开发者稍候再试 | 重试接口,重试3次仍报错联系抖音生活服务技术支持 |
200 | 2100005 | 参数不合法 | 更换参数 |
200 | 2190002 | access_token无效 | 调用接口重新生成access_token |
200 | 2190004 | 应用未获得该能力, 请去https://open.douyin.com/申请 | 应用申请接口权限 |
200 | 2190008 | access_token过期,请刷新或重新授权 | 规范token刷新机制,检查是否有测试环境在同步刷新token |
200 | 2119001 | 参数不合法 | 更换参数 |
200 | 2119002 | 系统繁忙,请稍候再试 | 重试 |
200 | 2119003 | 请求太过频繁,请稍后再试 | 重试 |
200 | 2119005 | 应用未获商家授权 | 联系合作商家在商家后台发起授权,并在服务商后台同意授权 |
200 | 3000001 | 根据实际业务错误返回 | 对照接口文档规范参数并重试 |
200 | 4000001 | 根据实际业务错误返回 | 补充参数 |
200 | 4000002 | 根据实际业务错误返回 | 对照接口文档规范参数并重试 |
200 | 5000001 | 根据实际业务错误返回 | 联系抖音处理 |
200 | 5000001 | 以实际错误信息为准 | |
200 | 5000001 | 服务器打瞌睡了,请稍后再试。 | |
200 | 3000001 | 以实际错误信息为准 |
点击纠错