POST
/
carts
/
{cartId}
/
line-items

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

Line items to add to cart

itemId
any
required
quantity
integer
required

Number of line items in cart

sku
string | null

Item SKU

priceListId
integer | null

Item price list ID

attributes
object | null

Additional data passed by the caller

fulfillment
object | null

Fulfillment request details

fees
object[] | null

Response

201 - application/json

Line item details

id
string | null

Line item ID

itemId
any
position
integer

Line item position number (starts at 1)

Required range: x > 1
name
string | null

Line item name

sku
string

Line item SKU

productAttributes
object[] | null

Additional line item options

createdAt
string

Time line item was created

updatedAt
string

Time line item was last updated

quantity
integer

Line item quantity

priceListId
integer | null

Line item price list ID

isActive
boolean | null

true: Item is active<br />false: Item is inactive

price
any | null

Individual line item price

discounts
any[]

Individual line item discount

groups
string[] | null
attributes
object | null

Attributes passed by caller

channel
string

Sales channel

isPickup
boolean

true: Item is set for pickup<br />false: Item is set for delivery

warehouseId
string | null

Warehouse ID

shippingDetails
object

Shipping details

fulfillment
object | null

The fulfillment details.

fees
object[] | null
adjustments
object[] | null

Was this page helpful?