Created
December 7, 2018 08:29
-
-
Save rohansen/3cad1e2168fc042bd04c4807d3d11099 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As i had a hard time finding anything in the mailchimp documentation, i thought it might help a lost soul to put this info here: | |
If you cannot find your marketing_permission_id of your mailchimp list (eg. for GDPR compliance), you can do a signup request (maybe others too), | |
using the API, and it will return its data, including the marketing_permissions array containing the unique id for the opt-in. | |
POST: | |
{ | |
"email_address": "[email protected]", | |
"status": "subscribed", | |
"status_if_new": "subscribed", | |
"merge_fields": { | |
"FNAME": "John", | |
"LNAME": "Doe", | |
"COUNTRY": "DK" | |
}, | |
"marketing_permissions": [ | |
{ | |
"marketing_permission_id": "666b666b66", | |
"enabled": true | |
} | |
], | |
"interests": { | |
"000b000b00": false, | |
... | |
... | |
} | |
} | |
RETURNS: | |
... | |
{ | |
"id": "XXXXXXXXXXXXXXX", | |
"email_address": "XXXXXXXXX", | |
"unique_email_id": "XXXXXXXXXX", | |
"email_type": "html", | |
"status": "subscribed", | |
"merge_fields": { | |
"B": "", | |
"COUNTRY": "DK" | |
}, | |
"marketing_permissions": [ | |
{ | |
"marketing_permission_id": "----->ID-FOUND-HERE<-----", | |
"text": "Yes I would like to subscribe to the hummel newsletter with news and deals within hummel's product range. Read the terms and conditions here. You can unsubscribe at any time.", | |
"enabled": false | |
} | |
], | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Scott,
Thanks for the heads up. I was unaware of this (and unsure if it was possible back when I needed it,since it was a while ago).
Sounds great though 😊
Br Ronni