checkoutUpdateAddresses Mutation
Description
Updates billing and shipping addresses for a checkout.
mutation checkoutUpdateAddresses(
$id: String!
$billing: CheckoutBillingInput
$shipping: CheckoutShippingInput
) {
checkoutUpdateAddresses(id: $id, billing: $billing, shipping: $shipping) {
_id
id
configRef
origin
created
shipping {
status
date
method
freeShippingThreshold
tracking
shopCollection
weight
}
billing {
status
paymentDate
refundDate
}
orderId
note {
date
content
}
items {
_id
id
quantity
added
total
unavailable
}
buyer {
_id
email
firstName
id
lastName
name
telephone
organisation
taxNumber
isGuest
}
seller {
_id
id
firstName
lastName
name
email
telephone
taxNumber
}
updated
expires
status
message
totals {
grand
leftToPay
discount
itemsQuantity
itemQuantity
subtotal
subtotalBeforeTaxes
shipping
tax
}
urls {
checkout
storefront
}
useSingleAddress
}
}
Variables
{
"id": "sHM-BdVUA",
"billing": {
"address": {
"_id": "a1a717a2af16435f585bd087",
"description": "A description",
"firstName": "John",
"lastName": "Doe",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"streetNumber": "streetNumber",
"city": "Montreal",
"state": "Quebec",
"stateCode": "stateCode",
"postCode": "postCode",
"country": "Canada",
"alpha2": "alpha2",
"type": "type"
},
"voucher": {
"id": "qlJ-5Rfi5",
"value": "value",
"redeemType": "redeemType"
}
},
"shipping": {
"method": "method",
"address": {
"_id": "e3ab0a4ea75cd1a0bb6c4cec",
"description": "A description",
"firstName": "John",
"lastName": "Doe",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"streetNumber": "streetNumber",
"city": "Montreal",
"state": "Quebec",
"stateCode": "stateCode",
"postCode": "postCode",
"country": "Canada",
"alpha2": "alpha2",
"type": "type"
},
"tracking": "tracking",
"confirmationEmail": {
"recipient": "recipient"
},
"shopCollection": true
}
}
Response
{
"checkoutUpdateAddresses": {
"_id": "4354f86fb295295a18a4ebd7",
"id": "wZM-3JTgc",
"configRef": "73fad5c9d1e9b68a5ed3f289",
"origin": "example",
"created": 1748633256163,
"shipping": {
"status": "example",
"date": 1745136787401,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1753925865804,
"refundDate": 1724072241834
},
"orderId": "example",
"note": {
"date": 1726228694743,
"content": "example"
},
"items": [
{
"_id": "5246275f2d21bd00fcd4aa82",
"id": "EDy-EtBfl",
"quantity": 1.23,
"added": 1751384935876,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "db224e40622e007de8b8a196",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "c1dc800ed51979c9341ae920",
"id": "IZo-wuZMp",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1729516989029,
"expires": 1743136050036,
"status": "example",
"message": "example",
"totals": {
"grand": 1.23,
"leftToPay": 1.23,
"discount": 0.1,
"itemsQuantity": 1.23,
"itemQuantity": 42,
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"shipping": 1.23,
"tax": 1.23
},
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true
}
}
Arguments
| Name | Type | Description |
|---|---|---|
id | String! | Checkout identifier string. |
billing | CheckoutBillingInput | Billing address and voucher information. |
shipping | CheckoutShippingInput | Shipping address and method information. |