If you look at the `customerEmailMarketingConsentUpdate` API documentation, the example code changes the status to “NOT_SUBSCRIBED.”
However, the actual API behavior prevents this change. Did you notice?
And the “REDACTED” status explicitly states that it’s read-only. Therefore, “NOT_SUBSCRIBED” appears to be a changeable status, making it even more confusing.
Isn’t this clearly a potential source of misunderstanding?
Hi @KubrickCode,
Thanks for sharing this with us, I am able to replicate this on my own test store as well, with the NOT_SUBSCRIBED and INVALID states both returning an error indicating they can’t be used.
I am currently discussing this with our developers to confirm if this is expected behaviour or not, and if so to update our Shopify.dev documentation to reflect this.
In the meantime, I would recommend using the UNSUBSCRIBED marketing state to mark customers that are not subscribed for email marketing via the API.
I will follow up here as soon as we have any further information on the confirmation of this behaviour!