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

# Order

> The Order type represents a transaction with associated sustainability impact data.

## Order type

```graphql theme={null}
type Order {
  id: ID!
  externalId: String
  customerId: ID!
  customer: Customer!
  items: [OrderItem!]!
  totalCarbonFootprint: Float!
  offsetStatus: OffsetStatus!
  shippingMethod: TransportMethod
  shippingAddress: Address
  impactSummary: OrderImpactSummary!
  equivalency: Equivalency
  createdAt: DateTime!
  updatedAt: DateTime!
}

type OrderItem {
  productId: ID!
  product: Product!
  quantity: Int!
  carbonFootprint: Float!
}

type OrderImpactSummary {
  totalCo2Equivalent: Float!
  totalMkiScore: Float
  shippingImpact: Float!
  productionImpact: Float!
  breakdown: [ImpactBreakdown!]!
}

type Address {
  country: String!
  postalCode: String
  city: String
}

enum OffsetStatus {
  NOT_OFFSET
  PARTIALLY_OFFSET
  FULLY_OFFSET
}

enum TransportMethod {
  TRUCK
  RAIL
  SHIP
  AIR
  ELECTRIC_TRUCK
  BICYCLE
  STANDARD
  EXPRESS
}
```

## Fields

| Field                  | Type                | Description                                     |
| ---------------------- | ------------------- | ----------------------------------------------- |
| `id`                   | ID!                 | Unique order identifier                         |
| `externalId`           | String              | Your system's order ID (e.g., Shopify order ID) |
| `customerId`           | ID!                 | Customer who placed the order                   |
| `items`                | \[OrderItem!]!      | Line items with per-product carbon data         |
| `totalCarbonFootprint` | Float!              | Total order carbon footprint in kg CO2e         |
| `offsetStatus`         | OffsetStatus!       | Whether emissions have been offset              |
| `shippingMethod`       | TransportMethod     | Delivery transport method                       |
| `impactSummary`        | OrderImpactSummary! | Aggregated impact data                          |
| `equivalency`          | Equivalency         | Human-readable impact comparison                |

## Example query

```graphql theme={null}
query {
  order(id: "order_xyz789") {
    id
    externalId
    totalCarbonFootprint
    offsetStatus
    items {
      product { id name }
      quantity
      carbonFootprint
    }
    impactSummary {
      totalCo2Equivalent
      shippingImpact
      productionImpact
    }
    equivalency {
      description
      value
    }
  }
}
```
