Skip to main content

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": "fcn-nnS2x",
"billing": {
"address": {
"_id": "f31f46e90724c9cdbf2598eb",
"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": "489-kfgtZ",
"value": "value",
"redeemType": "redeemType"
}
},
"shipping": {
"method": "method",
"address": {
"_id": "ef8e9e9ba3d6c5423c3045c8",
"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": "19f4f81fe14185605edfccfb",
"id": "Swd-rubnl",
"configRef": "b4c579557b2cb8b0b0c4e13c",
"origin": "example",
"created": 1747758812500,
"shipping": {
"status": "example",
"date": 1761141551241,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1733062360877,
"refundDate": 1733257689253
},
"orderId": "example",
"note": {
"date": 1784983299230,
"content": "example"
},
"items": [
{
"_id": "23dc55c08b9399168f92e72f",
"id": "6pk-r39vP",
"quantity": 1.23,
"added": 1774401109459,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "9adda55db82a86c3a94faa46",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "f550c450ef95985f993cd344",
"id": "zR9-16FbV",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1763403602622,
"expires": 1745931313712,
"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​

NameTypeDescription
idString!Checkout identifier string.
billingCheckoutBillingInputBilling address and voucher information.
shippingCheckoutShippingInputShipping address and method information.

Returns​

Checkout