Skip to main content
GET
/
api
/
v1
/
i
/
orders
curl -X GET "https://api.example.com/api/v1/i/orders/" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "count": 45,
  "next": "https://api.example.com/api/v1/i/orders/?limit=20&offset=20",
  "previous": null,
  "results": [
    {
      "id": "a3d5c8e7-9b4f-4a2e-8c7d-1f3e5a6b9c0d",
      "url": "https://api.example.com/api/v1/i/orders/a3d5c8e7-9b4f-4a2e-8c7d-1f3e5a6b9c0d/",
      "customer": {
        "email": "[email protected]",
        "first_name": "John",
        "last_name": "Doe"
      },
      "created": "2026-03-01T10:30:00Z",
      "updated": "2026-03-01T10:35:00Z",
      "billing_address": {
        "street_address": "123 Main St",
        "postal_code": 12345,
        "city": "Anytown",
        "state": "CA",
        "country": "Canada"
      },
      "items": [
        {
          "id": 1,
          "product": {
            "id": 42,
            "name": "Wireless Headphones",
            "slug": "wireless-headphones"
          },
          "variant": 101,
          "unit_price": "79.99",
          "quantity": 2,
          "shipping": "5.00",
          "discount_amount": "10.00",
          "total_price": "159.98",
          "offer": 5
        }
      ],
      "items_count": 2,
      "savings_on_items": "10.00",
      "status": "awaiting_payment",
      "subtotal": "159.98",
      "amount_saved": "10.00",
      "shipping": "5.00",
      "total_amount": "154.98"
    }
  ]
}

Description

Returns a list of orders belonging to the authenticated customer. The results are paginated and can be filtered by order status. Orders are returned in reverse chronological order (newest first).

Authentication

Requires authentication. Include a valid authentication token in the request headers.

Query Parameters

status
string
Filter orders by status. Valid values:
  • paid - Order has been paid for
  • awaiting_payment - Order is pending payment
  • delivered - Order has been delivered
  • cancelled - Order has been cancelled
limit
integer
default:"20"
Maximum number of results to return per page
offset
integer
default:"0"
Number of results to skip before returning results

Response

count
integer
Total number of orders matching the query
next
string
URL to the next page of results (null if no more pages)
previous
string
URL to the previous page of results (null if first page)
results
array
Array of order objects
curl -X GET "https://api.example.com/api/v1/i/orders/" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "count": 45,
  "next": "https://api.example.com/api/v1/i/orders/?limit=20&offset=20",
  "previous": null,
  "results": [
    {
      "id": "a3d5c8e7-9b4f-4a2e-8c7d-1f3e5a6b9c0d",
      "url": "https://api.example.com/api/v1/i/orders/a3d5c8e7-9b4f-4a2e-8c7d-1f3e5a6b9c0d/",
      "customer": {
        "email": "[email protected]",
        "first_name": "John",
        "last_name": "Doe"
      },
      "created": "2026-03-01T10:30:00Z",
      "updated": "2026-03-01T10:35:00Z",
      "billing_address": {
        "street_address": "123 Main St",
        "postal_code": 12345,
        "city": "Anytown",
        "state": "CA",
        "country": "Canada"
      },
      "items": [
        {
          "id": 1,
          "product": {
            "id": 42,
            "name": "Wireless Headphones",
            "slug": "wireless-headphones"
          },
          "variant": 101,
          "unit_price": "79.99",
          "quantity": 2,
          "shipping": "5.00",
          "discount_amount": "10.00",
          "total_price": "159.98",
          "offer": 5
        }
      ],
      "items_count": 2,
      "savings_on_items": "10.00",
      "status": "awaiting_payment",
      "subtotal": "159.98",
      "amount_saved": "10.00",
      "shipping": "5.00",
      "total_amount": "154.98"
    }
  ]
}

Order Status Workflow

Orders progress through the following statuses:
  1. awaiting_payment - Initial state when order is created from cart
  2. paid - Order has been successfully paid
  3. delivered - Order has been shipped and delivered
  4. cancelled - Order was cancelled (can be deleted instead)

Pricing Calculations

The order pricing follows this calculation:
  • subtotal = Sum of (unit_price × quantity) for all items
  • amount_saved = Sum of discount_amount from items + voucher discount_amount
  • shipping = Sum of shipping costs for all items
  • total_amount = subtotal + shipping - amount_saved

Notes

  • Only orders belonging to the authenticated customer are returned
  • Results are ordered by creation date (newest first)
  • The items_count represents total quantity of all items, not unique items
  • Item-level discounts from active offers are preserved in discount_amount
  • Applied vouchers (if any) are included in the order’s amount_saved

Build docs developers (and LLMs) love