创建/更新预售券
接口说明
保存或更新预售券信息
基本信息
名称 | 描述 |
---|---|
HTTP URL | https://open.douyin.com/goodlife/v1/trip/hotel/savepresale/ |
HTTP Method | POST |
Scope | life.capacity.trip_presale_push |
权限要求 | 酒店新预售券解决方案-住宿预售券创建和更新 |
请求参数
请求头
access-token必填String
示例:clt.943da17996fb5cebfbc70c044c3fc25a57T54DcjT6HNKGqnUdxzy1KcxFnZ
content-type必填String
固定值"application/json"
Rpc-Transit-Life-AccountString
来客商户根账户ID
Body展开全部子属性
account_id必填String
商家账户id
需要传总户id,否则会导致匹配失败
presale_info必填Struct
预售详细信息
展开子属性
请求示例
curl --location --request POST 'https://open.douyin.com/goodlife/v1/trip/hotel/savepresale/' \ --header 'content-type: application/json' \ --header 'access-token: 0801121846735352506a356a6' \ --data '{"account_id":"20XuHHB8Wo","presale_info":{"member_required":5555369992440995301,"note_info":{"exclusive_fee":[{"price":4979627306611229305,"count":4371902316535577500,"unit":"o3LcLjgv0s","image_url":"JzBXlwwWxh","name":"yn7hx057as"}],"check_time_range":{"to":"9VowQiZ0Me","from":"iKAXLAmVfu"},"other_remark_info":["LltOD7CZxN"],"service_for_foreign":false,"superimposed_discounts":false},"pre_sale_coupon_id":"GPq7L2mqnY","pre_sale_coupon_info":{"apply_room_number":4401315529188983508,"bind_rate_plans":["excAY91nsC"],"original_amount":2663179398499922371,"hotel_customer_reserved_info":{"require_purchase_contact_info":{"enable":false,"identity_type_with_content_list":[{"contact_identity_content_list":[1],"need_consistency_purchase_and_booking":{"1":false},"contact_identity_type_enum":1}]},"by_merchant_custom_config":false,"require_booking_info":{"enable":false,"identity_type_with_content_list":[{"need_consistency_purchase_and_booking":{"1":false},"contact_identity_type_enum":1,"contact_identity_content_list":[1]}]}},"imange_list":[{"image_type":1,"image_url":"kxd1pVRd0K"}],"coupon_separate":false,"actual_amount":8812862228101160763,"markup_type":4653794879744716715,"usage_duration":2217890378446436571,"markup_info":[{"holidays_year":{"1":"yyMjRRwPTo"},"markup_amount":3233439861059392851,"markup_days":{"from":"u42Q8m97NI","to":"tN0sbsfPcI"},"markup_days_of_week":[1],"markup_holidays":[1],"markup_date_type":1,"markup_effect_scope":[{"effect_id_list":["nFY9SXbefD"],"is_full_effect":false,"effect_type":1}],"markup_time":[{"holidays_year":{"1":"Rw1tMoppZe"},"markup_date_type":1,"markup_days_of_week":[1],"markup_holidays":[1],"markup_days":{"from":"fCeRHttZiY","to":"xxHS7ZMkxI"}}]}],"coupon_name":"UmgOeUeqIs","commodity":[{"commodity_type":1,"group_name":"Ccx9ZFYiQF","total_count":1485567181346211349,"optional_count":1440554943175773747,"item_info":[{"product_info":{"unit":"miOFKs9HWh","image_url":"cCZjIEd4QC","name":"oUXSAS9S6L","price":6818546503020456787,"count":5657540624964268762}}],"effect_scope":[{"effect_id_list":["qVz2OzcH3P"],"effect_type":1}]}],"appointment_award":{"award_type":1,"content":"QDLcZAXwzP","is_award_display":false,"time_type":1,"date_range":{"start":"fO0HsrBkyi","end":"WUe1OxOtuC"},"after_pay_days":3983776841517109680,"is_award":false},"sales_type":1,"is_test_data":false,"apply_nights":1521679402815189044},"sale_info":{"book_date":{"from":"oInABPnUhl","to":"KNpsRKLQuh"},"is_auto_extension":false,"show_channel":1,"inventory_info":{"is_limit":false,"num":3826931620139952631},"sale_date":{"from":"TaMMLYLfJO","to":"fnhHplyuKL"}},"meals":[{"type":1,"num":5856986759170428655}],"category_id":"YPAFWmAy94","settle_type":1,"out_id":"aO1djQHWMB","currency":"xjduldxglJ","trade_info":{"invoic_info":{"provider":1,"invoice_types":[1],"subject":"k1Kn9JH48U"},"customer_can_use_time":{"use_time_type":1,"use_time_list":[{"is_time_nextday":false,"time_span":{"to":"JoyMBhlAxm","from":"a2vaI5PCXk"}}]},"cancel_booking_rule":{"cancel_offset":[{"time_offset":{"day":3388441835317981068,"hour":340064421976516201,"minute":1363526455684347952,"second":4858904478561967763},"cut_type":1,"cut_value":4209709894708997372}],"cancel_type":1,"cancel_time_type":1},"partly_reserve_refund_rule":1,"cancel_booking_rule_list":[{"cancel_type":1,"cancel_time_type":1,"cancel_offset":[{"time_offset":{"hour":625091614159717618,"minute":2411429924243357922,"second":1832640426869362980,"day":8237924887445255458},"cut_type":1,"cut_value":8359168834231488218}]}],"customer_can_no_use_date":{"holidays_year":{"1":"Nd6odaampH"},"cannot_use_days_of_week":[1],"cannot_use_holidays":[1],"cannot_use_date":["DPN9IYaFgw"]},"customer_can_use_date":{"use_date":{"to":"4n8toWrEyC","from":"YWhNKMmD6a"},"use_date_type":1,"day_duration":2616320102518046286},"limt_buy_rule":{"each_order_can_use_max":2898819192514597942,"each_person_each_order_max":5231961597824719315,"each_person_max":5844078224367533447},"book_rule":{"time_unit":1,"time_pre_book":7916612444324678523,"earliest_book_day":2262722249844774913}}},"base":{"log_i_d":"sPZQAoqMWv","caller":"3vgjcRyDTe","addr":"IOEf4bz0Cb","client":"0RzYqgrh8T","traffic_env":{"open":false,"env":"WhrUKP0jJn"},"extra":{"uSuJKq3NmZ":"zPDWgqIhdB"}}}'
响应参数
Body展开全部子属性
extra必填Struct
扩展信息
展开子属性
dataStruct
展开子属性
响应示例
正常响应示例异常响应示例
{ "data": { "pre_sale_coupon_id": "dsqFlESUSS", "out_id": "EoOamXQ1Xe", "error_code": 0, "description": "" }, "extra": { "error_code": 0, "description": "", "sub_error_code": 0, "sub_description": "", "logid": "202504221512326AFFDA287666F3BF3617", "now": 1745305953 }, "base_resp": { "status_message": "234qioIYTe", "status_code": 7465920839715356000, "extra": { "kcR5mLSmJM": "ShmeHAHEDz" } } }
错误码
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过期,请刷新或重新授权 |