抖音开放平台Logo
开发者文档
控制台

验券准备

收藏
我的收藏

接口说明

抖音团购券码的核销, 需要先调用本接口, 查询订单的券列表,选择要验的券,再调用验券接口,核销券码。

  1. 抖音团购券码的核销,每次都需要先调用本接口,优先查询订单的券列表,选择要验的券,再调用验券接口,核销券码,验券准备和验券接口的调用次数需要一一对应,如已经调用验券接口验券成功,则当前二维码会失效,无法继续使用验券准备接口,需要使用刷新的二维码再进行调用。
  1. 二维码扫出来是一个短链,示例:https://v.douyin.com/eHHc1ft/ ,扫码后并调用本接口可返回当前订单下可用的全部券码信息,如未返回券码信息,则说明该订单此刻无可用券码。
  2. 对短链做 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。
  3. 链接中object_id参数的值即为本接口传入的 encrypted_data 参数 I0ZwZEZpb2U1N0pjQVZxS2NJRTFSQW5WK1c4bmxvbnNWdUQ2Wk85Y1N0eHpRUFpMMmZwNTdFM2NKeWlFNDM2QT0

请仅感知链接中的 object_id 参数。其他的参数、域名、路径等信息请不要感知。以后都有优化和调整的可能。

  1. 定期清理过期券,在清理前可以获取到已经过期的券,用此券核销会报错。
  2. 该接口只返回未使用状态的券信息。

基本信息

名称描述
HTTP URL
/goodlife/v1/fulfilment/certificate/prepare/
HTTP Method
GET
Scope
life.capacity.fulfilment
权限要求
  • 需要申请权限 ,路径:抖音开放平台 > 开发者平台/服务商平台 > 控制台 > 应用详情 > 解决方案
  • 需要商家授权,路径:抖音来客 > 店铺管理 > 第三方应用授权

请求参数

请求头
access-token必填String
示例:clt.943da17996fb5cebfbc70c044c3fc25a57T54DcjT6HNKGqnUdxzy1KcxFnZ
content-type必填String
固定值"application/json"
Query
codeString
券码明文
encrypted_dataString

从二维码解析出来的标识

(传参前需要先进行URL编码,注意不要有空格)

poi_idString

操作核销的抖音门店id

请求示例
curl --location --request GET '/goodlife/v1/fulfilment/certificate/prepare/?poi_id=7o3Ol8TOYL&encrypted_data=3KIziZFQNL&code=1WBp9FN8Qp' \ --header 'content-type: application/json' \ --header 'access-token: 0801121846735352506a356a6' \

响应参数

