Skip to main content

HTTP API

This page summarizes the common HTTP behavior shared by Streaming API endpoints.

Rate limits​

Endpoints are classified into tiers based on computational complexity and usage frequency.

TierDescriptionRPS
Tier 1 β€” CriticalHigh-frequency, critical actions60
Tier 2 β€” ModerateModerate-frequency, supplementary actions25
Tier 3 β€” LowLow-frequency, operational management10

When a limit is exceeded, the API returns HTTP 429 Too Many Requests with a Retry-After header.

HTTP responses​

StatusMeaning
200Request completed. Some business-level responses still need body inspection.
4xxRequest or authentication issue. Check the response body for detail.
5xxServer-side error. Retry with backoff and report if persistent.

Error body​

Most non-authentication errors use this format:

{
"error": "human readable error message",
"code": "machine_friendly_error"
}

Authentication errors use:

{
"message": "Forbidden"
}

Common error codes​

CodeMeaning
*_not_foundResource cannot be found, for example customer_not_found.
forbidden_requestResource is forbidden for this request.
invalid_requestRequest is missing a required parameter or uses an invalid value.
server_errorServer error.
customer_not_enough_scoreCustomer does not have enough balance for the operation.
customer_inactiveCustomer is inactive, so the operation cannot be executed.
voucher_redeemedVoucher is already redeemed.
voucher_expiredVoucher is expired.
voucher_inactiveCoupon/Voucher is inactive.
voucher_deletedCoupon was deleted.
voucher_out_locationVoucher cannot be redeemed in the current location.
voucher_out_dateVoucher is not yet available.
voucher_not_foundVoucher was not found, Customer was not found, or Voucher does not belong to the Customer.
exchange_not_foundScore exchange is not found for the requested location.

For server_error or unexpected errors, retry with exponential backoff: start at 1 second and increase up to 32 seconds.

Types​

TypeFormat
Integer123
Float123.45 with dot decimal separator
Stringhello
Date2016-12-31
DateTime2016-12-31T23:59:43Z
Booleantrue or false
Array[{"key": "value"}]
SlugShort label with letters, numbers, underscores, or hyphens

Dates and DateTimes must use ISO-8601 in UTC whenever possible.

Headers​

Authentication​

X-Api-Key: <api-key>
X-Api-Secret: <api-secret>
X-Api-Version: 1

Language​

For companies with multilanguage enabled, send Accept-Language to request translatable content in a specific language:

Accept-Language: en

If the language is not available, the API returns the Company's default language.

Idempotency​

Use Idempotency-Key for retryable POST, PATCH, and PUT requests that must not be processed twice.

Idempotency-Key: QknyRdIN6wECfOb5

Do not send idempotency keys on GET or DELETE requests.

Keys expire after 24 hours and cannot be reused with different request parameters.

Author email​

Some endpoints can register the author of the request through an email header. The current source documentation calls out:

  • POST /scores/transfer
  • POST /scores/trigger