Elastic Path Cart Items API
Products added to a cart are referred to as a `cart_item`.
Products added to a cart are referred to as a `cart_item`.
openapi: 3.1.0
info:
version: 25.1126.6886238
x-version-timestamp: 2025-11-26 19:10:23+00:00
title: Addresses Introduction Account Addresses Cart Items API
description: 'The Addresses API allows you to organize account addresses. Addresses are a sub-resource of `account` resources, an account can have multiple addresses, such as home, work, and neighbour.
You can use an account address with either [client_credentials access token](/docs/api/authentication/create-an-access-token) or a combination of [implicit access token](/docs/api/authentication/create-an-access-token) and [Account Management authentication](/docs/api/accounts/post-v-2-account-members-tokens) token.
'
contact:
name: Elastic Path
url: https://www.elasticpath.com
email: support@elasticpath.com
license:
url: https://elasticpath.dev
name: MIT
servers:
- url: https://useast.api.elasticpath.com
description: US East
- url: https://euwest.api.elasticpath.com
description: EU West
security:
- BearerToken: []
tags:
- name: Cart Items
description: Products added to a cart are referred to as a `cart_item`.
paths:
/v2/carts/{cartID}/items:
parameters: []
get:
tags:
- Cart Items
summary: Get Cart Items
description: "\nUse this endpoint to retrieve cart items. If the cart is associated with shipping groups, calling this endpoint displays the associated shipping group IDs.\n\nYou can use this endpoint to retrieve the breakdown of cart items by promotion ID. For example, if you have Promotions Standard item discount with code *sale2024*, Rule Promotions item discount with code *sale2024*, and Rule Promotions cart discount with code *sale2024*, the `discounts.constituents` field in the response example will show the breakdown of the same promotion code used in both Promotions Standard and Rule Promotions.\n\n```json\n\"data\": [\n{\n \"id\": \"98de010d-dd10-4fa5-a070-0b9bcdc72974\",\n \"type\": \"cart_item\",\n \"product_id\": \"5a4662d2-9a2b-4f6e-a215-2970db914b0c\",\n \"name\": \"sku1\",\n \"description\": \"sku1\",\n \"sku\": \"sku1\",\n \"slug\": \"sku1\",\n \"image\": {\n \"mime_type\": \"\",\n \"file_name\": \"\",\n \"href\": \"\"\n },\n \"quantity\": 1,\n \"manage_stock\": false,\n \"unit_price\": {\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"includes_tax\": false\n },\n \"value\": {\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"includes_tax\": false\n },\n \"discounts\": [\n {\n \"amount\": {\n \"amount\": -2000,\n \"currency\": \"USD\",\n \"includes_tax\": false\n },\n \"code\": \"sale2024\",\n \"id\": \"e4d929d5-f471-4317-9a86-a84a6c572b44\",\n \"promotion_source\": \"rule-promotion\",\n \"is_cart_discount\": true\n },\n {\n \"amount\": {\n \"amount\": -1000,\n \"currency\": \"USD\",\n \"includes_tax\": false\n },\n \"code\": \"sale2024\",\n \"id\": \"de19a043-a6da-4bde-b896-d17e16b77e25\",\n \"promotion_source\": \"rule-promotion\"\n },\n {\n \"amount\": {\n \"amount\": -1000,\n \"currency\": \"USD\",\n \"includes_tax\": false\n },\n \"code\": \"sale2024\",\n \"id\": \"509295ee-2971-45b6-801e-95df09756989\"\n },\n {\n \"amount\": {\n \"amount\": -1000,\n \"currency\": \"USD\",\n \"includes_tax\": false\n },\n \"code\": \"sale2024\",\n \"id\": \"ca79e606-7ecd-41ac-9478-af4c8c28c546\",\n \"promotion_source\": \"rule-promotion\",\n \"is_cart_discount\": true\n }\n ],\n \"links\": {\n \"product\": \"https://useast.api.elasticpath.com/v2/products/5a4662d2-9a2b-4f6e-a215-2970db914b0c\"\n },\n \"meta\": {\n \"display_price\": {\n \"with_tax\": {\n \"unit\": {\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"formatted\": \"$50.00\"\n },\n \"value\": {\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"formatted\": \"$50.00\"\n }\n },\n \"without_tax\": {\n \"unit\": {\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"formatted\": \"$50.00\"\n },\n \"value\": {\n \"amount\": 5000,\n \"currency\": \"USD\",\n \"formatted\": \"$50.00\"\n }\n },\n \"tax\": {\n \"unit\": {\n \"amount\": 0,\n \"currency\": \"USD\",\n \"formatted\": \"$0.00\"\n },\n \"value\": {\n \"amount\": 0,\n \"currency\": \"USD\",\n \"formatted\": \"$0.00\"\n }\n },\n \"discount\": {\n \"unit\": {\n \"amount\": -5000,\n \"currency\": \"USD\",\n \"formatted\": \"-$50.00\"\n },\n \"value\": {\n \"amount\": -5000,\n \"currency\": \"USD\",\n \"formatted\": \"-$50.00\"\n }\n },\n \"without_discount\": {\n \"unit\": {\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"formatted\": \"$100.00\"\n },\n \"value\": {\n \"amount\": 10000,\n \"currency\": \"USD\",\n \"formatted\": \"$100.00\"\n }\n },\n \"discounts\": {\n \"sale2024\": {\n \"amount\": -5000,\n \"currency\": \"USD\",\n \"formatted\": \"-$50.00\",\n \"constituents\": {\n \"509295ee-2971-45b6-801e-95df09756989\": {\n \"amount\": -1000,\n \"currency\": \"USD\",\n \"formatted\": \"-$10.00\"\n },\n \"ca79e606-7ecd-41ac-9478-af4c8c28c546\": {\n \"amount\": -1000,\n \"currency\": \"USD\",\n \"formatted\": \"-$10.00\"\n },\n \"de19a043-a6da-4bde-b896-d17e16b77e25\": {\n \"amount\": -1000,\n \"currency\": \"USD\",\n \"formatted\": \"-$10.00\"\n },\n \"e4d929d5-f471-4317-9a86-a84a6c572b44\": {\n \"amount\": -2000,\n \"currency\": \"USD\",\n \"formatted\": \"-$20.00\"\n }\n }\n }\n }\n },\n \"timestamps\": {\n \"created_at\": \"2024-05-24T18:00:58Z\",\n \"updated_at\": \"2024-05-24T18:00:58Z\"\n }\n },\n \"catalog_id\": \"09b9359f-897f-407f-89a2-702e167fe781\",\n \"catalog_source\": \"pim\"\n}\n```\n"
operationId: getCartItems
parameters:
- name: cartID
in: path
description: The unique identifier of the cart that you created.
required: true
style: simple
schema:
type: string
- name: include
in: query
description: A comma-separated list of related resources to include in the response.
required: false
style: form
explode: false
schema:
type: array
items:
type: string
enum:
- tax_items
- custom_discounts
- promotions
responses:
'200':
description: ''
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemCollectionResponse'
deprecated: false
put:
tags:
- Cart Items
summary: Bulk Update Items in Cart
description: 'The bulk update feature allows shoppers to update an array of items to their cart in one action, rather than updating each item one at a time. Shoppers can update quantity and shipping group details in bulk requests. This minimizes the time for shoppers while updating items to their cart. Shoppers can even update multiple items with the same or different shipping groups to their cart.
When you update multiple items that qualify for free gifts in the cart, the corresponding free gifts for all eligible products are also automatically updated in the cart.
'
operationId: bulkUpdateItemsInCart
parameters:
- name: cartID
in: path
description: The unique identifier of the cart that you created.
required: true
style: simple
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/BulkUpdateCartsItems'
required: false
responses:
'200':
description: Successfully updated cart items
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/CartItemCollectionResponse'
'400':
description: Insufficient Stock
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
examples:
default:
summary: Insufficient Stock
value:
errors:
- detail: There is not enough stock to add Fry Pan to your cart
meta:
id: 0e5bae32-cc71-4ede-8d7d-cb662e90c542
status: 400
title: Insufficient stock
'403':
description: Unauthorized call
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
examples:
default:
summary: No permissions to use custom attributes
value:
errors:
- detail: No permissions to fulfill this request with cart item custom_attributes
meta:
id: 0e5bae32-cc71-4ede-8d7d-cb662e90c542
status: 403
title: Unauthorised call
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
examples:
default:
summary: Not Found
value:
errors:
- detail: Item was not found in the cart
meta:
id: 0e5bae32-cc71-4ede-8d7d-cb662e90c542
ids:
- 0e5bae32-cc71-4ede-8d7d-cb662e90c542
status: 404
title: Not Found
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/Response.ErrorResponse'
examples:
default:
summary: Could not apply EP promotion with the given code
value:
errors:
- detail: The cart is configured to use custom discounts
meta:
code: 10_OFF
ids:
- 0e5bae32-cc71-4ede-8d7d-cb662e90c542
status: 422
title: Could not apply EP promotion with the given code
deprecated: false
post:
tags:
- Cart Items
summary: Add Items to Cart
description: "\n### Add Product to Cart\n\nAdding a Product to Cart is the most common Cart action. If you want to add any custom products or promotions, you need to do that as a separate action.\n\n#### Dynamic Bundles\n\nA bundle is a purchasable product that is composed of a combination of two or more products that you want to sell together. You can create multiple components within a bundle. Each component can have one or more options. Each option is a product and a quantity. You can configure minimum and/or maximum values for the number of product options in a component that your shoppers can select. For example, you can enable a shopper to select 1 or more product options from a list of 10. These are called [dynamic bundles](/docs/api/pxm/products/products#dynamic-bundles).\n\nYour dynamic bundles are displayed in your published catalogs.\n\n1. Use the configure a shopper endpoint to allow shoppers to make their selections from a bundle.\n2. In the response of the configure a shopper, the `bundle_configuration` object contains the bundle selections a shopper has made.\n3. In the add a product to cart request, use the `bundle_configuration` object to add the customers selections to a cart.\n\n```json\n \"bundle_configuration\": {\n \"selected_options\": {\n \"games\": {\n \"d7b79eb8-19d8-45ea-86ed-2324a604dd9c\": 1\n },\n \"toys\": {\n \"0192ccdd-6d33-4898-87d7-c4d87f2bf8ea\": 1,\n \"1aea6f97-f0d9-452c-b3c1-7fb5629ead82\": 1\n }\n }\n}\n```\n\nWhen a cart is checked out, the options a shopper selected are added to the order. See [order items](/docs/api/carts/get-order-items).\n\n#### Personalized Products\n\nYou can allow shoppers to personalize their goods by adding custom text inputs to products directly. This feature is particularly useful for customizable items, such as personalized T-shirts or greeting cards. You can use this functionality by leveraging the `custom_inputs` attribute, and defining the details and validation rules for the custom text.\n\nFirst, you must configure a `custom_inputs` attribute when creating a new product or updating an existing product. Once you have defined your custom inputs on a product, you must configure the custom inputs in your orders.\n\nFor example, you may sell T-shirts that can have personalized text on the front and back of the shirt.\n\n```json\n {\n \"data\": {\n \"type\": \"product\",\n \"attributes\": {\n \"custom_inputs\": {\n \"front\": {\n \"name\": \"T-Shirt Front\",\n \"validation_rules\": [\n {\n \"type\": \"string\",\n \"options\": {\n \"max_length\": 50\n }\n }\n ],\n \"required\": false\n },\n \"back\": {\n \"name\": \"T-Shirt Back\",\n \"validation_rules\": [\n {\n \"type\": \"string\",\n \"options\": {\n \"max_length\": 50\n }\n }\n ],\n \"required\": false\n }\n }\n }\n }\n}\n```\n\nIf the same product has different `custom_inputs` attributes, then these are added as separate items in a cart.\n\nThe `custom_inputs` attribute is stored in the cart item and the text for `custom_input` must not exceed 255 characters in length. When a cart is checked out, the `custom_inputs` attribute becomes part of the order.\n\n#### Limitations on Usage of `custom_inputs` with Specific Promotion Types\n\nWhen you add products to a cart with `custom_inputs`, there are certain limitations on usage of the `custom_inputs` with the following promotion types:\n\n - For [Free Gift Promotions](/docs/api/promotions/create-a-promotion), you can add `custom_inputs` to gift items.\n - For [Fixed Bundle Discount Promotions](/docs/api/promotions/create-a-promotion), the promotion applies as long as the cart contains the bundle SKUs even when there are different `custom_inputs`.\n - For [X for Y Discount Promotion and X for amount discount promotion](/docs/api/promotions/create-a-promotion), the promotion applies when there are two SKUs with the same `custom_inputs`. The promotion does not apply when there are different `custom_inputs` and the SKUs are in different line items.\n\n#### Stock locations\n\nWhen adding to a cart it is possible to specify which [stock location](/docs/api/pxm/inventory_mli/inventories-introduction?#multi-location-inventories) should be used for tracking inventory for that product by specifying its slug in `location`. This might represent the warehouse a product is shipped from or the store holding the stock in a Buy Online Pick Up In Store scenario.\n\nEach line item is restricted to a single stock location. If the same product is added with a different location then the most recently-specified location will be used for the total quantity of that line item.\n\n:::note\n\n- Any requests to add a product to cart returns the collection of cart items.\n- [Tax items](/docs/api/carts/tax-items) may optionally be added with the product. Only administrators with [client_credentials access tokens](/docs/api/authentication/create-an-access-token) are able to do this. If included, they replace any existing taxes on the product.\n- The cart currency is set when the first item is added to the cart.\n- The product being added to the cart requires a price in the same currency as the other items in the cart. The API returns a 400 error if a price is not defined in the correct currency.\n- A cart can contain a maximum of 100 unique items. Items include products, custom items, tax items, and promotions.\n- There are a number of actions that happen to your inventory when checking out and paying for an order. For more information, see the [Inventory](/docs/api/pxm/inventory/inventories-introduction) documentation.\n\n:::\n\n### Including Resources\n\nWhen you make an `Add Product to Cart` request to the catalog-view service, you can obtain details of the component products. If you include the optional parameter `include=component_products` in the request, the response will include details for each component product.\n\nWhen a bundle with selected component products is added to a cart, the cart displays both the bundle pricing and component product IDs.\n\nThe response example is returned with a new field called `component_products` under `bundle_configuration`, which is a list of component products that the user has selected for dynamic bundles.\n\n| Parameter | Required | Description |\n|:------------------------|:-------------|:-------------------|\n| `component_products` | Optional | The component product data and key attribute data, such as SKU or slug, to return for component products in a product bundle. |\n| `main_image` | Optional | The main images associated with a product. |\n| `files` | Optional | Any files associated with a product. |\n\n```json\n\"bundle_configuration\": {\n \"selected_options\": {\n \"mixed-shirts\": {\n \"16a6cc14-6ebb-4156-9973-e6a0f92f5731\": 3,\n \"55037cc5-f382-4039-95c6-1e04ac0351d3\": 2,\n \"standard-shirts\"\n \"70f1c9d2-c580-4839-bd6c-a0a9b91d5159\": 5\n }\n },\n \"component_products\": [\n {\n \"id\": \"16a6cc14-6ebb-4156-9973-e6a0f92f5731\",\n \"type\": \"product\",\n \"attributes\": {\n \"name\": \"Red T-shirt\",\n \"description\": \"Standard red t-shirt.\",\n \"slug\": \"red-t-shirt-slug\",\n \"sku\": \"red-t-shirt-sku\",\n \"status\": \"live\",\n \"commodity_type\": \"physical\"\n },\n \"meta\": {\n \"display_price\": {\n \"without_tax\": {\n \"amount\": 500,\n \"currency\": \"USD\",\n \"formatted\": \"$5.00\"\n }\n }\n }\n },\n {\n \"id\": \"55037cc5-f382-4039-95c6-1e04ac0351d3\",\n \"type\": \"product\",\n \"attributes\": {\n \"name\": \"Blue T-shirt\",\n \"description\": \"Standard blue t-shirt.\",\n \"slug\": \"blue-t-shirt-slug\",\n \"sku\": \"blue-t-shirt-sku\",\n \"status\": \"live\",\n \"commodity_type\": \"physical\"\n },\n \"meta\": {\n \"display_price\": {\n \"without_tax\": {\n \"amount\": 500,\n \"currency\": \"USD\",\n \"formatted\": \"$5.00\"\n }\n }\n }\n },\n {\n \"id\": \"70f1c9d2-c580-4839-bd6c-a0a9b91d5159\",\n \"type\": \"product\",\n \"attributes\": {\n \"name\": \"White T-shirt\",\n \"description\": \"Standard white t-shirt.\",\n \"slug\": \"white-t-shirt-slug\",\n \"sku\": \"white-t-shirt-sku\",\n \"status\": \"live\",\n \"commodity_type\": \"physical\"\n },\n \"meta\": {\n \"display_price\": {\n \"without_tax\": {\n \"amount\": 500,\n \"currency\": \"USD\",\n \"formatted\": \"$5.00\"\n }\n }\n }\n }\n ]\n}\n```\n\nSee [Including Resources](https://elasticpath.dev/guides/Getting-Started/includes).\n\n### Add Subscription to Cart\n\nTo add a subscription to your cart, you need to provide the ID of the subscription offering, and the ID of the pricing option and plan within that offering that you want to subscribe to.\n\n```json\n {\n {\n \"data\": {\n \"id\": \"5b9be99f-1c94-4ddd-9718-81adab0cc3e0\",\n \"type\": \"subscription_item\",\n \"quantity\": 1,\n \"subscription_configuration\": {\n \"plan\": \"dfa31307-748c-4369-8571-709f924a0807\",\n \"pricing_option\": \"40010dde-2f38-489b-8b3f-14a13cbfb431\"\n }\n }\n }\n```\n\nThe price of the subscription item in the cart reflects the cost of the subscription's initial billing period. Once the cart has been checked out and the order paid for, the subscription will be automatically created in the subscriptions service.\n\n### Add Custom Item to Cart\n\nYou can add a custom item to the cart when you don't manage things like shipping, taxes and inventory in Commerce.\n\nFor [Shipping Groups](/docs/ship-groups/shipping-groups/index), once you have created a [cart shipping group](/docs/ship-groups/shipping-groups/shipping-groups-api/create-cart-shipping-group), you need to link it to the cart items. This is important, because it is necessary to associate items with shipping groups in order to include shipping groups in the corresponding cart, order, and totals.\n\n:::note\n\n- Custom Cart Items are available when using [implicit access tokens](/docs/api/authentication/create-an-access-token). Ensure that you always check each order has the correct details for each item, most importantly, price.\n\n:::\n\n### Add Promotion to Cart\n\nYou can use the Promotions API to apply discounts to your cart as a special cart item type. Any requests to add a product to cart will return a collection of cart items.\n\n There are certain limitations on usage of the `custom_inputs` attribute with some promotion types. See [Limitations on Usage of `custom_inputs` with Specific Promotion Types](/docs/api/carts/manage-carts#limitations-on-usage-of-custom_inputs-with-specific-promotion-types).\n\nTo remove promotion from the cart via the promotion code, see [Delete Promotion Code from Cart](/docs/api/carts/delete-a-promotion-via-promotion-code).\n\n### Re-order\n\nFrom a shopper's order history, they can add the items from a previous order into their carts. Shoppers can add items regardless of past order status, such as incomplete or not paid. For more information, see [Orders](/docs/api/carts/orders).\n\n:::note\n - Any requests to add an item to cart return a collection of [cart items](/docs/api/carts/cart-items).\n - A cart can contain a maximum of 100 unique items. Items include products, custom items, and promotions.\n - When a shopper creates a cart and re-orders items from an order with properties such as custom attributes, custom discounts, and payment intent ID, these properties will remain unchanged in the original cart.\n - Custom items do not exist in catalogs, and therefore cannot be reordered.\n:::\n\n### Merging Carts\n\nA shopper can have multiple carts, and the system may automatically merge items from an anonymous cart into the shopper's registered cart when they sign in. For example, if a shopper has an existing cart with items `A`, `B` and `C`, and later adds items `D` and `E` while not signed in, the system can merge these carts when the shopper signs in. After the carts merge, the cart contains items `A`, `B`, `C`, `D` and `E`.\n\nIf any items are duplicated from the anonymous cart to the registered cart, their quantities are incremented accordingly. For example, if a shopper's existing cart with items `A`, `B` and `C`, and they later add two more `A` items and one `B` item while not signed in, the system will merge the carts when the shopper signs in. The existing cart will now contain three `A` items, two `B` items, and one `C` item.\n\n:::note\n\nWhen the system merges items from one cart into another cart, properties such as custom attributes, custom discounts, and payment intent ID will remain unchanged in the original cart.\n\n:::\n\n### Best Practices\n\nWe recommend to include a unique `sku` code within the request body while adding custom items to carts. If the same `sku` is used for multiple products, they are merged into a single line item.\n\nFor example, if a cart consists of the following items:\n\n- `product-1` with quantity 1 and sku code as `sku-1`\n- `product-2` with quantity 1 and sku code as `sku-1`\n- `product-3` with quantity 1 and sku code as `sku-2`.\n\nThe following response is returned where it combines all products with the same sku codes into a single line item, while products with a unique sku codes are represented as separate items:\n\n```json\n{\n \"data\": [\n {\n \"id\": \"c58760f4-8889-4719-b34d-be1f1d11ae59\",\n \"type\": \"custom_item\",\n \"name\": \"product-1\",\n \"description\": \"My first custom item!\",\n \"sku\": \"sku-1\",\n \"slug\": \"\",\n \"image\": {\n \"mime_type\": \"\",\n \"file_name\": \"\",\n \"href\": \"\"\n },\n \"quantity\": 2,\n \"manage_stock\": false,\n \"unit_price\": {\n \"amount\": 20000,\n \"currency\": \"USD\",\n \"includes_tax\": true\n },\n \"value\": {\n \"amount\": 40000,\n \"currency\": \"USD\",\n \"includes_tax\": true\n },\n \"links\": {},\n \"meta\": {\n \"display_price\": {\n \"with_tax\": {\n \"unit\": {\n \"amount\": 20000,\n \"currency\": \"USD\",\n \"formatted\": \"$200.00\"\n },\n \"value\": {\n \"amount\": 40000,\n \"currency\": \"USD\",\n \"formatted\": \"$400.00\"\n }\n },\n \"without_tax\": {\n \"unit\": {\n \"amount\": 20000,\n \"currency\": \"USD\",\n \"formatted\": \"$200.00\"\n },\n \"value\": {\n \"amount\": 40000,\n \"currency\": \"USD\",\n \"formatted\": \"$400.00\"\n }\n },\n \"tax\": {\n \"unit\": {\n \"amount\": 0,\n \"currency\": \"USD\",\n \"formatted\": \"$0.00\"\n },\n \"value\": {\n \"amount\": 0,\n \"currency\": \"USD\",\n \"formatted\": \"$0.00\"\n }\n },\n \"discount\": {\n \"unit\": {\n \"amount\": 0,\n \"currency\": \"USD\",\n \"formatted\": \"$0.00\"\n },\n \"value\": {\n \"amount\": 0,\n \"currency\": \"USD\",\n \"formatted\": \"$0.00\"\n }\n },\n \"without_discount\": {\n \"unit\": {\n \"amount\": 20000,\n \"currency\": \"USD\",\n \"formatted\": \"$200.00\"\n },\n \"value\": {\n \"amount\": 40000,\n \"currency\": \"USD\",\n \"formatted\": \"$400.00\"\n }\n }\n },\n \"timestamps\": {\n \"created_at\": \"2023-05-02T16:28:11Z\",\n \"updated_at\": \"2023-05-02T16:28:18Z\"\n }\n }\n ]\n ```\n"
operationId: manageCarts
parameters:
- name: cartID
in: path
description: The unique identifier of the cart that you created.
required: true
style: simple
schema:
type: string
requestBody:
description: ''
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/CartItemObjectRequest'
- $ref: '#/components/schemas/SubscriptionItemObject'
- $ref: '#/components/schemas/CartMergeObjectRequest'
- $ref: '#/components/schemas/CustomItemObject'
- $ref: '#/components/schemas/ReOrderObjectRequest'
- $ref: '#/components/schemas/PromotionItemObject'
- $ref: '#/components/schemas/BulkAddItemsRequest'
examples:
Add Cart Item:
value:
data:
type: cart_item
id: df32387b-6ce6-4802-9b90-1126a5c5a54f
quantity: 1
custom_inputs:
name:
tshirt_front: Jane
tshirt_back: Jane Doe's Dance Academy
Add Subscription Item:
value:
data:
type: subscription_item
id: 1f49c20c-54b9-453b-a57c-ef8303a6415f
quantity: 1
subscription_configuration:
plan: dfa31307-748c-4369-8571-709f924a0807
pricing_option: a2cd9dae-3a28-4185-93b7-1b02a8ce0c2e
Add Custom Item:
value:
data:
type: custom_item
name: My Custom Item
sku: my-custom-item
description: My first custom item!
quantity: 1
price:
amount: 10000
Add Promotion to Cart:
value:
data:
type: promotion_item
# --- truncated at 32 KB (117 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elastic-path/refs/heads/main/openapi/elastic-path-cart-items-api-openapi.yml