List orders
An order is created when the checkout process is complete.
See: Expanding Objects
Returns a collection of created orders.
Filtering
You can filter your results as follows — every filter[...] query parameter is documented below
(ids can be combined with a comma, e.g. /orders?filter[id]=1,2,3).
See: Pagination, Filtering
Expanding objects
Related objects can be expanded inline with the expand query parameter — all allowed values are listed
on the parameter. See Expanding Objects.
AuthorizationbearerAuth
Authorization
bearerAuth 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
Query Parameters
Page number to return — see Basic Usage → Pagination.
1Number of objects per page (default 25, maximum 100) — see Basic Usage → Pagination.
value <= 10025List orders for specified id(s). Multiple ids are separated by a comma.
/orders?filter[id]=1/orders?filter[id]=1,2,3
List orders for specified state (see the state table of the order).
/orders?filter[state]=cancelled/orders?filter[state]=completed
Value in
- "draft"
- "checking"
- "checked"
- "failed"
- "preparing"
- "prepared"
- "cancelled"
- "completed"
List orders for specified external identifier.
/orders?filter[external_identifier]=organic
List orders for specified external reference.
/orders?filter[external_reference]=143000
List orders with an ID greater than the specified ID.
/orders?filter[since_id]=1/orders?filter[since_id]=2
List orders for a given date, only resources created after the provided date will be returned.
/orders?filter[created_at_min]=2017-09-27
dateList orders for a given date, only resources created before the provided date will be returned.
/orders?filter[created_at_max]=2017-11-15
dateList orders for a given date, only resources updated after the provided date will be returned.
/orders?filter[updated_at_min]=2017-09-27
dateList orders for a given date, only resources updated before the provided date will be returned.
/orders?filter[updated_at_max]=2017-09-27
dateExpand related objects inline. Several objects can be expanded at once by separating them with a comma; nested objects are addressed with a dot — see Expanding Objects. Allowed values:
order_type— Expand order type. You can show order type details here./orders?expand=order_typeitems.id_tags— Expand ID Tags for order item. You can show ID Tag details for order items here./orders?expand=items.id_tagsitems.variant— Expand the variant details for order items. You can show the content of the variant for an order item./orders?expand=items.variantitems.variant.views.customizations.resource— Expand variants customization resource. You can show the content customizations' resource of a variant for an order item./orders?expand=items.variant.views.customizations.resourcedisposition_order— Expand disposition order resource. You can show the content disposition order resource for an order./orders?expand=disposition_orderdisposition_order.production_orders— Expand production orders resource. You can show the content production orders resource of the disposition order for an order./orders?expand=disposition_order.production_ordersdisposition_order.production_orders.production— Expand production resource. You can show the content production resource for all production order for the disposition order for an order./orders?expand=disposition_order.production_orders.production
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
curl -X GET "https://example.com/orders?filter%5Bid%5D=1%2C2%2C3&filter%5Bstate%5D=cancelled&filter%5Bexternal_identifier%5D=organic&filter%5Bexternal_reference%5D=143000&filter%5Bsince_id%5D=1&filter%5Bcreated_at_min%5D=2017-09-27&filter%5Bcreated_at_max%5D=2017-11-15&filter%5Bupdated_at_min%5D=2017-09-27&filter%5Bupdated_at_max%5D=2017-09-27&expand=order_type" \ -H "Accept: application/json"GET /orders HTTP/1.1
{ "data": [ { "id": 1, "order_type": 1, "is_test": true, "has_pending_preparation_logo": false, "external_identifier": null, "external_reference": "et", "number": null, "cost_centre": "lorem 12345", "state": "completed", "failure_message": null, "customer_locale": "en", "currency": "EUR", "total": 57.2, "subtotal": 52, "total_tax": 5.2, "total_items_price": 52.8, "shipping_total": 4.4, "discount_total": 0, "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:11:03+00:00", "ordered_at": "2017-09-27T10:11:03+00:00", "cancelled_at": null, "items": [ { "id": 1, "is_test": 1, "external_identifier": null, "quantity": 4, "total": 52.8, "price": 12, "total_tax": 4.8, "tax_rate": 10, "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:11:03+00:00", "cancelled_at": null, "variant": 27, "id_tags": [ 1 ] } ], "disposition_order": 54, "customer": { "id": 40, "is_test": 1, "email": "[email protected]", "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:11:03+00:00" }, "shipping_address": { "id": 45, "is_test": 1, "company": "MyCompany", "first_name": "John", "last_name": "John", "city": "Anytown", "street1": "123 Main St", "street2": null, "zip": "12345", "phone": "12345 67890", "email": "[email protected]", "province_code": "NW", "country_code": "DE", "vat_in": null, "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:10:59+00:00" }, "billing_address": { "id": 44, "is_test": 1, "company": "MyCompany", "first_name": "John", "last_name": "Doe", "city": "Anytown", "street1": "123 Main St", "street2": null, "zip": "12345", "phone": "12345 67890", "email": "[email protected]", "province_code": "NW", "country_code": "DE", "vat_in": null, "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:10:59+00:00" }, "whitelabel_address": null, "payments": [ { "payment_method": { "id": 1, "name": "Rechnung", "handle": "invoice", "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:10:59+00:00" } } ], "shipments": [ { "id": 1, "is_test": 1, "shipping_method": { "is_test": 1, "order_id": 1, "handle": "pickup", "title": "Pickup", "price": 0 }, "tracking_number": "2229446017085", "media": [], "order": 1, "created_at": "2021-02-24T11:04:46+01:00", "updated_at": "2021-02-25T11:35:50+01:00" } ] }, { "id": 2, "order_type": 1, "is_test": true, "has_pending_preparation_logo": false, "external_identifier": null, "external_reference": "dicta", "number": null, "cost_centre": "ipsum 8765", "state": "prepared", "failure_message": null, "customer_locale": "en", "currency": "EUR", "total": 28.6, "subtotal": 26, "total_tax": 2.6, "total_items_price": 22, "shipping_total": 6.6, "discount_total": 0, "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:11:03+00:00", "ordered_at": "2017-09-27T10:11:03+00:00", "cancelled_at": null, "items": [ { "id": 1, "is_test": 1, "external_identifier": null, "quantity": 4, "total": 22, "price": 20, "total_tax": 2, "tax_rate": 10, "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:11:03+00:00", "cancelled_at": null, "variant": 53, "id_tags": [ 2 ] } ], "disposition_order": 54, "customer": { "id": 40, "is_test": 1, "email": "[email protected]", "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:11:03+00:00" }, "shipping_address": { "id": 47, "is_test": 1, "company": "MyComapny", "first_name": "John", "last_name": "Doe", "city": "Anytown", "street1": "123 Main St", "street2": null, "zip": "12345", "phone": "12345 67890", "email": "[email protected]", "province_code": "BW", "country_code": "DE", "vat_in": null, "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:10:59+00:00" }, "billing_address": { "id": 46, "is_test": 1, "company": "MyCompany", "first_name": "John", "last_name": "Doe", "city": "Anytown", "street1": "123 Main St", "street2": null, "zip": "12345", "phone": "12345 67890", "email": "[email protected]", "province_code": "BY", "country_code": "DE", "vat_in": null, "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:10:59+00:00" }, "whitelabel_address": null, "payments": [ { "payment_method": { "id": 1, "name": "Rechnung", "handle": "invoice", "created_at": "2017-09-27T10:10:59+00:00", "updated_at": "2017-09-27T10:10:59+00:00" } } ], "shipments": [ { "id": 1, "is_test": 1, "shipping_method": { "is_test": 1, "order_id": 2, "handle": "pickup", "title": "Pickup", "price": 0 }, "tracking_number": "2229446017086", "media": [], "order": 2, "created_at": "2021-02-24T11:04:46+01:00", "updated_at": "2021-02-25T11:35:50+01:00" } ] } ], "links": { "first": "https://api.smake.io/v2/orders?page=1", "last": null, "prev": null, "next": "https://api.smake.io/v2/orders?page=2" }, "meta": { "current_page": 1, "from": 1, "path": "https://api.smake.io/v2/orders", "per_page": 25, "to": 25 }}List payment methods GET
The endpoint lists all available payment methods that can be transferred in the endpoint [orders](/docs/checkout/2022-02-01/endpoints/orders/createOrder). ## List Returns a collection of payment methods. ### Filtering You can filter your results as follows: ##### List payment methods for specified id(s) * `/payment-methods?filter[id]=1` * `/payment-methods?filter[id]=1,2,3` ##### List payment methods for specified name(s) * `/payment-methods?filter[name]=Invoice` * `/payment-methods?filter[name]=Invoice,Credit Card` ##### List payment methods for specified handle(s) * `/payment-methods?filter[handle]=invoice` * `/payment-methods?filter[handle]=invoice,credit-card` > **Info:** See: [Pagination](/docs/checkout/2022-02-01/basic/pagination), [Filtering](/docs/checkout/2022-02-01/basic/filtering)
Create order POST
**Background processing** When you create an order, this happens asynchronously. You can use [Polling](/docs/checkout/2022-02-01/basic/polling) or [Webhooks](/docs/checkout/2022-02-01/basic/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](/docs/checkout/2022-02-01/basic/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](/docs/checkout/2022-02-01/endpoints/variants/designVariant). 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: | State | Meaning | |-------|---------| | `draft` | The initial state of a new order. | | `checking` | Order is processed automatically in background. For example images will be generated or downloaded or the variant will be designed. | | `failed` | Something went wrong during the checking process. The reason can be found in the `failure_message` attribute. For example, an image could not be downloaded. | | `preparing` | The order is processed manually by the producer. For example, digitalization tasks are in process. | | `prepared` | The manual process is finished and the production process is running. | | `cancelled` | The order is cancelled manually. | | `completed` | The 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*.