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": "m4l-xd16y",
"billing": {
"address": {
"_id": "6869e1a4630147b3de7ab5b5",
"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": "Kbl-32GpO",
"value": "value",
"redeemType": "redeemType"
}
},
"shipping": {
"method": "method",
"address": {
"_id": "428b43be4306fb1519aad82a",
"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": "e88ee160dac822847c4a4705",
"id": "Cus-RXbHh",
"configRef": "63a6d4055b18208f139f6235",
"origin": "example",
"created": 1741757064661,
"shipping": {
"status": "example",
"date": 1738295373696,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1768219346017,
"refundDate": 1763994274999
},
"orderId": "example",
"note": {
"date": 1727657705526,
"content": "example"
},
"items": [
{
"_id": "c7bf6421432050475a370cbf",
"id": "aXn-ayhTO",
"quantity": 1.23,
"added": 1719956388401,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "7c2e0500d45002ff10d25c24",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "f54317bb17215898b8607a6f",
"id": "HsD-SI0mN",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1715273312393,
"expires": 1716636044581,
"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