SmakeSmake API Docs
EndpointsPreparation Orders

Create a customer token for a preparation order

POST
/preparation-orders/{preparationOrderId}/customer-token

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
AuthorizationBearer <token>

API token of your production preparation platform, created under Configuration → API - see Setup → Authentication.

In: header

Path Parameters

preparationOrderId*integer

The ID of the preparation order.

Header Parameters

Accept*"application/json"

The API only responds with JSON - this header is mandatory on every request (see Setup → Headers).

Default"application/json"

Value in

  • "application/json"

Response Body

application/json

application/json

application/json

application/json

Request example
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"}