customerUpdateDefaultAddress
mutation
Requires write_customers access scope.
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Change customer default address
Arguments
Return
The customer whose address was updated.
error message
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Set customer default address
Code
{
"addressId": "gid://shopline/MailingAddress/SL201UA6266776363820652562",
"customerId": "gid://shopline/Customer/4600419107"
}
Response
{
"data": {
"customerSmsMarketingConsentUpdate": {
"customer": {
"emailMarketingConsent": {
"consentUpdatedAt": "2024-01-13T08:06:36.819Z",
"marketingState": "SUBSCRIBED"
},
"firstName": "S*****",
"id": "gid://shopline/Customer/4600507018",
"tags": [
"test1"
],
"verifiedEmail": false,
"createdAt": "2024-01-11T06:06:22.500Z",
"lastName": "T*****",
"note": "Placed an order that had a fraud warning",
"smsMarketingConsent": {
"consentUpdatedAt": "2024-01-13T08:08:50.403Z",
"marketingState": "SUBSCRIBED"
},
"taxExempt": true,
"addresses": [
{
"address2": "Apartment 2",
"countryCodeV2": "US",
"firstName": "S*****",
"lastName": "T*****",
"phone": "0086134****8765",
"province": "Kentucky",
"address1": "Chestnut Street 92",
"city": "Louisville",
"company": "C*****",
"country": "United States",
"id": "gid://shopline/MailingAddress/SL201UA6288183152684310781",
"provinceCode": null,
"zip": "40202"
}
],
"updatedAt": "2024-01-13T08:03:51.321Z",
"email": "*****@example.com",
"phone": "0086178****4248",
"taxExemptions": [
{
"countryCode": "US",
"provinceGCodeList": [
"AK"
]
}
],
"defaultAddress": {
"countryCodeV2": "US",
"lastName": "T*****",
"phone": "0086134****8765",
"provinceCode": null,
"zip": "40202",
"address2": "Apartment 2",
"country": "United States",
"firstName": "S*****",
"id": "gid://shopline/MailingAddress/SL201UA6288183152684310781",
"province": "Kentucky",
"address1": "Chestnut Street 92",
"city": "Louisville",
"company": "C*****"
}
},
"userErrors": null
}
}
}
Was this article helpful to you?