Order JSON Example

A standard order object for checkout and order history.

Example

{
  "orderId": "ORD-1001",
  "customer": {"id": 42, "name": "Ada Lovelace"},
  "items": [
    {"sku": "JSN-100", "qty": 2, "price": 12.99}
  ],
  "total": 25.98,
  "status": "paid"
}

Explanation

Keep line items in an array so the order can contain multiple products.