Skip to Content
ReferenceStorefrontv1.0.0 API ReferenceMutationscartBuyerIdentityUpdate

cartBuyerIdentityUpdate

Updates the buyer identity for an existing cart.

Authentication

Public Access: Accessible with the public API key

Mutation Structure

mutation { cartBuyerIdentityUpdate(id: String!, buyerIdentity: BuyerIdentityInput) { cart { # Cart fields } userErrors { # UserError fields } } }

Input Arguments

ArgumentTypeRequiredDescription
idString!YesThe ID of the cart to update the buyer identity for
buyerIdentityBuyerIdentityInputNoThe new buyer identity for the cart

Return Type

CartBuyerIdentityUpdatePayload - Payload returned by the cartBuyerIdentityUpdate mutation. Contains the updated cart and any errors that occurred during the operation.

Example

mutation { cartBuyerIdentityUpdate( id: "eyJhbGciOiJIUzI1NiJ9..." buyerIdentity: { email: "customer@example.com" firstName: "John" lastName: "Doe" countryCode: "US" } ) { cart { id buyerIdentity { email firstName lastName } } userErrors { field message } } }