Documentation Index
Fetch the complete documentation index at: https://developer.clopos.com/llms.txt
Use this file to discover all available pages before exploring further.
Errors
Every failed request in Clopos Open API v2 returns a JSON body with a consistent shape. This page documents that envelope, the HTTP status codes you can expect, and the most common errors you will encounter in practice.Error envelope
All error responses share the same top-level shape:| Field | Type | Notes |
|---|---|---|
success | boolean | Always false on error responses. Check this first rather than relying on status codes alone — the test/production mismatch response is returned with 200 OK for historical reasons. |
message | string | Free-form description suitable for logging or surfacing to an operator. Not intended to be parsed. |
error | string | Present when the gateway or upstream produced a stable error identifier. Prefer matching on this when branching in code. |
Status codes
| Status | When you will see it |
|---|---|
200 OK | Success. Also, unusually, the test/production mismatch rejection at /v2/auth. |
400 Bad Request | Missing required fields, invalid integrator_id, or invalid parameters forwarded from the upstream Clopos API. |
401 Unauthorized | Missing, invalid, or expired x-token; integrator disabled; test/production mismatch on authenticated endpoints; upstream auth rejected. |
404 Not Found | The requested resource (receipt, customer, order, etc.) does not exist in the targeted brand + venue. |
429 Too Many Requests | You exceeded the rate limit. See Rate limits. |
500 Internal Server Error | Unhandled gateway error. These are reported to Sentry automatically; if you see them persistently, contact support with the timestamp and your integrator_id. |
504 / timeout | The upstream Clopos API did not respond within 8 seconds. Safe to retry idempotent requests. |
Common errors
Missing x-token
x-token header. Every v2 endpoint except /v2/auth requires it.
Invalid or malformed token
Expired token
/v2/auth again to obtain a fresh token, then retry the original request.
The
expires_at in this error body is an ISO 8601 string, while the expires_at returned by /v2/auth is a Unix timestamp in seconds. Parse each accordingly.Invalid integrator_id at /v2/auth
integrator_id is not registered with Clopos or has been disabled. Request a new one via this form.
Test integrator hitting a production brand
integrator_id or target a non-production brand. See Core concepts → Test vs production integrators.
Missing required field at /v2/auth
Resource not found
x-venue you are using (explicit header or JWT default) matches the venue where the resource lives.
Retry guidance
| Status | Safe to retry? |
|---|---|
400 | No — fix the request first. |
401 | Only after re-authenticating. |
404 | No — the resource does not exist. |
429 | Yes, after the window indicated by RateLimit-Reset. |
500 | Yes, with exponential backoff. If it persists, contact support. |
Timeout / 504 | Yes for idempotent requests (GET). For non-idempotent requests, check the server state first to avoid duplicates. |
Reporting a bug
If you encounter an error you cannot explain, contact dev@clopos.com with:- The full request (method, URL, headers except
x-token, and body). - The full response (status code, headers, body).
- Your
integrator_idandbrand. - The approximate UTC timestamp.