Skip to Content

CartInput

Input for creating a new cart

Input Definition

input CartInput { lines: [CartLineInput] buyerIdentity: BuyerIdentityInput }

Fields

FieldTypeRequiredDescription
lines[CartLineInput]NoA list of merchandise lines to add to the cart
buyerIdentityBuyerIdentityInputNoThe buyer identity associated with the cart

Example

mutation CreateCart($input: CartInput!) { createCart(input: $input) { cart { id lines { id quantity } } } } # Variables { "input": { "lines": [ { "productId": 12345, "quantity": 2 } ], "buyerIdentity": { "email": "customer@example.com", "countryCode": "US" } } }