Split a cart item
Splits a single item in a cart into multiple items, distributing its current quantity among them.
The orderForm is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the orderFormId is the identification code of a given cart.
You need to inform which cart you are referring to, by sending its orderFormId, and which item you want to split, by sending its uniqueId as the itemUniqueId path parameter.
In the request body, send an array of objects, each containing a quantity value. The item is then split into as many new items as there are objects in the array, each new item receiving the corresponding quantity. The sum of all the quantity values sent must match the current quantity of the item being split, and each resulting item is assigned a new uniqueId.
This request fails if the item's noSplitItem field is set to true. To check or change this configuration, use the Handle cart items request.
Permissions
This endpoint does not require permissions.
Path parameters
ID of the orderForm corresponding to the cart whose item will be split.
The uniqueId of the item to be split. Each cart item is identified by a unique ID, informed in the uniqueId field of the orderForm's items array.
Query parameters
Shows the product's estimated shipping date in the shippingEstimate field from the orderForm.
Headers
Type of the content being sent.
HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
Request body
Example request
[
{
"quantity": 1
}
]Response
OK