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": "KWD-FXebt",
"billing": {
"address": {
"_id": "25fa3bf20bc7a547954442fb",
"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": "IQL-rXVr1",
"value": "value",
"redeemType": "redeemType"
}
},
"shipping": {
"method": "method",
"address": {
"_id": "c2aed280fb55b8ccbedb9099",
"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": "d8f775200b562778e04ebffa",
"id": "zoW-25ro4",
"configRef": "0a1d74d376e55cf90f896cf1",
"origin": "example",
"created": 1728922316938,
"shipping": {
"status": "example",
"date": 1759300953220,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1727923030159,
"refundDate": 1729982067572
},
"orderId": "example",
"note": {
"date": 1708228505337,
"content": "example"
},
"items": [
{
"_id": "4db0935c5bd91a3d5799de38",
"id": "wF0-Y6QaH",
"quantity": 1.23,
"added": 1718052261723,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "17732ef5f49f0828e1201a55",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "163e7db01aa4c9121408e4c8",
"id": "KzJ-qJkuN",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1751352168644,
"expires": 1722619503615,
"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