Skip to main content
POST
Redeem a voucher

Nagłówki

cf-turnstile-response
string

Turnstile token (instead of the turnstileToken field). Optional; required only after a burst of attempts from one IP (CAPTCHA_REQUIRED)

Parametry ścieżki

shopId
string
wymagane

Shop ID (ObjectId). Also accepts the uniqueName, an active custom domain or <uniqueName>.<hosting domain>.

Przykład:

"664f1a2b3c4d5e6f7a8b9c0d"

Treść

application/json
code
string
wymagane

Voucher code (case-insensitive)

Pattern: ^[A-Z0-9]{4,12}$
Przykład:

"ABC123"

nick
string
wymagane

Minecraft player nickname

Pattern: ^[a-zA-Z0-9_]{3,16}$
Przykład:

"Steve"

email
string<email>

E-mail for digital content when the voucher product has it (deliveryKind ≠ commands). Without it, collect the content via GET /orders/by-number/{n}/delivery

Maximum string length: 254
Przykład:

"jan@example.com"

turnstileToken
string

Cloudflare Turnstile token (or the cf-turnstile-response header). Optional — adaptive like checkout: required only after 403 CAPTCHA_REQUIRED

Required string length: 1 - 4096

Odpowiedź

success
boolean
wymagane
Przykład:

true

data
object
wymagane