Przejdź do głównej zawartości

CartCreateInput

Input for cartCreate. All fields are optional — pass only what you have at cart creation time.

input CartCreateInput {
attributes: [CartAttributeInput!]
buyerIdentity: CartBuyerIdentityInput
discountCodes: [String!]
email: String
lines: [CartLineInput!]
note: String
shippingAddress: CartAddressInput
}

Fields​

CartCreateInput.attributes ● [CartAttributeInput!] list input​

Cart-level custom attributes to set on the new cart (up to 50 entries).

CartCreateInput.buyerIdentity ● CartBuyerIdentityInput input​

Buyer identity to attach to the new cart (email, phone, customer ID, country, language).

CartCreateInput.discountCodes ● [String!] list scalar​

Discount codes to apply at creation (up to 10). Equivalent to calling cartDiscountCodesUpdate immediately after creating the cart.

CartCreateInput.email ● String scalar​

Buyer email — shortcut for buyerIdentity.email. If both are provided, this field wins.

CartCreateInput.lines ● [CartLineInput!] list input​

Initial lines to add to the cart (up to 100).

CartCreateInput.note ● String scalar​

Buyer-supplied note (max 1000 chars), e.g. delivery instructions.

CartCreateInput.shippingAddress ● CartAddressInput input​

Shipping address to attach to the new cart — lets the storefront skip a follow-up cartSetShippingAddress call.

Member Of​

cartCreate mutation