Create a customer token for a preparation order
Creates a short-lived customer token for one preparation order. The Smake web component authenticates the customer approval of this order with it (see Setup → Authentication).
A token can only be created for an order that requires the customer approval, while the order is released, i.e. awaiting the customer approval. Each call revokes the previously created token of the order. The token is valid until expires_at (6 hours by default) and is revoked as soon as the decisions are submitted, by the customer in the web component or in the production preparation platform.
AuthorizationBearer
Authorization
apiToken API token of your production preparation platform, created under Configuration → API - see Setup → Authentication.
In: header
Path Parameters
The ID of the preparation order.
Header Parameters
The API only responds with JSON - this header is mandatory on every request (see Setup → Headers).
"application/json"Value in
- "application/json"
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/preparation-orders/1/customer-token" \ -H "Accept: application/json"{ "token": "42|Zx8b3QhL0pVd7mKc1sYt9wNf2rGe6uAj4oXi5HnB", "expires_at": "2026-10-02T14:00:00+00:00"}