需要 write_customers 权限点。
接口访问需要令牌,具体如何获取令牌参考:身份认证
更新客户的短信营销信息
Arguments
更新客户的SMS营销信息的输入字段
More
Return
customer ● Customer
更新的客户信息
More
错误信息
More
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
更新SMS订阅信息
{
"input": {
"customerId": "gid://shopline/Customer/4600419096",
"smsMarketingConsent": {
"consentUpdatedAt": "2023-12-27T03:31:06.960Z",
"marketingState": "SUBSCRIBED"
}
}
}
Response
{
"data": {
"customerSmsMarketingConsentUpdate": {
"customer": {
"tags": [
"test1"
],
"addresses": [
{
"address1": "Chestnut Street 92",
"countryCodeV2": "US",
"firstName": "S*****",
"id": "gid://shopline/MailingAddress/SL201UA6288183152684310781",
"lastName": "T*****",
"phone": "0086134****8765",
"provinceCode": null,
"zip": "40202",
"address2": "Apartment 2",
"city": "Louisville",
"company": "C*****",
"country": "United States",
"province": "Kentucky"
}
],
"email": "*****@example.com",
"firstName": "S*****",
"id": "gid://shopline/Customer/4600507018",
"lastName": "T*****",
"updatedAt": "2024-01-13T08:03:51.321Z",
"phone": "0086178****4248",
"taxExempt": true,
"taxExemptions": [
{
"provinceGCodeList": [
"AK"
],
"countryCode": "US"
}
],
"createdAt": "2024-01-11T06:06:22.500Z",
"defaultAddress": {
"province": "Kentucky",
"zip": "40202",
"address1": "Chestnut Street 92",
"address2": "Apartment 2",
"company": "C*****",
"countryCodeV2": "US",
"id": "gid://shopline/MailingAddress/SL201UA6288183152684310781",
"lastName": "T*****",
"phone": "0086134****8765",
"provinceCode": null,
"city": "Louisville",
"country": "United States",
"firstName": "S*****"
},
"note": "Placed an order that had a fraud warning",
"emailMarketingConsent": {
"consentUpdatedAt": "2024-01-13T08:06:36.819Z",
"marketingState": "SUBSCRIBED"
},
"smsMarketingConsent": {
"marketingState": "SUBSCRIBED",
"consentUpdatedAt": "2024-01-13T08:07:56.121Z"
},
"verifiedEmail": false
},
"userErrors": null
}
}
}
这篇文章对你有帮助吗?