> ## Documentation Index
> Fetch the complete documentation index at: https://redo-44af351d-docs-v3-graphql-api-reference.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# order

> Fetch a single order by its id (a branded order id or a legacy Mongo ObjectId hex).

**Required scopes:**
[`orders_read`](/docs/api-reference/v3/reference/scopes#scope-orders_read)

## Arguments

<ResponseField name="id" type="ID!" required>
  The id of the order to fetch: a branded order id or a 24-char Mongo ObjectId
  hex.
</ResponseField>

## Returns

<ResponseField name="order" type={<a href="/docs/api-reference/v3/reference/orders/order">Order</a>}>
  A customer order ingested from the merchant's ecommerce platform.

  <Expandable title="fields" lazyRender>
    <ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
      When the order was placed (the ecommerce provider's creation time, falling back to Redo's ingestion time).
    </ResponseField>

    <ResponseField name="currencyCode" type="String">
      The ISO 4217 currency code the order was placed in.
    </ResponseField>

    <ResponseField name="customer" type={<a href="/docs/api-reference/v3/reference/orders/order-customer">OrderCustomer</a>}>
      The customer who placed the order, if known.

      <Expandable title="fields" lazyRender>
        <ResponseField name="email" type="String">
          The customer's email address.
        </ResponseField>

        <ResponseField name="firstName" type="String">
          The customer's first (given) name.
        </ResponseField>

        <ResponseField name="id" type="String">
          The customer's id in the source platform.
        </ResponseField>

        <ResponseField name="lastName" type="String">
          The customer's last (family) name.
        </ResponseField>

        <ResponseField name="name" type="String">
          The customer's full name, when both name parts are set.
        </ResponseField>

        <ResponseField name="phoneNumber" type="String">
          The customer's phone number.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="externalId" type="String!" required>
      The order's id in the source ecommerce platform.
    </ResponseField>

    <ResponseField name="fulfillments" type={<a href="/docs/api-reference/v3/reference/orders/order-fulfillment">[OrderFulfillment!]!</a>} required>
      The shipments fulfilling this order's items.

      <Expandable title="fields" lazyRender>
        <ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
          When the fulfillment was created.
        </ResponseField>

        <ResponseField name="deliveredAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
          When the shipment was delivered, if it has been.
        </ResponseField>

        <ResponseField name="estimatedDeliveryDate" type={<a href="/docs/api-reference/v3/reference/common/date">Date</a>}>
          The carrier's estimated delivery date (YYYY-MM-DD, destination-local), if known.
        </ResponseField>

        <ResponseField name="id" type="String!" required>
          The fulfillment's id in the source platform.
        </ResponseField>

        <ResponseField name="lineItems" type={<a href="/docs/api-reference/v3/reference/orders/order-fulfillment-line-item">[OrderFulfillmentLineItem!]!</a>} required>
          The items included in this fulfillment.

          <Expandable title="fields" lazyRender>
            <ResponseField name="id" type="String!" required>
              The fulfilled line item's id in the source platform.
            </ResponseField>

            <ResponseField name="productId" type="String!" required>
              The product's id in the source platform.
            </ResponseField>

            <ResponseField name="quantity" type="Int!" required>
              How many units of this item were fulfilled.
            </ResponseField>

            <ResponseField name="sku" type="String">
              The stock keeping unit of the fulfilled item.
            </ResponseField>

            <ResponseField name="title" type="String!" required>
              The product title of the fulfilled item.
            </ResponseField>

            <ResponseField name="variantId" type="String">
              The variant's id in the source platform.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="status" type={<a href="/docs/api-reference/v3/reference/orders/order-fulfillment-status">OrderFulfillmentStatus!</a>} required>
          The current tracked shipment status.
        </ResponseField>

        <ResponseField name="trackingCompany" type="String">
          The shipping carrier, if known.
        </ResponseField>

        <ResponseField name="trackingHistory" type={<a href="/docs/api-reference/v3/reference/orders/order-tracking-event">[OrderTrackingEvent!]!</a>} required>
          The carrier tracking events, oldest to newest.

          <Expandable title="fields" lazyRender>
            <ResponseField name="datetime" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
              When the tracking event occurred.
            </ResponseField>

            <ResponseField name="location" type={<a href="/docs/api-reference/v3/reference/orders/order-tracking-event-location">OrderTrackingEventLocation</a>}>
              Where the tracking event occurred, if reported.
            </ResponseField>

            <ResponseField name="message" type="String!" required>
              The human-readable tracking message.
            </ResponseField>

            <ResponseField name="status" type="String!" required>
              The carrier's status label at this event.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="trackingNumber" type="String">
          The carrier tracking number, if known.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="id" type="ID!" required>
      The id of this order.
    </ResponseField>

    <ResponseField name="legacyId" type="String!" required>
      The order's legacy Mongo ObjectId (24-char hex) from before the CockroachDB migration.
    </ResponseField>

    <ResponseField name="lineItems" type={<a href="/docs/api-reference/v3/reference/orders/order-line-item">[OrderLineItem!]!</a>} required>
      The items purchased on this order.

      <Expandable title="fields" lazyRender>
        <ResponseField name="discount" type={<a href="/docs/api-reference/v3/reference/common/money">Money</a>}>
          The total discount applied to this line item.

          <Expandable title="fields" lazyRender>
            <ResponseField name="amount" type={<a href="/docs/api-reference/v3/reference/common/decimal">Decimal!</a>} required>
              The exact amount as a decimal string (e.g. "19.99").
            </ResponseField>

            <ResponseField name="currency" type="String!" required>
              ISO 4217 currency code (e.g. USD).
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="id" type="String!" required>
          The line item's id in the source platform.
        </ResponseField>

        <ResponseField name="imageUrl" type="String">
          A URL to the item's image, if any.
        </ResponseField>

        <ResponseField name="price" type={<a href="/docs/api-reference/v3/reference/common/money">Money</a>}>
          The per-unit price before discounts.

          <Expandable title="fields" lazyRender>
            <ResponseField name="amount" type={<a href="/docs/api-reference/v3/reference/common/decimal">Decimal!</a>} required>
              The exact amount as a decimal string (e.g. "19.99").
            </ResponseField>

            <ResponseField name="currency" type="String!" required>
              ISO 4217 currency code (e.g. USD).
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="productId" type="String">
          The purchased product's id in the source platform.
        </ResponseField>

        <ResponseField name="quantity" type="Int!" required>
          How many units of this item were ordered.
        </ResponseField>

        <ResponseField name="sku" type="String">
          The stock keeping unit for this line item.
        </ResponseField>

        <ResponseField name="title" type="String!" required>
          The product title for this line item.
        </ResponseField>

        <ResponseField name="variantId" type="String">
          The purchased variant's id in the source platform.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="shipping" type={<a href="/docs/api-reference/v3/reference/orders/order-shipping">OrderShipping</a>}>
      The order's shipping method, cost, and destination.

      <Expandable title="fields" lazyRender>
        <ResponseField name="address" type={<a href="/docs/api-reference/v3/reference/common/mailing-address">MailingAddress</a>}>
          The destination the order ships to.

          <Expandable title="fields" lazyRender>
            <ResponseField name="address1" type="String">
              The first line of the address (street and number).
            </ResponseField>

            <ResponseField name="address2" type="String">
              The second line of the address (apartment, suite, unit, etc.).
            </ResponseField>

            <ResponseField name="city" type="String">
              The city, town, or village.
            </ResponseField>

            <ResponseField name="country" type="String">
              The country.
            </ResponseField>

            <ResponseField name="postalCode" type="String">
              The postal or ZIP code.
            </ResponseField>

            <ResponseField name="province" type="String">
              The province, state, or region.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="cost" type={<a href="/docs/api-reference/v3/reference/common/money">Money</a>}>
          What the customer paid for shipping.

          <Expandable title="fields" lazyRender>
            <ResponseField name="amount" type={<a href="/docs/api-reference/v3/reference/common/decimal">Decimal!</a>} required>
              The exact amount as a decimal string (e.g. "19.99").
            </ResponseField>

            <ResponseField name="currency" type="String!" required>
              ISO 4217 currency code (e.g. USD).
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="method" type="String">
          The selected shipping method's name, e.g. Standard.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="subtotalPrice" type={<a href="/docs/api-reference/v3/reference/common/money">Money</a>}>
      The order subtotal, excluding tax and shipping, if known.

      <Expandable title="fields" lazyRender>
        <ResponseField name="amount" type={<a href="/docs/api-reference/v3/reference/common/decimal">Decimal!</a>} required>
          The exact amount as a decimal string (e.g. "19.99").
        </ResponseField>

        <ResponseField name="currency" type="String!" required>
          ISO 4217 currency code (e.g. USD).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="tags" type="[String!]!" required>
      Free-form tags applied to the order.
    </ResponseField>

    <ResponseField name="totalPrice" type={<a href="/docs/api-reference/v3/reference/common/money">Money</a>}>
      The order total, including tax and shipping, if known.

      <Expandable title="fields" lazyRender>
        <ResponseField name="amount" type={<a href="/docs/api-reference/v3/reference/common/decimal">Decimal!</a>} required>
          The exact amount as a decimal string (e.g. "19.99").
        </ResponseField>

        <ResponseField name="currency" type="String!" required>
          ISO 4217 currency code (e.g. USD).
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="totalTax" type={<a href="/docs/api-reference/v3/reference/common/money">Money</a>}>
      The total tax charged on the order, if known.

      <Expandable title="fields" lazyRender>
        <ResponseField name="amount" type={<a href="/docs/api-reference/v3/reference/common/decimal">Decimal!</a>} required>
          The exact amount as a decimal string (e.g. "19.99").
        </ResponseField>

        <ResponseField name="currency" type="String!" required>
          ISO 4217 currency code (e.g. USD).
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```graphql theme={null}
query {
  order(id: "...") {
    createdAt
    currencyCode
    externalId
    id
    legacyId
    tags
  }
}
```
