Anchor to customerEmailMarketingConsentUpdatecustomer
customerEmailMarketingConsentUpdate
mutation
Requires access scope.
Update a customer's email marketing information information.
Anchor to Arguments
Arguments
- Anchor to inputinput•
Specifies the input fields to update a customer's email marketing consent information.
Was this section helpful?
Anchor to CustomerEmailMarketingConsentUpdatePayload returnsCustomerEmailMarketingConsentUpdatePayload returns
- Anchor to customercustomer•
The updated customer.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation customerEmailMarketingConsentUpdate($input: CustomerEmailMarketingConsentUpdateInput!) {2 customerEmailMarketingConsentUpdate(input: $input) {3 customer {4 # Customer fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "input": {3 "customerId": "gid://shopify/<objectName>/10079785100",4 "emailMarketingConsent": {5 "consentUpdatedAt": "2019-09-07T15:50:00Z",6 "marketingOptInLevel": "",7 "marketingState": ""8 }9 }10}
{
"input": {
"customerId": "gid://shopify/<objectName>/10079785100",
"emailMarketingConsent": {
"consentUpdatedAt": "2019-09-07T15:50:00Z",
"marketingOptInLevel": "",
"marketingState": ""
}
}
}
input CustomerEmailMarketingConsentUpdateInput {
customerId: ID!
emailMarketingConsent: CustomerEmailMarketingConsentInput!
}
input CustomerEmailMarketingConsentInput {
consentUpdatedAt: DateTime
marketingOptInLevel: CustomerMarketingOptInLevel
marketingState: CustomerEmailMarketingState!
}