Skip to main content
interface

Defines the shared fields for items in a shopping cart. Implemented by CartLine for individual merchandise and ComponentizableCartLine for grouped merchandise like bundles.

Each implementation includes the merchandise being purchased, quantity, cost breakdown, applied discounts, custom attributes, and any associated SellingPlan.

•Attribute

An attribute associated with the cart line.

Arguments

•String!
required

The key of the attribute.


•[Attribute!]!
non-null

The attributes associated with the cart line. Attributes are represented as key-value pairs.

•CartLineCost!
non-null

The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout.

•[CartDiscountAllocation!]!
non-null

The discounts that have been applied to the cart line.

•ID!
non-null

A globally-unique ID.

•Merchandise!
non-null

The merchandise that the buyer intends to purchase.

•Int!
non-null

The quantity of the merchandise that the customer intends to purchase.

Anchor to sellingPlanAllocationsellingPlanAllocation
•SellingPlanAllocation

The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased.

•CartLineEstimatedCost!
non-nullDeprecated

Was this section helpful?

Anchor to Types implemented inTypes implemented in

•OBJECT

An item in a customer's Cart representing a product variant they intend to purchase. Each cart line tracks the merchandise, quantity, cost breakdown, and any applied discounts.

Cart lines can include custom attributes for additional information like gift wrapping requests, and can be associated with a SellingPlanAllocation for purchase options like subscriptions, pre-orders, or try-before-you-buy. The instructions field indicates whether the line can be removed or have its quantity updated.

•Attribute

An attribute associated with the cart line.

Arguments

•String!
required

The key of the attribute.


•[Attribute!]!
non-null

The attributes associated with the cart line. Attributes are represented as key-value pairs.

•CartLineCost!
non-null

The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout.

•[CartDiscountAllocation!]!
non-null

The discounts that have been applied to the cart line.

•ID!
non-null

A globally-unique ID.

•CartLineInstructions!
non-null

The instructions for the line item.

•Merchandise!
non-null

The merchandise that the buyer intends to purchase.

•CartLineParentRelationship

The parent of the line item.

•Int!
non-null

The quantity of the merchandise that the customer intends to purchase.

Anchor to sellingPlanAllocationsellingPlanAllocation
•SellingPlanAllocation

The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased.

•CartLineEstimatedCost!
non-nullDeprecated
•OBJECT

Represents information about the grouped merchandise in the cart.

•Attribute

An attribute associated with the cart line.

Arguments

•String!
required

The key of the attribute.


•[Attribute!]!
non-null

The attributes associated with the cart line. Attributes are represented as key-value pairs.

•CartLineCost!
non-null

The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout.

•[CartDiscountAllocation!]!
non-null

The discounts that have been applied to the cart line.

•ID!
non-null

A globally-unique ID.

•[CartLine!]!
non-null

The components of the line item.

•Merchandise!
non-null

The merchandise that the buyer intends to purchase.

•Int!
non-null

The quantity of the merchandise that the customer intends to purchase.

Anchor to sellingPlanAllocationsellingPlanAllocation
•SellingPlanAllocation

The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased.

•CartLineEstimatedCost!
non-nullDeprecated

Was this section helpful?