A human-readable explanation you can show to operators or log for support. When a message
refers to a product, it uses the
productCode you sent in the request.Request ID
Every response, including errors, carries anX-Request-Id header. Log it with the error
and include it when you contact [email protected]:
it lets Kalixo find the exact request.
X-Request-Id (8 to 64 letters, digits,
- or _). Kalixo uses it and echoes it back; otherwise Kalixo generates one.
Placeholders below use
{productCode}, {reference}, {min}, {max}, {expected},
{productCurrency}, {requested}, {country}, {countries}, {reason} and {seconds}
for values that depend on your request. All other text is returned exactly as shown.Status codes
Authentication (401)
See Authentication for examples.
Rate limiting (429)
The
Retry-After response header matches {seconds}. See Rate limits.
Catalog (404)
Returned by GET /catalog/products/{productCode}, and by POST /orders for an order line,
when the productCode is not in your active catalog or cannot be ordered.
Orders - request validation (400)
Returned by POST /orders when the request body fails checks before the order is accepted.
Prices in mismatch and denomination messages are in minor units (same as the catalog), e.g.
10000 = 100.00.
{countries} is the product’s availableCountries, comma-separated. Send one of them as
country on the line; see Regional products.Orders - rejected at placement (400)
Returned by POST /orders when the order cannot be accepted after validation.
Orders - forbidden (403)
Orders - conflict (409)
Returned when another request with the same new externalOrderCode was being placed at the
same moment. The order exists: fetch it with GET /orders/{externalOrderCode}. A repeat of a
code that was already placed returns 202 with the existing order instead; see
Idempotency.
Orders - unprocessable (422)
Orders - not found (404)
Returned by GET /orders/{reference}.
{reference} is the path value you sent (the UUID orderId or your externalOrderCode).
Orders - bad gateway (502)
Returned when the order cannot be created or processing is temporarily unavailable.
Server errors (500)
Returned when an unexpected error occurs. Retry with backoff; contact support if the problem persists.
The
error field is omitted on some 500 responses.
Handling errors in your integration
1
Log statusCode, message and X-Request-Id
Persist all three for support and retries. Treat
message as human-readable text.2
Map by productCode
When
message starts with Product {productCode}, attach the error to that line in your cart or order payload.3
Retry only when appropriate
Retry
429 after Retry-After, and 500 and 502 with backoff. Retrying POST /orders with the
same externalOrderCode never creates a second order. On 409, fetch the order instead of
retrying. Do not retry 400, 403, 404, or 422 without fixing the request.4
Refresh catalog on configuration errors
If you see “not available for ordering with the supplied country or currency”, re-fetch the product from
GET /catalog/products and verify countryCode, price, and open-denomination bounds.