Commerce

List orders

List orders.

Newest placed first, or with basis=paid newest paid first.

Query Parameters

status?array<>

Repeat for several.

payment_status?array<>

Repeat for several.

period?string
Value in"today""yesterday""this_week""last_week""last_7_days""last_30_days""last_90_days""this_month""last_month""this_year""all_time"
from?string

The first day, in East Africa Time.

Formatdate
to?string

The last day, in East Africa Time.

Formatdate
basis?string

Which time the window and order apply to.

Default"created"
Value in"created""paid"
currency?string
q?string
Lengthlength <= 200
product_id?string

Orders with a line for this product. One that is not an id matches nothing.

limit?integer
Range1 <= value <= 100
Default25
cursor?string

The next_cursor of the previous page. Opaque; one that does not decode is 400 invalid_cursor.

Header Parameters

X-Request-Id?string

Your id for this request; it becomes the request_id of any error. Without it the server makes one.

curl -X GET 'https://v3.ghala.io/v1/commerce/shop/orders'
{  "items": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "status": "PENDING",      "payment_status": "UNPAID",      "currency": "string",      "total": "1500.00",      "customer_name": "string",      "customer_phone": "string",      "channel": "string",      "notes": "string",      "credential_id": "string",      "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598",      "items": [        {          "name": "string",          "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",          "image": "string",          "digital": true,          "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",          "variant_label": "string",          "quantity": 0,          "unit": "PIECE",          "unit_price": "1500.00",          "line_total": "1500.00"        }      ],      "created_at": "2019-08-24T14:15:22Z",      "paid_at": "2019-08-24T14:15:22Z",      "receipts": [        {          "provider": "ghala",          "url": "http://example.com",          "issued_at": "2019-08-24T14:15:22Z",          "kind": "payment"        }      ]    }  ],  "next_cursor": "string",  "has_more": true}