---
title: "Retrieve an order"
---

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

# Retrieve an order

Path: EdgeCart API › Storefront

`GET /store/orders/{id}`

URL: `https://{store_domain}/api/store/orders/{id}`

Returns an order for the signed-in customer, or for a guest who sends
the `x-guest-token` returned when the cart was completed.

## Authentication

- `publishableKey`, apiKey, in header, header `x-publishable-api-key`

## Path parameters

- `id` (`retrieveStorefrontOrder.path.id`; string, required)

## Header parameters

- `x-guest-token` (`retrieveStorefrontOrder.header.x-guest-token`; string, optional) — Guest order token returned by cart completion.

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://your-store.example.com/api/store/orders/<id>' \
  --header 'x-publishable-api-key: <x-publishable-api-key>'
```

### TypeScript

```typescript
const url = 'https://your-store.example.com/api/store/orders/<id>';
const options = {
  method: 'GET',
  headers: {'x-publishable-api-key': '<x-publishable-api-key>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://your-store.example.com/api/store/orders/<id>"

headers = {"x-publishable-api-key": "<x-publishable-api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The order.

#### Example

```json
{
  "order": {
    "id": "string",
    "cart_id": "string",
    "display_id": 0,
    "custom_display_id": "string",
    "status": "pending",
    "payment_status": "not_paid",
    "fulfillment_status": "not_fulfilled",
    "version": 0,
    "region_id": "string",
    "customer_id": "string",
    "sales_channel_id": "string",
    "email": "user@example.com",
    "currency_code": "string",
    "locale": "string",
    "canceled_at": "2019-08-24T14:15:22Z",
    "shipping_address": {
      "id": "string",
      "customer_id": "string",
      "company": "string",
      "first_name": "string",
      "last_name": "string",
      "address_1": "string",
      "address_2": "string",
      "city": "string",
      "country_code": "string",
      "province": "string",
      "postal_code": "string",
      "phone": "string",
      "metadata": {}
    },
    "billing_address": {
      "id": "string",
      "customer_id": "string",
      "company": "string",
      "first_name": "string",
      "last_name": "string",
      "address_1": "string",
      "address_2": "string",
      "city": "string",
      "country_code": "string",
      "province": "string",
      "postal_code": "string",
      "phone": "string",
      "metadata": {}
    },
    "items": [
      {
        "id": "string",
        "order_id": "string",
        "title": "string",
        "subtitle": "string",
        "thumbnail": "string",
        "quantity": 0,
        "variant_id": "string",
        "product_id": "string",
        "product_title": "string",
        "product_handle": "string",
        "variant_sku": "string",
        "variant_title": "string",
        "requires_shipping": true,
        "is_discountable": true,
        "is_tax_inclusive": true,
        "unit_price": 0,
        "subtotal": 0,
        "discount_total": 0,
        "tax_total": 0,
        "total": 0,
        "fulfilled_quantity": 0,
        "shipped_quantity": 0,
        "delivered_quantity": 0,
        "metadata": {}
      }
    ],
    "shipping_methods": [
      {
        "id": "string",
        "order_id": "string",
        "name": "string",
        "description": "string",
        "amount": 0,
        "is_tax_inclusive": true,
        "shipping_option_id": "string",
        "subtotal": 0,
        "discount_total": 0,
        "tax_total": 0,
        "total": 0,
        "metadata": {}
      }
    ],
    "metadata": {},
    "subtotal": 0,
    "discount_total": 0,
    "tax_total": 0,
    "shipping_total": 0,
    "total": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "guest_token": "string"
  }
}
```

- `order` (`retrieveStorefrontOrder.response.200.order`; object, required)
  - `id` (`retrieveStorefrontOrder.response.200.order.id`; string, required)
  - `cart_id` (`retrieveStorefrontOrder.response.200.order.cart_id`; string, required)
  - `display_id` (`retrieveStorefrontOrder.response.200.order.display_id`; integer, required)
  - `status` (`retrieveStorefrontOrder.response.200.order.status`; string, required)
    - one of `"pending"`, `"completed"`, `"draft"`, `"archived"`, `"canceled"`, `"requires_action"`
  - `payment_status` (`retrieveStorefrontOrder.response.200.order.payment_status`; string, required)
    - one of `"not_paid"`, `"awaiting"`, `"authorized"`, `"partially_authorized"`, `"captured"`, `"partially_captured"`, `"partially_refunded"`, `"refunded"`, `"canceled"`, `"requires_action"`
  - `fulfillment_status` (`retrieveStorefrontOrder.response.200.order.fulfillment_status`; string, required)
    - one of `"not_fulfilled"`, `"partially_fulfilled"`, `"fulfilled"`, `"partially_shipped"`, `"shipped"`, `"partially_delivered"`, `"delivered"`, `"canceled"`
  - `currency_code` (`retrieveStorefrontOrder.response.200.order.currency_code`; string, required)
  - `items` (`retrieveStorefrontOrder.response.200.order.items`; array of object, required)
    - `id` (`retrieveStorefrontOrder.response.200.order.items.id`; string, required)
    - `order_id` (`retrieveStorefrontOrder.response.200.order.items.order_id`; string, required)
    - `title` (`retrieveStorefrontOrder.response.200.order.items.title`; string, required)
    - `quantity` (`retrieveStorefrontOrder.response.200.order.items.quantity`; integer, required)
    - `unit_price` (`retrieveStorefrontOrder.response.200.order.items.unit_price`; integer, required)
    - `total` (`retrieveStorefrontOrder.response.200.order.items.total`; integer, required)
    - `subtitle` (`retrieveStorefrontOrder.response.200.order.items.subtitle`; string | null, optional)
    - `thumbnail` (`retrieveStorefrontOrder.response.200.order.items.thumbnail`; string | null, optional)
    - `variant_id` (`retrieveStorefrontOrder.response.200.order.items.variant_id`; string | null, optional)
    - `product_id` (`retrieveStorefrontOrder.response.200.order.items.product_id`; string | null, optional)
    - `product_title` (`retrieveStorefrontOrder.response.200.order.items.product_title`; string | null, optional)
    - `product_handle` (`retrieveStorefrontOrder.response.200.order.items.product_handle`; string | null, optional)
    - `variant_sku` (`retrieveStorefrontOrder.response.200.order.items.variant_sku`; string | null, optional)
    - `variant_title` (`retrieveStorefrontOrder.response.200.order.items.variant_title`; string | null, optional)
    - `requires_shipping` (`retrieveStorefrontOrder.response.200.order.items.requires_shipping`; boolean, optional)
    - `is_discountable` (`retrieveStorefrontOrder.response.200.order.items.is_discountable`; boolean, optional)
    - `is_tax_inclusive` (`retrieveStorefrontOrder.response.200.order.items.is_tax_inclusive`; boolean, optional)
    - `subtotal` (`retrieveStorefrontOrder.response.200.order.items.subtotal`; integer, optional)
    - `discount_total` (`retrieveStorefrontOrder.response.200.order.items.discount_total`; integer, optional)
    - `tax_total` (`retrieveStorefrontOrder.response.200.order.items.tax_total`; integer, optional)
    - `fulfilled_quantity` (`retrieveStorefrontOrder.response.200.order.items.fulfilled_quantity`; integer, optional)
    - `shipped_quantity` (`retrieveStorefrontOrder.response.200.order.items.shipped_quantity`; integer, optional)
    - `delivered_quantity` (`retrieveStorefrontOrder.response.200.order.items.delivered_quantity`; integer, optional)
    - `metadata` (`retrieveStorefrontOrder.response.200.order.items.metadata`; object, optional)
  - `shipping_methods` (`retrieveStorefrontOrder.response.200.order.shipping_methods`; array of object, required)
    - `id` (`retrieveStorefrontOrder.response.200.order.shipping_methods.id`; string, required)
    - `order_id` (`retrieveStorefrontOrder.response.200.order.shipping_methods.order_id`; string, required)
    - `name` (`retrieveStorefrontOrder.response.200.order.shipping_methods.name`; string, required)
    - `amount` (`retrieveStorefrontOrder.response.200.order.shipping_methods.amount`; integer, required)
    - `total` (`retrieveStorefrontOrder.response.200.order.shipping_methods.total`; integer, required)
    - `description` (`retrieveStorefrontOrder.response.200.order.shipping_methods.description`; string | null, optional)
    - `is_tax_inclusive` (`retrieveStorefrontOrder.response.200.order.shipping_methods.is_tax_inclusive`; boolean, optional)
    - `shipping_option_id` (`retrieveStorefrontOrder.response.200.order.shipping_methods.shipping_option_id`; string | null, optional)
    - `subtotal` (`retrieveStorefrontOrder.response.200.order.shipping_methods.subtotal`; integer, optional)
    - `discount_total` (`retrieveStorefrontOrder.response.200.order.shipping_methods.discount_total`; integer, optional)
    - `tax_total` (`retrieveStorefrontOrder.response.200.order.shipping_methods.tax_total`; integer, optional)
    - `metadata` (`retrieveStorefrontOrder.response.200.order.shipping_methods.metadata`; object, optional)
  - `subtotal` (`retrieveStorefrontOrder.response.200.order.subtotal`; integer, required)
  - `discount_total` (`retrieveStorefrontOrder.response.200.order.discount_total`; integer, required)
  - `tax_total` (`retrieveStorefrontOrder.response.200.order.tax_total`; integer, required)
  - `shipping_total` (`retrieveStorefrontOrder.response.200.order.shipping_total`; integer, required)
  - `total` (`retrieveStorefrontOrder.response.200.order.total`; integer, required)
  - `created_at` (`retrieveStorefrontOrder.response.200.order.created_at`; string, required)
    - format: `date-time`
  - `updated_at` (`retrieveStorefrontOrder.response.200.order.updated_at`; string, required)
    - format: `date-time`
  - `custom_display_id` (`retrieveStorefrontOrder.response.200.order.custom_display_id`; string | null, optional)
  - `version` (`retrieveStorefrontOrder.response.200.order.version`; integer, optional)
  - `region_id` (`retrieveStorefrontOrder.response.200.order.region_id`; string | null, optional)
  - `customer_id` (`retrieveStorefrontOrder.response.200.order.customer_id`; string | null, optional)
  - `sales_channel_id` (`retrieveStorefrontOrder.response.200.order.sales_channel_id`; string | null, optional)
  - `email` (`retrieveStorefrontOrder.response.200.order.email`; string | null, optional)
    - format: `email`
  - `locale` (`retrieveStorefrontOrder.response.200.order.locale`; string | null, optional)
  - `canceled_at` (`retrieveStorefrontOrder.response.200.order.canceled_at`; string | null, optional)
    - format: `date-time`
  - `shipping_address` (`retrieveStorefrontOrder.response.200.order.shipping_address`; one of, optional)
    - one of the following:
      - `Address`
        - `id` (`Address.id`; string, required)
        - `customer_id` (`Address.customer_id`; string | null, optional)
        - `company` (`Address.company`; string | null, optional)
        - `first_name` (`Address.first_name`; string | null, optional)
        - `last_name` (`Address.last_name`; string | null, optional)
        - `address_1` (`Address.address_1`; string | null, optional)
        - `address_2` (`Address.address_2`; string | null, optional)
        - `city` (`Address.city`; string | null, optional)
        - `country_code` (`Address.country_code`; string | null, optional)
        - `province` (`Address.province`; string | null, optional)
        - `postal_code` (`Address.postal_code`; string | null, optional)
        - `phone` (`Address.phone`; string | null, optional)
        - `metadata` (`Address.metadata`; object, optional)
      - `null`
  - `billing_address` (`retrieveStorefrontOrder.response.200.order.billing_address`; one of, optional)
    - one of the following:
      - `Address`
        - `id` (`Address.id`; string, required)
        - `customer_id` (`Address.customer_id`; string | null, optional)
        - `company` (`Address.company`; string | null, optional)
        - `first_name` (`Address.first_name`; string | null, optional)
        - `last_name` (`Address.last_name`; string | null, optional)
        - `address_1` (`Address.address_1`; string | null, optional)
        - `address_2` (`Address.address_2`; string | null, optional)
        - `city` (`Address.city`; string | null, optional)
        - `country_code` (`Address.country_code`; string | null, optional)
        - `province` (`Address.province`; string | null, optional)
        - `postal_code` (`Address.postal_code`; string | null, optional)
        - `phone` (`Address.phone`; string | null, optional)
        - `metadata` (`Address.metadata`; object, optional)
      - `null`
  - `metadata` (`retrieveStorefrontOrder.response.200.order.metadata`; object, optional)
  - `guest_token` (`retrieveStorefrontOrder.response.200.order.guest_token`; string, optional) — Only present in the cart completion response for a guest order.

### 404

The order does not exist or is not visible to this buyer.

#### Example

```json
{
  "type": "not_found",
  "message": "No active store is available for this deployment",
  "code": "store_not_configured"
}
```

- `type` (`retrieveStorefrontOrder.response.404.type`; string, required)
- `message` (`retrieveStorefrontOrder.response.404.message`; string, required)
- `code` (`retrieveStorefrontOrder.response.404.code`; string, optional)


Source: https://edgecart.dev/api/store/orders/retrieve/index.md
