Skip to content
platform

Get started

Errors

Codes

Each endpoint page lists that endpoint's errors, with the exact body. The general meaning of each code in the collection is this.

CodeWhen it happens
400A body that is not valid JSON, an invalid path identifier, or a resource that does not exist or does not belong to the token's store.
401Missing, malformed or expired token. Authenticate again and repeat the call.
403The branch in the path is not linked to the token's head office.
404The requested resource was not found.
422The request was understood and rejected by a rule: missing required field, empty or oversized batch, a state that does not allow the operation.

Two body formats

On most endpoints the error comes in an object with an error field. The collection records an exception on the bulk inventory routes, which respond with code, message and errorDescription. Handle both formats.

{"error":"authorization header is invalid"}

200 does not mean everything went in

Batch operations respond 200 even when some items are rejected: the response separates what was accepted from what was not. That is the case for bulk inventory and for adding customers and products to a contract. Read the response body and reprocess only what was rejected.

A 400 that is not your error

On the cashback balance by customer listing, 400 with no record found means the store has no records or offset went past the end of the list. The collection treats that as the end of pagination, not as an invalid request.

Get started

Generated from the public API collection, published on 2026-09-04: api-docs.cws.digital.