跳转到主要内容
核销激活码
curl --request POST \
  --url https://api.example.com/api/v1/projects/{project_id}/codes/verify \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "code": "<string>",
  "verified_by": "<string>"
}
'
{
  "success": true,
  "code_id": "<string>",
  "code": "<string>",
  "verified_at": 123,
  "message": "<string>",
  "error_code": "<string>"
}
核销指定项目下的激活码。请求体需包含 code(必需),可选 verified_by 用于记录核销方。仅当激活码处于未使用、未禁用、未过期且项目启用时核销成功。响应中 success=true 表示核销成功,success=false 时查看 error_codemessage 获取失败原因(如 CODE_ALREADY_USEDCODE_EXPIRED 等)。

授权

X-API-Key
string
header
必填

API Key + X-Timestamp + X-Signature(HMAC-SHA256)

路径参数

project_id
string
必填

请求体

application/json
code
string
必填
verified_by
string

响应

核销结果(success=true 成功,success=false 业务失败)

success
boolean
code_id
string | null
code
string
verified_at
integer | null
message
string
error_code
string | null