Split the cart item by quantity
Split a specific line item into multiple line items by given quantity. This allows adding different attributes (for example, different shipping locations) to each split line item. Each split line item is assigned a unique line item ID after the split.
Headers
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
API Key for Gateway
Authorization token for the user
Path Parameters
ID of the cart for which line items are to be split
Body
Sample request to split line items
Cart item sequence number (starts at 1)
x > 1
Line item quantities for each split line item, meaning quantities assigned to each individual line item after the original line item (by lineItemId) is split into multiple line items.
Response
Cart details
Items in cart
Currency type
Metadata for this cart
All promotions or coupons for items in this cart
Errors in this cart
Cart ID
Cart creation time
Last time cart was updated
Number of items in the cart
Number of unique items in the cart based on line item ID
Cart status
ACTIVE
, PENDING
, PENDING_APPROVAL
, APPROVED
, SUBMITTED
, DELETED
, REJECTED
Merchant ID
Customer account ID
User ID
Cart configurations
Customer context
Total price of cart items after discount including Shipping and Shipping Discount
Total price of cart items including Shipping without any discount
Total discount applied to cart
Total fees applied to cart
Additional item options
Fees associated with a specific cart or an individual line item of a cart
List of recommended products that are available for purchase along with the item added to the cart
Was this page helpful?