POST
/
carts
/
{cartId}
/
actions
/
split-line-item

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-fabric-tenant-id
string
required

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

x-fabric-channel-id
string

x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.

x-fabric-request-id
string

Unique request ID

Path Parameters

cartId
string
required

Cart ID

Body

application/json

Sample request to split line items

lineItemId
string
required

Line item id

quantities
integer[]
required

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

200 - application/json
id
string | null

Unique cart identifier

createdAt
string

Time cart was created

updatedAt
string

Time cart was last updated

name
string | null

Cart name

description
string | null

Cart description

lineItems
object[]
totalItems
integer | null

Number of line items in the cart

totalUniqueItems
integer | null

Number of different (unique) line items in the cart based on line item ID

status
enum<string>

Cart status <br/> PENDING - Cart is in pending state <br/> DELETED - Cart is in deleted state

Available options:
PENDING,
DELETED
accountId
string | null

Customer account ID

configuration
object

Cart configurations

customerContext
object

Customer context

totalAmount
number | null

Total price of line items after discount, including shipping and shipping discount

totalDiscount
number | null

Total discount applied to cart

totalFees
number | null

Total fees applied to cart

subTotal
number | null

Total price of line items, including shipping, without discount

currency
string
default: USD

Currency type

attributes
object

Cart attributes

appliedDiscounts
object[]

Applied discounts

fees
object[] | null
suggestedProducts
object[] | null

Suggested free products

orderNumber
string

The order number

error
object

Errors in this cart