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": "OIY-CTB62",
"billing": {
"address": {
"_id": "a7dfd113b26993c7a38986c4",
"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": "y2h-XjI3U",
"value": "value",
"redeemType": "redeemType"
}
},
"shipping": {
"method": "method",
"address": {
"_id": "ea1a52328bbc4aa68e0c49d3",
"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": "23371a1de2b5874c7eaca28a",
"id": "qL8-9mac2",
"configRef": "efda54b91e5fc6f2431b2910",
"origin": "example",
"created": 1748296577059,
"shipping": {
"status": "example",
"date": 1761058354305,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1769451429961,
"refundDate": 1727319866729
},
"orderId": "example",
"note": {
"date": 1753877469157,
"content": "example"
},
"items": [
{
"_id": "8d86ed2529abc01da4a36cf8",
"id": "FCy-CZcrx",
"quantity": 1.23,
"added": 1758279915493,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "33f06454037c050ab2238c38",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "a8296569cc83615c1698eeda",
"id": "MLK-NEyiu",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1751603837522,
"expires": 1770076077345,
"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. |