> ## Documentation Index
> Fetch the complete documentation index at: https://docs.colossal.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Orders

> Query order details and line items from the Storefront API.

## Queries

### `order`

Fetch an order by UID.

```graphql theme={null}
query Order($orderUid: UUID!) {
  order(orderUid: $orderUid) {
    uid
    status
    subtotalAmount
    tax
    totalAmount
    customerLinkStatus
    customer {
      uid
      email
      fullName
    }
    billingAddress {
      line1
      line2
      city
      state
      postalCode
      country
    }
    lineItems {
      uid
      quantity
      unitPrice
      totalPrice
      sku
      variantProperties
      image
    }
    createdAt
    updatedAt
  }
}
```

## Types

### Order

| Field                | Type                                           | Description                   |
| -------------------- | ---------------------------------------------- | ----------------------------- |
| `uid`                | `UUID`                                         | Order ID                      |
| `status`             | `PENDING \| CONFIRMED \| COMPLETE \| REFUNDED` | Order status                  |
| `subtotalAmount`     | `Decimal`                                      | Subtotal before tax           |
| `tax`                | `Decimal`                                      | Tax amount                    |
| `totalAmount`        | `Decimal`                                      | Total including tax           |
| `customerLinkStatus` | `LINKED \| GUEST \| REDACTED`                  | Customer linkage state        |
| `customer`           | `Customer?`                                    | Customer who placed the order |
| `billingAddress`     | `Address?`                                     | Billing address               |
| `lineItems`          | `[OrderLineItem]`                              | Items in the order            |
| `createdAt`          | `DateTime`                                     |                               |
| `updatedAt`          | `DateTime`                                     |                               |

`customerLinkStatus` lets you distinguish linked customers from guest orders and redacted records.

### OrderLineItem

| Field               | Type      | Description                            |
| ------------------- | --------- | -------------------------------------- |
| `uid`               | `UUID`    | Line item ID                           |
| `quantity`          | `Int`     | Quantity purchased                     |
| `unitPrice`         | `Decimal` | Price per unit                         |
| `totalPrice`        | `Decimal` | Total for this line                    |
| `sku`               | `String?` | SKU                                    |
| `variantProperties` | `JSON?`   | Variant properties at time of purchase |
| `image`             | `String?` | Product image URL                      |
