Line items

Learn more about line items.

Line items resource

The following describes some of the key attributes of line items.

Order identifier

The orderId is the order's identifier. This path parameter is required when you get the line items for an order, get a line item for an order, or get line items for an order, or get a line item for an order.

Line items identifier

The lineItemsId is the line item's identifier. This path parameter is required when you get a line item for a cart, update a line item for a cart, delete a line item in a cart, get a line item for an order, get a line item from a cart, update a line item for a cart, delete a line item in a cart, or get a line item for an order.

Line items query parameters

You can specify one or more query parameters separated by an ampersand (&) to return a filtered list of line items. The following topics describe the query parameters available for line-items. For more information on how to use query parameters, see Fields and query parameters.

Action

The action parameter modifies the POST behavior. The action parameter determines the method behavior for handling the quantity associated with a posted line item. Valid values are: add, update, and subtract. The default action for the POST /v1/shoppers/me/carts/active/line-items/{lineItemsId} resource method is update. The default action for the POST /v1/shoppers/me/carts/active/line-items resource method is add. To override the default method behavior for handling quantity, explicitly specify the value of the action query parameter. This query parameter is available when you update a line item for a cart.

Company Identifier

The companyId is the company's identifier. This query parameter is available when you add line items to a cart

Expand

Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides additional fields in the response. Expanding resources reduces the number of API calls required to accomplish a task. This query parameter is available when you add line items to a cart, get line items for an order, update a line item for a cart, or get a line item for an order.

External reference identifier (ERID)

The externalReferenceId is a company's internal identifier for a product. This query parameter is available when you add line items to a cart and get a line item from a cart

Fields

Use the fields query parameter to specify the fields that appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time. This query parameter is available when you add line items to a cart, get line items for an order, get a line item from a cart, update a line item for a cart, or get a line item for an order.

Offer identifier

The offerId is the offer's identifier. This query parameter is available when you add line items to a cart

Line item identifier

A lineItemsId is a comma-separated list of one or more line item identifiers. This query parameter is available when you delete line items from a cart.

Parent line item identifier

The parentLineItemId is the line item identifier of the parent product. While adding a child product to the cart, provide the line item identifier of the parent product along with the offer identifier to specify the child product should be associated with which parent product line item. This query parameter is available when you add line items to a cart.

Product identifier

A productId is the unique product identifier or unique stock keeping unit (SKU) for a product. A product's unique identifier is represented by an id. This query parameter is available when you add line items to a cart.

Token

The token is the authorized or anonymous token for the shopper. This query parameter is available when you add line items to a cart, delete line items from a cart, get line items for an order, get a line item from a cart, update a line item for a cart, delete a line item in a cart, or get a line item for an order.

Quantity

The quantity is the number of products added to the cart. The value must be a valid integer. If the quantity is not explicitly specified, the default is 1. This query parameter is available when you add line items to a cart or update a line item for a cart.

Suppress order confirmation email

A real order uses suppressorderconfirmationemail to suppress the order confirmation email. If you want to use this feature, contact your Customer Success Manager. This query parameter is available when you add line items to a cart.

Last updated