验券准备
收藏
我的收藏接口说明
抖音团购券码的核销, 需要先调用本接口, 查询订单的券列表,选择要验的券,再调用验券接口,核销券码。
- 抖音团购券码的核销,每次都需要先调用本接口,优先查询订单的券列表,选择要验的券,再调用验券接口,核销券码,验券准备和验券接口的调用次数需要一一对应,如已经调用验券接口验券成功,则当前二维码会失效,无法继续使用验券准备接口,需要使用刷新的二维码再进行调用。
- 二维码扫出来是一个短链,示例:https://v.douyin.com/eHHc1ft/ ,扫码后并调用本接口可返回当前订单下可用的全部券码信息,如未返回券码信息,则说明该订单此刻无可用券码。
- 对短链做 HTTP 请求。得到对应的长链接是https://www.iesdouyin.com/share/commerce/coupon/I0ZwZEZpb2U1N0pjQVZxS2NJRTFSQW5WK1c4bmxvbnNWdUQ2Wk85Y1N0eHpRUFpMMmZwNTdFM2NKeWlFNDM2QT0/?schema_type=13&object_id=I0ZwZEZpb2U1N0pjQVZxS2NJRTFSQW5WK1c4bmxvbnNWdUQ2Wk85Y1N0eHpRUFpMMmZwNTdFM2NKeWlFNDM2QT0&utm_campaign=client_scan_share&app=aweme&utm_medium=ios&tt_from=scan_share&iid=&utm_source=scan_share。
- 链接中object_id参数的值即为本接口传入的 encrypted_data 参数 I0ZwZEZpb2U1N0pjQVZxS2NJRTFSQW5WK1c4bmxvbnNWdUQ2Wk85Y1N0eHpRUFpMMmZwNTdFM2NKeWlFNDM2QT0
请仅感知链接中的 object_id 参数。其他的参数、域名、路径等信息请不要感知。以后都有优化和调整的可能。
- 定期清理过期券,在清理前可以获取到已经过期的券,用此券核销会报错。
- 该接口只返回未使用状态的券信息。
基本信息
名称 | 描述 |
---|---|
HTTP URL | https://open.douyin.com/goodlife/v1/fulfilment/certificate/prepare/ |
HTTP Method | GET |
Scope | life.capacity.fulfilment |
权限要求 |
|
请求参数
请求头
access-token必填String
示例:clt.943da17996fb5cebfbc70c044c3fc25a57T54DcjT6HNKGqnUdxzy1KcxFnZ
content-type必填String
固定值"application/json"
Query
account_idString
核销商户根账户ID(云连锁场景接入需传入,其余场景可不传)
codeString
券码明文
encrypted_dataString
从二维码解析出来的标识
(传参前需要先进行URL编码,注意不要有空格)
poi_idString
操作核销的抖音门店id
请求示例
curl --location --request GET '/goodlife/v1/fulfilment/certificate/prepare/?encrypted_data=uQ4Yj8azjf&code=DOPT756eTZ&poi_id=atlHXSgrLe&account_id=MBm9i7CUpo' \ --header 'content-type: application/json' \ --header 'access-token: 0801121846735352506a356a6' \
响应参数
Body展开全部子属性
data必填Struct
展开子属性
extraStruct
展开子属性
响应示例
正常响应示例异常响应示例
{ "extra": { "error_code": 0, "description": "", "sub_error_code": 0, "sub_description": "", "logid": "20241205140031400314A83E898471AC77", "now": 1733378431 }, "data": { "verify_token": "XLAkA4Xtj5", "certificates": [ { "code": "qKyv1vsG8T", "used_status_type": 1, "period_card": { "period_type": 1 }, "expire_time": 2588143798647425000, "sku": { "product_out_id": "LeCfrDaUVP", "third_sku_id": "c5NY5zxe9e", "account_id": "CPva8oyBgC", "product_id": "alLXB7cHpy", "title": "HYYUapph0X", "groupon_type": 1, "voucher_type": 1, "sku_id": "dDLiLVS2E2", "sold_start_time": 7797680545881727000, "market_price": 3987664039255119400, "sku_out_id": "UoKbyqpE29" }, "reserve_info": { "order_reserve_user_info_list": [ { "credential_numb": "nl1YnfwSqE", "credential_type": 1, "name": "jJefYRfAkc", "phone": "Qdgy2mn1dY" } ] }, "encrypted_code": "34Zyx271ae", "off_peak_discount_info": { "off_peak_time_range": [ { "start_time": 7588081179764293000, "end_time": 3821550575145068500, "daily_time_range_list": [ { "end_time_is_next_day": false, "start_time": "xWAIPg2PVU", "end_time": "32jnBHx74Q" } ], "week_day_list": [ 1 ] } ], "idle_time_limit_type": 1, "has_off_peak_discount": false }, "time_card": { "times_count": 7104246587183239000, "times_used": 8002153215266788000, "serial_amount_list": [ { "serial_numb": 5601524604444894000, "amount": { "coupon_pay_amount": 2929786629225449000, "list_market_amount": 752217394470896400, "origin_list_market_amount": 5569461418186409000, "payment_discount_amount": 3084672490084290600, "original_amount": 6523764455893153000, "brand_ticket_amount": 3116631006204515000, "pay_amount": 4170742046610946000, "merchant_ticket_amount": 8134413643123718000, "platform_discount_amount": 2010359962152812300, "original_currency": "PQ1vx8XO3P" } } ] }, "status": 1, "additional_map": { "1": "v4elEj0SKv" }, "use_time_info": { "time_period_list": [ { "end_time": "itKn48lfVi", "end_time_is_next_day": false, "start_time": "b5pzxCp4uw" } ], "use_time_type": 1 }, "verify_records": [ { "poi_id": 6071698594846507000, "times_card_serial_num": 5744036616259238000, "verify_id": "KOTMzgllQo", "certificate_id": "Rd2qEpNOba", "verify_time": 1822562468483233300, "can_cancel": false, "verify_type": 1, "verifier_unique_id": "ZeH3PmAkB3" } ], "certificate_id": 2074977582346483200, "start_time": 2374571693139982000, "amount": { "merchant_ticket_amount": 7565560942504879000, "list_market_amount": 707117733873182800, "brand_ticket_amount": 926850927954306600, "payment_discount_amount": 8876567495085536000, "coupon_pay_amount": 188313586218436600, "original_currency": "bmRv367Qkv", "original_amount": 8503398242371390000, "platform_discount_amount": 122556460503013580, "pay_amount": 9191926715653895000, "origin_list_market_amount": 6939374808161910000 }, "book_info": { "book_product_number": 7112842790617689000, "book_poi_id": "lV0qLmma8F" }, "verify": { "verify_type": 1, "verifier_unique_id": "bcz9Pio7XW", "poi_id": 3504645738868843000, "times_card_serial_num": 8262694491223852000, "verify_id": "crF5xYrjmP", "certificate_id": "yYM35pOgI1", "verify_time": 347883116199598500, "can_cancel": false }, "not_available_time_info": { "fulfil_enable": false, "can_no_use_week_day": [ 2368827295262755000 ], "can_no_use_date": [ { "end_time": 7366582737037923000, "start_time": 8789571860900993000 } ] } } ], "order_id": "SmdLc0Jy3B", "certificates_v2": [ { "period_card": { "period_type": 1 }, "used_status_type": 1, "sku": { "third_sku_id": "zw2KpI8ebS", "sold_start_time": 7534082682010100000, "groupon_type": 1, "product_out_id": "2XtiZhABBe", "voucher_type": 1, "market_price": 3405700558912024600, "title": "LAJRrteFoY", "sku_out_id": "G6EecP5sP2", "sku_id": "3l24obevaF", "account_id": "aqZzLXstIW", "product_id": "tJ2VN9XBMw" }, "amount": { "payment_discount_amount": 1993257547774895900, "pay_amount": 7296045109172376000, "merchant_ticket_amount": 7299809633912676000, "original_currency": "kVlnlJQGsZ", "brand_ticket_amount": 5318842092557397000, "origin_list_market_amount": 7361418856438301000, "original_amount": 7898686770932767000, "platform_discount_amount": 251860340336557860, "list_market_amount": 6286013841595807000, "coupon_pay_amount": 7281292934182999000 }, "verify": { "can_cancel": false, "verify_type": 1, "verifier_unique_id": "6it4Z5pkqY", "poi_id": 8110554758496166000, "times_card_serial_num": 7948288914187012000, "verify_id": "r7N1CXilre", "certificate_id": "ZYc9zvLq8G", "verify_time": 6513664687358452000 }, "reserve_info": { "order_reserve_user_info_list": [ { "credential_numb": "g6swwVu6tM", "credential_type": 1, "name": "DflXTltwb6", "phone": "CT99phVJsX" } ] }, "not_available_time_info": { "fulfil_enable": false, "can_no_use_week_day": [ 6495777373120782000 ], "can_no_use_date": [ { "end_time": 2757954010393358300, "start_time": 7840644360006608000 } ] }, "additional_map": { "1": "scKtU4HhGd" }, "code": "pFFFmIrs0O", "off_peak_discount_info": { "idle_time_limit_type": 1, "has_off_peak_discount": false, "off_peak_time_range": [ { "daily_time_range_list": [ { "start_time": "iOVfxxYgDl", "end_time": "9YU7LzRilv", "end_time_is_next_day": false } ], "week_day_list": [ 1 ], "start_time": 3836521361313092600, "end_time": 4958570530271457000 } ] }, "status": 1, "use_time_info": { "time_period_list": [ { "end_time_is_next_day": false, "start_time": "LZOw2lbKrG", "end_time": "ASh0ngi8BC" } ], "use_time_type": 1 }, "time_card": { "times_count": 5446331082153907000, "times_used": 6289540583422188000, "serial_amount_list": [ { "serial_numb": 6290125624810974000, "amount": { "origin_list_market_amount": 5199912695466452000, "brand_ticket_amount": 2010376488419301000, "coupon_pay_amount": 5088181840930981000, "list_market_amount": 6219255001806846000, "merchant_ticket_amount": 2949872822854520300, "payment_discount_amount": 6263027560985900000, "platform_discount_amount": 2769623504893750300, "original_currency": "6GqsROtneG", "original_amount": 5684631512886807000, "pay_amount": 7229071776170342000 } } ] }, "encrypted_code": "45gZNpvRGb", "book_info": { "book_poi_id": "80SmB48PQb", "book_product_number": 846362729680544900 }, "certificate_id": 3714061327189995500, "expire_time": 4068788952021611000, "start_time": 8988533729756625000, "verify_records": [ { "times_card_serial_num": 7615826053171955000, "verify_id": "8LF6Q8gdkX", "certificate_id": "gf9RzfF3sm", "verify_time": 2815685145645806600, "can_cancel": false, "verify_type": 1, "verifier_unique_id": "63eKdBudAF", "poi_id": 5007539181371009000 } ] } ], "error_code": 0, "description": "" } }
错误码
HTTP 状态码 | 错误码 | 错误码描述 | 排查建议 |
---|---|---|---|
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 | 3000002 | 核销门店错误 | 检查核销门店重试 |
200 | 2100001 | 未知错误 | 重试接口,重试3次仍报错联系抖音生活服务技术支持 |
200 | 2100004 | 系统繁忙,此时请开发者稍候再试 | 重试接口,重试3次仍报错联系抖音生活服务技术支持 |
200 | 2100005 | 参数不合法 | 更换参数 |
点击纠错