Skip to main content
核销激活码
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>"
}
Verifies (redeems) a code for the project. Request body must include code (required); optional verified_by records who verified. Succeeds only when the code is unused, not disabled, not expired, and the project is enabled. Response success=true means success; when success=false, check error_code and message (e.g. CODE_ALREADY_USED, CODE_EXPIRED).

Authorizations

X-API-Key
string
header
required

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

Path Parameters

project_id
string
required

Body

application/json
code
string
required
verified_by
string

Response

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

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