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
| Argument | Type | Required | Description |
|---|---|---|---|
| id | String! | Yes | The ID of the cart to update the buyer identity for |
| buyerIdentity | BuyerIdentityInput | No | The 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
}
}
}