API Key (Required)
Every request to the Store API requires a publishable API key. This key identifies your storefront and is safe to use in client-side code. Pass the key via theX-Spree-Api-Key header:
spree_pk_. You can create them in the Spree Admin under Settings > API Keys or via the Spree CLI:
JWT Token (Authenticated Customer)
For actions that require a logged-in customer (viewing orders, managing addresses, saved payment methods), use a JWT bearer token in addition to the API key.Login
Register
Token Refresh
JWT tokens expire after 1 hour by default. Use the refresh endpoint to get a new token:Order Token (Guest Checkout)
For guest checkout flows, use the order token returned when creating a cart. This allows unauthenticated users to manage their cart and complete checkout. Pass the token via theX-Spree-Order-Token header or order_token query parameter:
Associating a Guest Cart
After a guest user logs in, you can associate their guest cart with their account:Authentication Summary
| Method | Header | Use Case |
|---|---|---|
| API Key | X-Spree-Api-Key: spree_pk_xxx | All requests (required) |
| JWT Token | Authorization: Bearer <token> | Authenticated customer actions |
| Order Token | X-Spree-Order-Token: <token> | Guest cart and checkout |

