---
title: "Retrieve a cart"
---

> 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 a cart

Path: EdgeCart API › Storefront

`GET /store/carts/{id}`

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

Returns the cart with its current items, totals, and adjustments.

## Authentication

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

## Path parameters

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

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://your-store.example.com/api/store/carts/<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/carts/<id>"

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

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

print(response.text)
```

## Responses

### 200

The cart.

#### Example

```json
{
  "cart": {
    "id": "string",
    "region_id": "string",
    "customer_id": "string",
    "sales_channel_id": "string",
    "email": "string",
    "currency_code": "string",
    "locale": "string",
    "completed_at": "2019-08-24T14:15:22Z",
    "shipping_address_id": "string",
    "billing_address_id": "string",
    "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",
        "cart_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,
        "original_subtotal": 0,
        "original_total": 0,
        "original_tax_total": 0,
        "adjustments": [
          {
            "id": "string",
            "code": "string",
            "promotion_id": "string",
            "amount": 0,
            "is_tax_inclusive": true,
            "description": "string",
            "provider_id": "string"
          }
        ],
        "tax_lines": [
          {
            "id": "string",
            "description": "string",
            "code": "string",
            "rate": 0,
            "provider_id": "string",
            "tax_rate_id": "string"
          }
        ],
        "metadata": {},
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z"
      }
    ],
    "shipping_methods": [
      {
        "id": "string",
        "cart_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,
        "original_subtotal": 0,
        "original_total": 0,
        "original_tax_total": 0,
        "adjustments": [
          {
            "id": "string",
            "code": "string",
            "promotion_id": "string",
            "amount": 0,
            "is_tax_inclusive": true,
            "description": "string",
            "provider_id": "string"
          }
        ],
        "tax_lines": [
          {
            "id": "string",
            "description": "string",
            "code": "string",
            "rate": 0,
            "provider_id": "string",
            "tax_rate_id": "string"
          }
        ],
        "metadata": {},
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z"
      }
    ],
    "promotions": [
      {
        "id": "string",
        "code": "string",
        "amount": 0
      }
    ],
    "metadata": {},
    "item_total": 0,
    "item_subtotal": 0,
    "item_tax_total": 0,
    "original_item_total": 0,
    "original_item_subtotal": 0,
    "original_item_tax_total": 0,
    "shipping_total": 0,
    "shipping_subtotal": 0,
    "shipping_tax_total": 0,
    "original_shipping_total": 0,
    "original_shipping_subtotal": 0,
    "original_shipping_tax_total": 0,
    "discount_total": 0,
    "discount_tax_total": 0,
    "gift_card_total": 0,
    "gift_card_tax_total": 0,
    "subtotal": 0,
    "tax_total": 0,
    "total": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
