customerEmailMarketingConsentUpdate
mutation
需要 write_customers 权限点。
接口访问需要令牌,具体如何获取令牌参考:身份认证。
更新客户的电子邮件营销信息
Example
更新邮件订阅
Code
{
"input": {
"customerId": "gid://shopline/Customer/4600419096",
"emailMarketingConsent": {
"consentUpdatedAt": "2023-12-27T03:31:06.960Z",
"marketingState": "SUBSCRIBED"
}
}
}
Response
{
"data": {
"customerEmailMarketingConsentUpdate": {
"customer": {
"tags": [
"test1"
],
"taxExempt": true,
"updatedAt": "2024-01-13T08:03:51.321Z",
"taxExemptions": [
{
"countryCode": "US",
"provinceGCodeList": [
"AK"
]
}
],
"addresses": [
{
"address2": "Apartment 2",
"city": "Louisville",
"company": "C*****",
"country": "United States",
"countryCodeV2": "US",
"lastName": "T*****",
"phone": "0086****1234",
"address1": "Chestnut Street 92",
"firstName": "S*****",
"id": "gid://shopline/MailingAddress/SL201UA6288183152684310781",
"province": "Kentucky",
"provinceCode": null,
"zip": "40202"
}
],
"createdAt": "2024-01-11T06:06:22.500Z",
"defaultAddress": {
"company": "C*****",
"country": "United States",
"countryCodeV2": "US",
"firstName": "S*****",
"id": "gid://shopline/MailingAddress/SL201UA6288183152684310781",
"lastName": "T****",
"zip": "40202",
"address1": "Chestnut Street 92",
"address2": "Apartment 2",
"city": "Louisville",
"phone": "0086185****1234",
"province": "Kentucky",
"provinceCode": null
},
"email": "******@example.com",
"firstName": "S*****",
"id": "gid://shopline/Customer/4600507018",
"lastName": "T*****",
"note": "Placed an order that had a fraud warning",
"smsMarketingConsent": {
"consentUpdatedAt": "2024-01-13T08:03:52.337Z",
"marketingState": "SUBSCRIBED"
},
"verifiedEmail": false,
"phone": "0086185****1234",
"emailMarketingConsent": {
"consentUpdatedAt": "2024-01-13T08:06:36.819Z",
"marketingState": "SUBSCRIBED"
}
},
"userErrors": null
}
}
}
这篇文章对你有帮助吗?