List affiliate voucher codes and deals for your publisher.
Header Parameters
Query Parameters
Accepted but not used yet. Every call returns the full list, whatever you send, so don't rely on it to fetch only changes. Use the VOUCHERS_UPDATED webhook to hear about changes.
011-based page number, 50 vouchers per page. Omit it to get every voucher at once.
Only return vouchers with this status. Omit it to get every live voucher.
Response
Voucher list.
Response Attributes
Show child attributes
Authentication failed. The body is {"status": false, "message": ...} with one of:
Access denied - token missing (no Authorization: Bearer header),
Unauthorized - Invalid or expired token (bad or expired token; tokens live 10 hours),
or Token expired - request a new token (Spendstream revoked your tokens). In every case
call getToken again.
Response Attributes
Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.
Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.
Alternative error message field used by a subset of endpoints (notably getToken
and authentication failures). Integrators should check for both message and
error when parsing failure responses.
Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on
most error paths; a few auth-layer failures omit it.
Your publisher account has an IP allow-list and the request came from an address that is not on it. The API checks the caller's IP address on every request once a list exists. Ask Spendstream to add the address, or to clear the list if you do not want the restriction. See IP allow-listing in the guide.
Response Attributes
Too many requests. Limits: getToken allows 5 calls a minute per IP address and API key,
60 a minute per IP address across all keys, and 30 a minute per API key across all IP addresses. Calls with no bearer token are limited to
20 a minute per IP address. The order endpoints (giftCardRequestApi, paymentLink,
getPayByBankLink) share a per-publisher order limit (60 a minute unless agreed otherwise). Over it the
request is refused with 429 and a Retry-After header, before any order is made. Wait and
retry with exponential backoff. When a Retry-After header is present, wait at least that
many seconds; the getToken limit does not send one.
Response Attributes
Human-readable failure reason. Safe to surface to integrators but not end-users. The wording can change, so match on error-code instead.
Stable, machine-readable code for the error (for example user_not_found, order_already_paid). Match on this, not on message. New codes can be added at any time; treat an unknown code like a generic error for its response status. Send the request header X-Spendstream-Errors: http to get the real HTTP status on errors that are otherwise answered with HTTP 200.
Alternative error message field used by a subset of endpoints (notably getToken
and authentication failures). Integrators should check for both message and
error when parsing failure responses.
Numeric status code echoing the HTTP status (e.g. 400, 401). Populated on
most error paths; a few auth-layer failures omit it.