Skip to main content
input_object

A custom key-value pair that stores additional information on a cart or cart line. Attributes capture additional information like gift messages, special instructions, or custom order details. Learn more about managing carts with the Storefront API.

•String!
non-null

Key or name of the attribute.

•String!
non-null

Value of the attribute.


Was this section helpful?

Anchor to Input objects using this inputInput objects using this input

•INPUT OBJECT

The input fields for creating a Cart. Used by the cartCreate mutation.

Accepts merchandise lines, discount codes, gift card codes, and a note. You can also set custom attributes, metafields, buyer identity for international pricing, and delivery addresses.

•INPUT OBJECT

The input fields for adding a merchandise line to a cart. Each line represents a ProductVariant the buyer intends to purchase, along with the quantity and optional SellingPlan for subscriptions.

Used by the cartCreate mutation when creating a cart with initial items, and the cartLinesAdd mutation when adding items to an existing cart.

•INPUT OBJECT

The input fields for updating a merchandise line in a cart. Used by the cartLinesUpdate mutation.

Specify the line item's id along with any fields to modify. You can change the quantity, swap the merchandise, update custom attributes, or associate a different selling plan.


Was this section helpful?