```

- `cart` (`retrieveStorefrontCart.response.200.cart`; object, required)
  - `id` (`retrieveStorefrontCart.response.200.cart.id`; string, required)
  - `currency_code` (`retrieveStorefrontCart.response.200.cart.currency_code`; string, required)
  - `items` (`retrieveStorefrontCart.response.200.cart.items`; array of object, required)
    - `id` (`retrieveStorefrontCart.response.200.cart.items.id`; string, required)
    - `cart_id` (`retrieveStorefrontCart.response.200.cart.items.cart_id`; string, required)
    - `title` (`retrieveStorefrontCart.response.200.cart.items.title`; string, required)
    - `quantity` (`retrieveStorefrontCart.response.200.cart.items.quantity`; integer, required)
    - `unit_price` (`retrieveStorefrontCart.response.200.cart.items.unit_price`; integer, required) — Price in minor units.
    - `total` (`retrieveStorefrontCart.response.200.cart.items.total`; integer, required)
    - `subtitle` (`retrieveStorefrontCart.response.200.cart.items.subtitle`; string | null, optional)
    - `thumbnail` (`retrieveStorefrontCart.response.200.cart.items.thumbnail`; string | null, optional)
    - `variant_id` (`retrieveStorefrontCart.response.200.cart.items.variant_id`; string | null, optional)
    - `product_id` (`retrieveStorefrontCart.response.200.cart.items.product_id`; string | null, optional)
    - `product_title` (`retrieveStorefrontCart.response.200.cart.items.product_title`; string | null, optional)
    - `product_handle` (`retrieveStorefrontCart.response.200.cart.items.product_handle`; string | null, optional)
    - `variant_sku` (`retrieveStorefrontCart.response.200.cart.items.variant_sku`; string | null, optional)
    - `variant_title` (`retrieveStorefrontCart.response.200.cart.items.variant_title`; string | null, optional)
    - `requires_shipping` (`retrieveStorefrontCart.response.200.cart.items.requires_shipping`; boolean, optional)
    - `is_discountable` (`retrieveStorefrontCart.response.200.cart.items.is_discountable`; boolean, optional)
    - `is_tax_inclusive` (`retrieveStorefrontCart.response.200.cart.items.is_tax_inclusive`; boolean, optional)
    - `subtotal` (`retrieveStorefrontCart.response.200.cart.items.subtotal`; integer, optional)
    - `discount_total` (`retrieveStorefrontCart.response.200.cart.items.discount_total`; integer, optional)
    - `tax_total` (`retrieveStorefrontCart.response.200.cart.items.tax_total`; integer, optional)
    - `original_subtotal` (`retrieveStorefrontCart.response.200.cart.items.original_subtotal`; integer, optional)
    - `original_total` (`retrieveStorefrontCart.response.200.cart.items.original_total`; integer, optional)
    - `original_tax_total` (`retrieveStorefrontCart.response.200.cart.items.original_tax_total`; integer, optional)
    - `adjustments` (`retrieveStorefrontCart.response.200.cart.items.adjustments`; array of object, optional)
      - `id` (`retrieveStorefrontCart.response.200.cart.items.adjustments.id`; string, required)
      - `amount` (`retrieveStorefrontCart.response.200.cart.items.adjustments.amount`; integer, required)
      - `code` (`retrieveStorefrontCart.response.200.cart.items.adjustments.code`; string | null, optional)
      - `promotion_id` (`retrieveStorefrontCart.response.200.cart.items.adjustments.promotion_id`; string | null, optional)
      - `is_tax_inclusive` (`retrieveStorefrontCart.response.200.cart.items.adjustments.is_tax_inclusive`; boolean, optional)
      - `description` (`retrieveStorefrontCart.response.200.cart.items.adjustments.description`; string | null, optional)
      - `provider_id` (`retrieveStorefrontCart.response.200.cart.items.adjustments.provider_id`; string | null, optional)
    - `tax_lines` (`retrieveStorefrontCart.response.200.cart.items.tax_lines`; array of object, optional)
      - `id` (`retrieveStorefrontCart.response.200.cart.items.tax_lines.id`; string, required)
      - `rate` (`retrieveStorefrontCart.response.200.cart.items.tax_lines.rate`; number, required)
      - `description` (`retrieveStorefrontCart.response.200.cart.items.tax_lines.description`; string | null, optional)
      - `code` (`retrieveStorefrontCart.response.200.cart.items.tax_lines.code`; string | null, optional)
      - `provider_id` (`retrieveStorefrontCart.response.200.cart.items.tax_lines.provider_id`; string | null, optional)
      - `tax_rate_id` (`retrieveStorefrontCart.response.200.cart.items.tax_lines.tax_rate_id`; string | null, optional)
    - `metadata` (`retrieveStorefrontCart.response.200.cart.items.metadata`; object, optional)
    - `created_at` (`retrieveStorefrontCart.response.200.cart.items.created_at`; string, optional)
      - format: `date-time`
    - `updated_at` (`retrieveStorefrontCart.response.200.cart.items.updated_at`; string, optional)
      - format: `date-time`
  - `shipping_methods` (`retrieveStorefrontCart.response.200.cart.shipping_methods`; array of object, required)
    - `id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.id`; string, required)
    - `cart_id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.cart_id`; string, required)
    - `name` (`retrieveStorefrontCart.response.200.cart.shipping_methods.name`; string, required)
    - `amount` (`retrieveStorefrontCart.response.200.cart.shipping_methods.amount`; integer, required)
    - `total` (`retrieveStorefrontCart.response.200.cart.shipping_methods.total`; integer, required)
    - `description` (`retrieveStorefrontCart.response.200.cart.shipping_methods.description`; string | null, optional)
    - `is_tax_inclusive` (`retrieveStorefrontCart.response.200.cart.shipping_methods.is_tax_inclusive`; boolean, optional)
    - `shipping_option_id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.shipping_option_id`; string | null, optional)
    - `subtotal` (`retrieveStorefrontCart.response.200.cart.shipping_methods.subtotal`; integer, optional)
    - `discount_total` (`retrieveStorefrontCart.response.200.cart.shipping_methods.discount_total`; integer, optional)
    - `tax_total` (`retrieveStorefrontCart.response.200.cart.shipping_methods.tax_total`; integer, optional)
    - `original_subtotal` (`retrieveStorefrontCart.response.200.cart.shipping_methods.original_subtotal`; integer, optional)
    - `original_total` (`retrieveStorefrontCart.response.200.cart.shipping_methods.original_total`; integer, optional)
    - `original_tax_total` (`retrieveStorefrontCart.response.200.cart.shipping_methods.original_tax_total`; integer, optional)
    - `adjustments` (`retrieveStorefrontCart.response.200.cart.shipping_methods.adjustments`; array of object, optional)
      - `id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.adjustments.id`; string, required)
      - `amount` (`retrieveStorefrontCart.response.200.cart.shipping_methods.adjustments.amount`; integer, required)
      - `code` (`retrieveStorefrontCart.response.200.cart.shipping_methods.adjustments.code`; string | null, optional)
      - `promotion_id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.adjustments.promotion_id`; string | null, optional)
      - `is_tax_inclusive` (`retrieveStorefrontCart.response.200.cart.shipping_methods.adjustments.is_tax_inclusive`; boolean, optional)
      - `description` (`retrieveStorefrontCart.response.200.cart.shipping_methods.adjustments.description`; string | null, optional)
      - `provider_id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.adjustments.provider_id`; string | null, optional)
    - `tax_lines` (`retrieveStorefrontCart.response.200.cart.shipping_methods.tax_lines`; array of object, optional)
      - `id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.tax_lines.id`; string, required)
      - `rate` (`retrieveStorefrontCart.response.200.cart.shipping_methods.tax_lines.rate`; number, required)
      - `description` (`retrieveStorefrontCart.response.200.cart.shipping_methods.tax_lines.description`; string | null, optional)
      - `code` (`retrieveStorefrontCart.response.200.cart.shipping_methods.tax_lines.code`; string | null, optional)
      - `provider_id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.tax_lines.provider_id`; string | null, optional)
      - `tax_rate_id` (`retrieveStorefrontCart.response.200.cart.shipping_methods.tax_lines.tax_rate_id`; string | null, optional)
    - `metadata` (`retrieveStorefrontCart.response.200.cart.shipping_methods.metadata`; object, optional)
    - `created_at` (`retrieveStorefrontCart.response.200.cart.shipping_methods.created_at`; string, optional)
      - format: `date-time`
    - `updated_at` (`retrieveStorefrontCart.response.200.cart.shipping_methods.updated_at`; string, optional)
      - format: `date-time`
  - `promotions` (`retrieveStorefrontCart.response.200.cart.promotions`; array of object, required)
    - `id` (`retrieveStorefrontCart.response.200.cart.promotions.id`; string, required)
    - `amount` (`retrieveStorefrontCart.response.200.cart.promotions.amount`; integer, required)
    - `code` (`retrieveStorefrontCart.response.200.cart.promotions.code`; string | null, optional)
  - `shipping_total` (`retrieveStorefrontCart.response.200.cart.shipping_total`; integer, required)
  - `discount_total` (`retrieveStorefrontCart.response.200.cart.discount_total`; integer, required)
  - `subtotal` (`retrieveStorefrontCart.response.200.cart.subtotal`; integer, required)
  - `tax_total` (`retrieveStorefrontCart.response.200.cart.tax_total`; integer, required)
  - `total` (`retrieveStorefrontCart.response.200.cart.total`; integer, required)
  - `created_at` (`retrieveStorefrontCart.response.200.cart.created_at`; string, required)
    - format: `date-time`
  - `updated_at` (`retrieveStorefrontCart.response.200.cart.updated_at`; string, required)
    - format: `date-time`
  - `region_id` (`retrieveStorefrontCart.response.200.cart.region_id`; string | null, optional)
  - `customer_id` (`retrieveStorefrontCart.response.200.cart.customer_id`; string | null, optional)
  - `sales_channel_id` (`retrieveStorefrontCart.response.200.cart.sales_channel_id`; string | null, optional)
  - `email` (`retrieveStorefrontCart.response.200.cart.email`; string | null, optional)
  - `locale` (`retrieveStorefrontCart.response.200.cart.locale`; string | null, optional)
  - `completed_at` (`retrieveStorefrontCart.response.200.cart.completed_at`; string | null, optional)
    - format: `date-time`
  - `shipping_address_id` (`retrieveStorefrontCart.response.200.cart.shipping_address_id`; string | null, optional)
  - `billing_address_id` (`retrieveStorefrontCart.response.200.cart.billing_address_id`; string | null, optional)
  - `shipping_address` (`retrieveStorefrontCart.response.200.cart.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` (`retrieveStorefrontCart.response.200.cart.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` (`retrieveStorefrontCart.response.200.cart.metadata`; object, optional)
  - `item_total` (`retrieveStorefrontCart.response.200.cart.item_total`; integer, optional)
  - `item_subtotal` (`retrieveStorefrontCart.response.200.cart.item_subtotal`; integer, optional)
  - `item_tax_total` (`retrieveStorefrontCart.response.200.cart.item_tax_total`; integer, optional)
  - `original_item_total` (`retrieveStorefrontCart.response.200.cart.original_item_total`; integer, optional)
  - `original_item_subtotal` (`retrieveStorefrontCart.response.200.cart.original_item_subtotal`; integer, optional)
  - `original_item_tax_total` (`retrieveStorefrontCart.response.200.cart.original_item_tax_total`; integer, optional)
  - `shipping_subtotal` (`retrieveStorefrontCart.response.200.cart.shipping_subtotal`; integer, optional)
  - `shipping_tax_total` (`retrieveStorefrontCart.response.200.cart.shipping_tax_total`; integer, optional)
  - `original_shipping_total` (`retrieveStorefrontCart.response.200.cart.original_shipping_total`; integer, optional)
  - `original_shipping_subtotal` (`retrieveStorefrontCart.response.200.cart.original_shipping_subtotal`; integer, optional)
  - `original_shipping_tax_total` (`retrieveStorefrontCart.response.200.cart.original_shipping_tax_total`; integer, optional)
  - `discount_tax_total` (`retrieveStorefrontCart.response.200.cart.discount_tax_total`; integer, optional)
  - `gift_card_total` (`retrieveStorefrontCart.response.200.cart.gift_card_total`; integer, optional)
  - `gift_card_tax_total` (`retrieveStorefrontCart.response.200.cart.gift_card_tax_total`; integer, optional)

### 404

The cart does not exist in this store.

#### Example

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

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


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