SmakeSmake API Docs
EndpointsOrders

Create order

POST
/orders

Background processing

When you create an order, this happens asynchronously. You can use Polling or Webhooks for status updates. In this endpoint, a new product variant is created implicitly for every order item. There is always a reference on the requested data in the variant object. You can also use all the design features from the design variant endpoint within the variant object within an order item. See Design Variant. Therefore, you will already receive the new order id in the header for later reference.

The current state of the asynchronous process is represented due the following states:

StateMeaning
draftThe initial state of a new order.
checkingOrder is processed automatically in background. For example images will be generated or downloaded or the variant will be designed.
failedSomething went wrong during the checking process. The reason can be found in the failure_message attribute. For example, an image could not be downloaded.
preparingThe order is processed manually by the producer. For example, digitalization tasks are in process.
preparedThe manual process is finished and the production process is running.
cancelledThe order is cancelled manually.
completedThe production process is completed. The order will be delivered to the customer.

The response is a 202 Accepted without a body: the X-Identifier header is the new generated order id for later reference, the Location header points to the background job.

See the Further post order examples among the request examples: Create order with designing a variant with media ids and Create order with own shipping documents.

AuthorizationbearerAuth

Authorization

bearerAuth
AuthorizationBearer <token>

API token as bearer token — you receive a test and a live token, there is no switch between them. See Setup → Authentication and Setup → Test mode.

In: header

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"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The attributes to create an order. The order is processed asynchronously — see Create order.

Response Body

application/json

application/json

Request example
curl -X POST "https://example.com/orders" \  -H "Accept: application/json" \  -H "Content-Type: application/json" \  -d '{    "customer": {      "email": "[email protected]"    },    "items": [      {        "variant": {          "type": "basic",          "id": 25        },        "quantity": 3      }    ],    "shipping_address": {      "first_name": "Max",      "last_name": "Mustermann",      "street1": "Am Wassermann 361",      "zip": "508291",      "city": "Köln",      "country_code": "DE",      "phone": "+49 123 456 789",      "email": "[email protected]"    },    "shipments": [      {        "shipping_method": {          "handle": "shipping-method-handle"        }      }    ],    "payments": [      {        "payment_method": {          "handle": "payment-method-handle"        }      }    ]  }'
Empty