For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Carts
        • Carts
              • POSTCreate Cart
              • GETGet Cart
              • PUTUpdate Customer ID
              • DELDelete Cart
        • Channels
        • Checkouts
        • Currencies
        • Customer Segmentation
        • Geography
        • Infrastructure Hosting
        • Inventory
        • Orders
        • Order Operations
        • Pickup
        • Pickup Methods
        • Pickup Options
        • Pricing
        • Price Lists
        • Promotions
        • Promotion Settings
        • Redirects
        • Scripts
        • Settings
        • Shipping
        • Sites
        • Subscribers
        • System Logs
        • Tax
        • Wishlists
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminManagementCartsCarts Single

Get Cart

GET
https://api.bigcommerce.com/stores/:store_hash/v3/carts/:cartId
GET
/stores/:store_hash/v3/carts/:cartId
$curl https://api.bigcommerce.com/stores/store_hash/v3/carts/cartId \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json"
1{
2 "data": {
3 "id": "a3f1c9e2-7b4d-4f3a-9c2e-1d2b3f4a5c6d",
4 "customer_id": 12345,
5 "channel_id": 1,
6 "email": "customer@example.com",
7 "currency": {
8 "code": "usd"
9 },
10 "tax_included": true,
11 "base_amount": 150.75,
12 "discount_amount": 15,
13 "manual_discount_amount": 5,
14 "cart_amount": 130.75,
15 "coupons": [
16 {
17 "code": "SUMMER21",
18 "id": "coup123",
19 "coupon_type": "1",
20 "discounted_amount": 10,
21 "display_name": "Summer Sale 10% Off"
22 }
23 ],
24 "discounts": [
25 {
26 "id": "coupon",
27 "discounted_amount": 10
28 }
29 ],
30 "line_items": {
31 "physical_items": [
32 {
33 "variant_id": 358,
34 "product_id": 12,
35 "quantity": 2,
36 "id": "6e193ce6-f327-4dcc-b75e-72cf6738525e",
37 "parent_id": null,
38 "sku": "TSHIRT-BLUE-M",
39 "name": "Blue T-Shirt - Medium",
40 "url": "http://your-store-url.mybigcommerce.com/blue-tshirt-medium/",
41 "taxable": true,
42 "image_url": "https://cdn.yourstore.com/products/blue-tshirt.png",
43 "discounts": [
44 {
45 "id": 2,
46 "discounted_amount": 5
47 }
48 ],
49 "coupons": [
50 {
51 "id": 6,
52 "code": "SUMMER21",
53 "name": "Summer Sale 10% Off",
54 "discountType": 1,
55 "discountAmount": 10,
56 "expiresDate": 0,
57 "totalDiscount": 5
58 }
59 ],
60 "discount_amount": 5,
61 "coupon_amount": 5,
62 "original_price": 30,
63 "list_price": 30,
64 "sale_price": 25,
65 "extended_list_price": 60,
66 "extended_sale_price": 50,
67 "is_require_shipping": true,
68 "is_mutable": true,
69 "added_by_promotion": false,
70 "gift_wrapping": {
71 "name": "Birthday Wrap",
72 "message": "Happy Birthday!",
73 "amount": 3.99
74 }
75 }
76 ],
77 "digital_items": [
78 {
79 "id": "7f2a4b8c-9d3e-4f1a-bc2d-3e4f5a6b7c8d",
80 "parent_id": null,
81 "variant_id": 459,
82 "product_id": 25,
83 "sku": "EBOOK-2024",
84 "name": "2024 Gardening eBook",
85 "url": "http://your-store-url.mybigcommerce.com/2024-gardening-ebook/",
86 "quantity": 1,
87 "taxable": false,
88 "image_url": "https://cdn.yourstore.com/products/ebook-cover.png",
89 "discounts": [
90 {
91 "id": "coupon",
92 "discounted_amount": 2
93 }
94 ],
95 "coupons": [
96 {
97 "id": 7,
98 "code": "EBOOK5",
99 "name": "5 Dollar Off eBook",
100 "discountType": 2,
101 "discountAmount": 5,
102 "expiresDate": 0,
103 "totalDiscount": 2
104 }
105 ],
106 "discount_amount": 2,
107 "coupon_amount": 2,
108 "original_price": 20,
109 "list_price": 20,
110 "sale_price": 18,
111 "extended_list_price": 20,
112 "extended_sale_price": 18,
113 "is_require_shipping": false,
114 "is_mutable": true,
115 "added_by_promotion": false,
116 "download_file_urls": [
117 "https://cdn.yourstore.com/downloads/2024-gardening-ebook.pdf"
118 ],
119 "download_page_url": "https://your-store-url.mybigcommerce.com/downloads/2024-gardening-ebook",
120 "download_size": "15MB"
121 }
122 ],
123 "gift_certificates": [
124 {
125 "id": "gc123456",
126 "name": "Holiday Gift Card",
127 "theme": "Christmas",
128 "amount": 50,
129 "taxable": false,
130 "sender": {
131 "name": "John Doe",
132 "email": "john.doe@example.com"
133 },
134 "recipient": {
135 "name": "Jane Smith",
136 "email": "jane.smith@example.com"
137 },
138 "message": "Happy Holidays! Enjoy your gift."
139 }
140 ],
141 "custom_items": [
142 {
143 "id": "custom789",
144 "sku": "CUSTOM-001",
145 "name": "Custom Engraved Plaque",
146 "quantity": "1",
147 "list_price": "75.00",
148 "extended_list_price": 75,
149 "image_url": "https://cdn.yourstore.com/products/custom-plaque.png"
150 }
151 ]
152 },
153 "created_time": "2024-06-01T10:15:30Z",
154 "updated_time": "2024-06-02T14:20:00Z",
155 "locale": "en-US",
156 "promotions": {
157 "banners": {
158 "id": "promo123",
159 "type": "banner",
160 "page": [
161 "cart",
162 "checkout"
163 ],
164 "text": "Save 10% on orders over $100!"
165 }
166 },
167 "version": 3
168 },
169 "meta": {}
170}

Returns a storeʼs Cart.

Was this page helpful?
Previous

Create Cart

Next

Update Customer ID

Built with

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| |Carts|modify|`store_cart`| |Carts |read-only|`store_cart_read_only`| |Information & Settings | modify | `store_v2_information`| |Information & Settings | read-only| `store_v2_information`| ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

cartIdstringRequiredformat: "UUID"
The identifier of a specific cart.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Query parameters

includelist of enumsOptional
  • redirect_urls: Create a direct link to a cart. This can be used for the /POST request for carts.
  • line_items.physical_items.options: The cart returns an abbreviated result. Use this to return physical items product options. To return the extended cart object, use in a /POST request.
  • line_items.digital_items.options: The cart returns an abbreviated result. Use this to return digital items product options. To return the extended cart object, use in a /POST request.
  • promotions.banners: Returns a list of eligible banners.
Allowed values:

Response

dataobject

A cart contains a collection of items, prices, discounts, etc. It does not contain customer-related data.

metaobject
Response metadata.

Errors

404
Not Found Error

OAuth scopes

UI NamePermissionParameter
Cartsmodifystore_cart
Cartsread-onlystore_cart_read_only
Information & Settingsmodifystore_v2_information
Information & Settingsread-onlystore_v2_information

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.