Orders

List the orders

GET/orders

Returns the shop's orders one page at a time, the newest first unless sort says otherwise. Each order comes as a summary, without its lines, taxes, and payment and delivery methods: getOrder returns those, and they never change after checkout.

A page holds limit orders. next_cursor leads to the next page and is null on the last page; previous_cursor leads to the page before and is null on the first page. Send a cursor back as cursor, with the same sort and updated_since as the first request; limit may change from page to page. A cursor sent with another sort is refused with 400 invalid-request.

To keep another system in sync, list the orders with sort=updated_at and updated_since, and remember the latest updated_at you saw. On the next run, send updated_since one minute before that time: updated_at is the time a change started, so a change that was still being saved during your last run can have an earlier time than the orders you saw. The orders at that boundary come again, so update your copy by the order's id. The list includes orders in every status, drafts and cancelled orders too.

Request Headers

Bearer <token>

Query Parameters

cursor?string

The next_cursor or the previous_cursor of another page, as it is. Send it with the same sort and filters as the first page.

limit?integer

How many items a page holds.

Range1 <= value <= 100
Default50
sort?string

The order of the list: created_at or updated_at, the oldest first, or with a - in front, the newest first.

Default"-created_at"

Value in

  • "created_at"
  • "-created_at"
  • "updated_at"
  • "-updated_at"
updated_since?string

Only the orders changed at this time or later, in any status. A date-time with a time zone; times have millisecond precision.

Formatdate-time

Response Headers

200, 400, 401, 404, 429, default

200, 400, 401, 404, 429, default

200, 400, 404, 429, default

200, 400, 404, 429, default

429

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/orders" \  -H "Authorization: Bearer ff_shop_…"
{  "results": [    {      "id": "string",      "number": "string",      "customer": {        "id": "string",        "first_name": "string",        "last_name": "string",        "email": "string",        "phone": "string"      },      "status": "draft",      "payment_status": "deferred",      "fulfillment_status": "on_hold",      "paid_amount": 0,      "refunded_amount": 0,      "grand_total_amount": 0,      "currency": "string",      "created_at": "string",      "approved_at": "string",      "paid_at": "string",      "settled_at": "string",      "manufactured_at": "string",      "dispatched_at": "string",      "cancelled_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string",  "previous_cursor": "string"}