Skip to main content
The Admin API uses the same Stripe-style error format as the rest of the Spree v3 API. Every error response carries a machine-readable code and a human-readable message.
Debugging a failing request? The Spree CLI is the fastest probe: spree api get /orders/<id> shows the live state, and on a 403 it prints the exact missing scope plus the command to mint a key that has it.

Error response format

Validation errors include a details field with per-field error messages:
Some specialized errors carry structured details (for example, scope errors include the required_scope):

Schema

HTTP status codes

Authentication & authorization

Resources

Validation

Orders

Customers

Store credits

Tags

Payments

Examples

Insufficient scope (API key)

403

Validation error (customer create)

422

Customer with completed orders

422

Concurrent order update

409

Handling errors with the SDK

@spree/admin-sdk throws a SpreeError for every non-2xx response:

Common patterns

Branch on error code:
Retry on optimistic-lock conflicts:
Show field-level validation errors:

Optimistic locking

Orders use a state_lock_version column to detect concurrent modifications. Every state-changing operation increments it; if two callers update the same order simultaneously, the second write fails with cart_already_updated (409) — refetch and retry. This protects against race conditions when multiple clients (or the same client, retried) try to mutate the same order. Combined with idempotency at the integration level (e.g., dedupe webhook deliveries by event ID), it makes admin order management safe under concurrency.