Body展开全部子属性
data必填Struct
展开子属性
extraStruct
展开子属性
响应示例
正常响应示例异常响应示例
{ "data": { "certificates": [ { "additional_map": { "1": "eNIjTXxknk" }, "amount": { "brand_ticket_amount": 8757508454417397000, "coupon_pay_amount": 29728441062264588, "list_market_amount": 8998795046469469000, "merchant_ticket_amount": 8607826768659958000, "origin_list_market_amount": 5733189704859565000, "original_amount": 5781657105106383000, "original_currency": "bNifpaNCB3", "pay_amount": 2935609494117223400, "payment_discount_amount": 4950633377429031000, "platform_discount_amount": 3492923134220790000 }, "book_info": { "book_poi_id": "tvbwMlEyvP", "book_product_number": 6753176611245121000 }, "certificate_id": 8043856728029990000, "code": "MjXHyTjoq1", "encrypted_code": "33bYS6lFOy", "expire_time": 2024394148203346400, "not_available_time_info": { "can_no_use_date": [ { "end_time": 7570872240505055000, "start_time": 8300610018648888000 } ], "can_no_use_week_day": [ 7113160194179925000 ], "fulfil_enable": false }, "off_peak_discount_info": { "has_off_peak_discount": false, "idle_time_limit_type": 1, "off_peak_time_range": [ { "daily_time_range_list": [ { "end_time": "P4xrKNdu3j", "end_time_is_next_day": false, "start_time": "AlxNqgSoij" } ], "end_time": 8509130218160643000, "start_time": 3376840634289172500, "week_day_list": [ 1 ] } ] }, "period_card": { "period_type": 1 }, "reserve_info": { "order_reserve_user_info_list": [ { "credential_numb": "rSMdQJTlMV", "credential_type": 1, "name": "UEJyRgZr4m", "phone": "vzfjluBRVo" } ] }, "sku": { "account_id": "B8On8cwIkQ", "groupon_type": 1, "market_price": 3946052461846777300, "product_id": "k9h30aSOGy", "product_out_id": "LJ9LCrcL14", "sku_id": "4OU8VIZw5K", "sku_out_id": "uDiimgMI2N", "sold_start_time": 6778114856683095000, "third_sku_id": "YLEJQvWSwd", "title": "Bv35H8pdyy" }, "start_time": 2062071095566663400, "status": 1, "time_card": { "serial_amount_list": [ { "amount": { "brand_ticket_amount": 4850275269578403000, "coupon_pay_amount": 7619016800498397000, "list_market_amount": 1567607298529857500, "merchant_ticket_amount": 5567566124996317000, "origin_list_market_amount": 2972277269691122000, "original_amount": 4506399191045338600, "original_currency": "NCUvYD9mKm", "pay_amount": 6775340724892674000, "payment_discount_amount": 1126430088420540700, "platform_discount_amount": 5362771110849070000 }, "serial_numb": 2307790007247418000 } ], "times_count": 296815313274550900, "times_used": 3380338930666273000 }, "use_time_info": { "time_period_list": [ { "end_time": "VdlKqYHJAm", "end_time_is_next_day": false, "start_time": "H0ZF5diLfz" } ], "use_time_type": 1 }, "used_status_type": 1, "verify": { "can_cancel": false, "certificate_id": "6YKYFv7YH7", "poi_id": 5675050237621254000, "times_card_serial_num": 2995315255842872000, "verifier_unique_id": "yNrCBh4xZg", "verify_id": "yDOmQl2LPq", "verify_time": 2460339830761660000, "verify_type": 1 }, "verify_records": [ { "can_cancel": false, "certificate_id": "mybfuOLneU", "poi_id": 2120266610311785700, "times_card_serial_num": 1157530059716072000, "verifier_unique_id": "uZaapRLSZK", "verify_id": "zq1FgDjvWB", "verify_time": 3030273298051438000, "verify_type": 1 } ] } ], "certificates_v2": [ { "additional_map": { "1": "2nOwVMMxgR" }, "amount": { "brand_ticket_amount": 3628987491820384000, "coupon_pay_amount": 3435519262005576700, "list_market_amount": 6975722654639631000, "merchant_ticket_amount": 8724881513400071000, "origin_list_market_amount": 14689203442035868, "original_amount": 1005082170363921500, "original_currency": "J6HxBPqEzt", "pay_amount": 8046778571254955000, "payment_discount_amount": 3887253353567538000, "platform_discount_amount": 6410128848458061000 }, "book_info": { "book_poi_id": "zL7qqKkgK0", "book_product_number": 6066219276680500000 }, "certificate_id": 4384023711666061300, "code": "qVvzK4ut83", "encrypted_code": "NT1h1x9sU5", "expire_time": 3285557940979661000, "not_available_time_info": { "can_no_use_date": [ { "end_time": 1936435420323433200, "start_time": 7848648148650220000 } ], "can_no_use_week_day": [ 989566416602164000 ], "fulfil_enable": false }, "off_peak_discount_info": { "has_off_peak_discount": false, "idle_time_limit_type": 1, "off_peak_time_range": [ { "daily_time_range_list": [ { "end_time": "TGzru1leRh", "end_time_is_next_day": false, "start_time": "WjFScTj3ID" } ], "end_time": 1255262846424947200, "start_time": 4479039317023284000, "week_day_list": [ 1 ] } ] }, "period_card": { "period_type": 1 }, "reserve_info": { "order_reserve_user_info_list": [ { "credential_numb": "r3jEcHZsaO", "credential_type": 1, "name": "FCn0lrBrTh", "phone": "3tE6mB0695" } ] }, "sku": { "account_id": "CPCuKBFKSW", "groupon_type": 1, "market_price": 5056420564338688000, "product_id": "qSnqf1D3LR", "product_out_id": "cN6U0hhAe9", "sku_id": "CTYlWjI8pY", "sku_out_id": "YSOl11nDV3", "sold_start_time": 3078667416065764400, "third_sku_id": "ircbqJUIrw", "title": "SohNJlChEd" }, "start_time": 6376475174198830000, "status": 1, "time_card": { "serial_amount_list": [ { "amount": { "brand_ticket_amount": 7163962580374877000, "coupon_pay_amount": 8947150017376321000, "list_market_amount": 5280361849435692000, "merchant_ticket_amount": 4464579998916427000, "origin_list_market_amount": 8674025996991336000, "original_amount": 692507487334978200, "original_currency": "kYsMgW440D", "pay_amount": 1304441615374133200, "payment_discount_amount": 6160770199731247000, "platform_discount_amount": 3645564039103017500 }, "serial_numb": 3665519656512632300 } ], "times_count": 4749669090564771000, "times_used": 2094428087115627500 }, "use_time_info": { "time_period_list": [ { "end_time": "1XHLUovzBk", "end_time_is_next_day": false, "start_time": "AaWAy1SRW5" } ], "use_time_type": 1 }, "used_status_type": 1, "verify": { "can_cancel": false, "certificate_id": "u5CwCkZz7D", "poi_id": 3187780508989786600, "times_card_serial_num": 7888115294425643000, "verifier_unique_id": "0zkVTtL9i7", "verify_id": "ojkU54YhlH", "verify_time": 7572772888380283000, "verify_type": 1 }, "verify_records": [ { "can_cancel": false, "certificate_id": "PFGituedx9", "poi_id": 5027177739055346000, "times_card_serial_num": 3094551904578977000, "verifier_unique_id": "fcTBoSDUt4", "verify_id": "oGPesZJIy1", "verify_time": 7664826643465133000, "verify_type": 1 } ] } ], "order_id": "iiVhKSxyGe", "verify_token": "plpo1i1Jf0" }, "extra": { "description": "qwVbtf7spi", "error_code": 3057319937305652000, "logid": "202008121419360101980821035705926A", "now": 714369241830434000, "sub_description": "4DRqVOo5hb", "sub_error_code": 3990121412303853600 } }

错误码

HTTP 状态码错误码错误码描述排查建议
2002190002
access_token无效
调用接口重新生成access_token
2002190004
应用未获得该能力, 请去https://open.douyin.com/申请
应用申请接口权限
2002190008
access_token过期,请刷新或重新授权
规范token刷新机制,检查是否有测试环境在同步刷新token
2002119001
参数不合法
更换参数
2002119002
系统繁忙,请稍候再试
重试
2002119003
请求太过频繁,请稍后再试
重试
2002119005
应用未获商家授权
联系合作商家在商家后台发起授权,并在服务商后台同意授权
2003000001
根据实际业务错误返回
对照接口文档规范参数并重试
2004000001
根据实际业务错误返回
补充参数
2004000002
根据实际业务错误返回
对照接口文档规范参数并重试
2005000001
根据实际业务错误返回
联系抖音处理
2003000002
核销门店错误
检查核销门店重试
2002100001
未知错误
重试接口,重试3次仍报错联系抖音生活服务技术支持
2002100004
系统繁忙,此时请开发者稍候再试
重试接口,重试3次仍报错联系抖音生活服务技术支持
2002100005
参数不合法
更换参数