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.
Update customers’ SMS marketing information
Arguments
Input fields that update customers' SMS marketing messages
More
Return
customer ● Customer
The updated customer.
More
error message
More
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Update SMS subscription information
{
"input": {
"customerId": "gid://shopline/Customer/4600419096",
"smsMarketingConsent": {
"consentUpdatedAt": "2023-12-27T03:31:06.960Z",
"marketingState": "SUBSCRIBED"
}
}
}
Response
{
"data": {
"customerSmsMarketingConsentUpdate": {
"userErrors": null,
"customer": {
"addresses": [
{
"address1": "Chestnut Street 92",
"city": "Louisville",
"company": "C*****",
"country": "United States",
"countryCodeV2": "US",
"phone": "0086134****8765",
"provinceCode": null,
"zip": "40202",
"address2": "Apartment 2",
"firstName": "S*****",
"id": "gid://shopline/MailingAddress/SL201UA6288183152684310781",
"lastName": "T*****",
"province": "Kentucky"
}
],
"createdAt": "2024-01-11T06:06:22.500Z",
"id": "gid://shopline/Customer/4600507018",
"lastName": "T*****",
"smsMarketingConsent": {
"consentUpdatedAt": "2024-01-13T08:07:56.121Z",
"marketingState": "SUBSCRIBED"
},
"tags": [
"test1"
],
"updatedAt": "2024-01-13T08:03:51.321Z",
"phone": "0086178****4248",
"taxExempt": true,
"defaultAddress": {
"address2": "Apartment 2",
"city": "Louisville",
"country": "United States",
"countryCodeV2": "US",
"firstName": "S*****",
"lastName": "T*****",
"province": "Kentucky",
"company": "C*****",
"id": "gid://shopline/MailingAddress/SL201UA6288183152684310781",
"phone": "0086134****8765",
"provinceCode": null,
"zip": "40202",
"address1": "Chestnut Street 92"
},
"email": "*****@example.com",
"emailMarketingConsent": {
"consentUpdatedAt": "2024-01-13T08:06:36.819Z",
"marketingState": "SUBSCRIBED"
},
"firstName": "S*****",
"note": "Placed an order that had a fraud warning",
"taxExemptions": [
{
"countryCode": "US",
"provinceGCodeList": [
"AK"
]
}
],
"verifiedEmail": false
}
}
}
}
Was this article helpful to you?