Skip to main content
GET
/
api
/
v1
/
i
/
orders
/
{id}
curl -X GET "https://api.example.com/api/v1/i/orders/a3d5c8e7-9b4f-4a2e-8c7d-1f3e5a6b9c0d/" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "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,
      "created": "2026-03-01T10:30:00Z",
      "updated": "2026-03-01T10:30:00Z"
    },
    {
      "id": 2,
      "product": {
        "id": 58,
        "name": "Phone Case",
        "slug": "phone-case"
      },
      "variant": 203,
      "unit_price": "15.99",
      "quantity": 1,
      "shipping": "3.00",
      "discount_amount": "0.00",
      "total_price": "15.99",
      "offer": null,
      "created": "2026-03-01T10:30:00Z",
      "updated": "2026-03-01T10:30:00Z"
    }
  ],
  "items_count": 3,
  "savings_on_items": "10.00",
  "status": "awaiting_payment",
  "subtotal": "175.97",
  "amount_saved": "10.00",
  "shipping": "8.00",
  "total_amount": "173.97"
}

Description

Returns complete details for a single order, including all order items, pricing calculations, and billing address.

Authentication

Requires authentication. The order must belong to the authenticated customer.

Path Parameters

id
uuid
required
The unique identifier of the order to retrieve

Response

id
uuid
Unique identifier for the order
url
string
API endpoint URL for this specific order
customer
object
Customer information
created
datetime
Timestamp when the order was created
updated
datetime
Timestamp when the order was last updated
billing_address
object
Billing address for the order
items
array
Array of order items with complete product details
items_count
integer
Total number of items in the order (sum of all item quantities)
savings_on_items
decimal
Total savings from promotional offers applied to items
status
string
Current order status: paid, awaiting_payment, delivered, or cancelled
subtotal
decimal
Sum of all item total prices (before shipping and voucher discounts)
amount_saved
decimal
Total discount amount from both vouchers and item-level offers
shipping
decimal
Total shipping cost for all items in the order
total_amount
decimal
Final order total: subtotal + shipping - amount_saved
curl -X GET "https://api.example.com/api/v1/i/orders/a3d5c8e7-9b4f-4a2e-8c7d-1f3e5a6b9c0d/" \
  -H "Authorization: Bearer YOUR_TOKEN"
{
  "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,
      "created": "2026-03-01T10:30:00Z",
      "updated": "2026-03-01T10:30:00Z"
    },
    {
      "id": 2,
      "product": {
        "id": 58,
        "name": "Phone Case",
        "slug": "phone-case"
      },
      "variant": 203,
      "unit_price": "15.99",
      "quantity": 1,
      "shipping": "3.00",
      "discount_amount": "0.00",
      "total_price": "15.99",
      "offer": null,
      "created": "2026-03-01T10:30:00Z",
      "updated": "2026-03-01T10:30:00Z"
    }
  ],
  "items_count": 3,
  "savings_on_items": "10.00",
  "status": "awaiting_payment",
  "subtotal": "175.97",
  "amount_saved": "10.00",
  "shipping": "8.00",
  "total_amount": "173.97"
}

Order Pricing Breakdown

The order total is calculated as follows:

Item-Level Calculations

For each item:
  • unit_price: Price per unit after offer discounts are applied
  • total_price: unit_price × quantity
  • discount_amount: (original_price - unit_price) × quantity

Order-Level Calculations

  • subtotal: Sum of all item total_price values
  • savings_on_items: Sum of all item discount_amount values
  • shipping: Sum of all item shipping costs
  • amount_saved: savings_on_items + voucher discount (if applied)
  • total_amount: subtotal + shipping - amount_saved

Order Status Workflow

1

Order Created

Status: awaiting_paymentOrder is created from the customer’s cart and awaits payment.
2

Payment Processed

Status: paidCustomer completes payment successfully.
3

Order Delivered

Status: deliveredOrder has been shipped and delivered to the customer.
Alternatively, an order can be:
  • cancelled: Marked as cancelled (or deleted entirely)

Notes

  • Only the order owner can retrieve their order details
  • The order includes historical offer information that was active when items were added
  • Expired offers are preserved in order history for record-keeping
  • The items_count is the sum of quantities, not the number of unique items

Build docs developers (and LLMs) love