1. Open
dy-gateway
  • Health
    • 健康检查
      GET
  • Open
    • 统一券核销入口
      POST
    • 验券准备
      POST
    • 获取当前抖音 access_token
      GET
    • 查询门店信息
      GET
  • Internal
    • 查询核销流水
      GET
    • 查询核销汇总报表
      GET
    • 创建核销端应用
      POST
    • 查询核销端应用列表
      GET
    • 修改应用 token 读取权限
      PATCH
  • 数据模型
    • HealthResponse
    • ErrorResponse
    • MessageResponse
    • AppStatus
    • VerificationStatus
    • EnrichmentStatus
    • OrderStatus
    • PrepareCouponRequest
    • VerifyCouponRequest
    • VerificationView
    • VerificationResponse
    • AccessToken
    • AccessTokenResponse
    • VerifierApp
    • CreateAppResponseData
    • CreateAppRequest
    • CreateAppResponse
    • AppListResponse
    • UpdateTokenAccessRequest
    • VerificationListResponse
    • VerificationSummaryRow
    • VerificationSummaryResponse
  1. Open

验券准备

POST
/v1/open/coupons/prepare
对外开放抖音 certificate.prepare 能力。
调用方可传 poi_id + short_link 或 poi_id + code。
short_link 模式下服务端会先解析短链得到 object_id,code 模式下则直接透传抖音明文券码,
然后调用抖音 prepare 接口。成功时直接返回抖音原始 JSON,不再包装网关 data。
根据抖音官方说明,prepare 只用于为本次后续验券拿到可用的 encrypted_code;prepare 与 verify 的调用次数应一一对应。
如果后续走本网关的 short_link / code 核销模式,这个对应关系由网关内部完成;
如果后续走 encrypted_code 直传模式,则表示调用方自己持有一次上游 prepare 返回的 encrypted_code,网关不会再重复 prepare。

请求参数

Authorization
API Key
在 header 添加参数
X-Client-Key
示例:
X-Client-Key: ********************
API Key
在 header 添加参数
X-Timestamp
示例:
X-Timestamp: ********************
API Key
在 header 添加参数
X-Nonce
示例:
X-Nonce: ********************
API Key
在 header 添加参数
X-Signature
示例:
X-Signature: ********************
or
Body 参数application/json必填

示例
{
    "poi_id": "7182937465123456789",
    "short_link": "https://v.douyin.com/i5Qw3X7Y/"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST '/v1/open/coupons/prepare' \
--header 'X-Client-Key: <api-key>' \
--header 'X-Timestamp: <api-key>' \
--header 'X-Nonce: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "poi_id": "7182937465123456789",
    "short_link": "https://v.douyin.com/i5Qw3X7Y/"
}'

返回响应

🟢200成功
application/json
prepare 成功,直接返回抖音原始响应
Body

示例
{
    "data": {
        "certificates": [
            {
                "certificate_id": "certificate-123",
                "encrypted_code": "ENCODED_COUPON_CODE",
                "amount": {
                    "pay_amount": 19900,
                    "coupon_pay_amount": 15900
                }
            }
        ]
    },
    "extra": {
        "error_code": 0,
        "description": "success"
    }
}
🟠400请求有误
🟠401未认证
🔴502网关错误
修改于 2026-03-16 02:28:54
上一页
统一券核销入口
下一页
获取当前抖音 access_token
Built with