Skip to navigation

Response codes

Status values, error format, and rate limits
View as Markdown

Every Admoji API response returns a top-level Status field. Successful calls return 0; failures return 1 (validation) or 2 (server error) along with an ErrorMessage.

Status values

StatusMeaningHTTP class
0Success2xx
1Validation error — see ErrorMessage4xx
2Internal server error5xx
Success
{ "Status": 0, "CustomerID": 12345 }
Validation error
{ "Status": 1, "ErrorMessage": "email is required" }
Server error
{ "Status": 2, "ErrorMessage": "processor timeout, retry with same idempotency key" }

Handling errors

  • Retry Status: 2 responses with the same Idempotency-Key — the server will return the cached success if the operation actually completed, or re-attempt it if not. See Idempotency.
  • Do not retry Status: 1 without changing the request — validation failures are deterministic.
  • Log the full response body (including ErrorMessage) to make support requests actionable.

Rate limits

Most list endpoints are rate-limited to 20 requests per second per ApiKey and return a maximum of 1000 records per call.

To page through larger result sets, use cursor parameters returned by the endpoint:

Endpoint familyCursor field
CustomerscustomerIDafter
TransactionstxnCrmIDAfter

Exceeding the rate limit returns Status: 1 with ErrorMessage: "rate limit exceeded". Back off and retry with jitter.