Skip to main content
POST
Redeem a reward for a customer

Authorizations

X-API-Key
string
header
required

Per-company partner API key (zupy_pk_…). Validated by Zupy against the company integration key hash (Story 14.x); send it on every request as the X-API-Key header. Scoped read-write to the owning company's data.

Headers

X-OTP-Session
string

OTP session token returned by POST /auth/verify-otp/. REQUIRED when the company's integration OTP policy enables it (require_otp_for_redemption for redeem, require_otp_for_coupon_usage for validate). Omitting it returns 403 with code "otp-required".

Path Parameters

id
string
required

Unique identifier for this customer.

reward_id
string
required

Body

Reward redemption request parameters.

use_z_tokens
boolean
default:false

Response

Reward redemption result with generated coupon code and points/Z$ deducted.

customer_id
string
required
coupon_code
string
required
points_used
integer
required
z_tokens_used
string<decimal> | null
required
Pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
new_balance
integer
required
new_z_balance
string<decimal> | null
required
Pattern: ^-?\d{0,12}(?:\.\d{0,6})?$
valid_until
string<date-time>
required
created_at
string<date-time>
required