November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hello there,
having the same problem here - for me it's not clear how to send the data.
Should it be a string, appended to the request? Should it be an array inside of POST?
Please help.
Can anyone provide an example of how to update/set custom recipient properties?
Hi, I have solution that worked for me in a curl request. You need to put it in the request body with the mode set.
As example for the request body:
-d "mode=set&data.YOURATTRIBUTE=true"
if your attribute is a boolean value
If you have a String value, it's almost identical:
-d "mode=set&data.YOURATTRIBUTE=NEWSTRING"
If you want to update multiple values at once, just append them in the request body:
-d "mode=set&data.YOURATTRIBUTE=true&data.YOURATTRIBUTE=NEWSTRING"
As you see, you always need the "data." String in front of your attribute to make it work.
The "mode=set" overwrites the current value of your attribute. The are different modes listed in the swagger documentation.
Here is a finally example how a complete curl request can look like:
curl -X POST "BASE_SERVER_URL/rest/YOUR_CLIENTID/recipients/YOUR_RECIPIENT_LIST_ID/RECIPIENT_ID" -H "accept: application/json" -H "Authorization: YOUR_API_KEY" -H "Content-Type: application/x-www-form-urlencoded" -d "mode=set&data.YOURATTRIBUTE=true&data.YOUSTRINGATTRIBUTE=NEWSTRING"
Hi,
We are using Episerver campaign API(https://api.campaign.episerver.net/apidoc/index.html#/Recipients/) to manage recipients.
I need to update existing recipient attributes and I am using this post request https://api.campaign.episerver.net/apidoc/index.html#/Recipients/modifyRecipientAttributes for the update.
This API requires attributes to added like "data.[attribute] according to the corresponding recipient list field."
I have tried adding attributes like this 'data.firstname' but no success.
And returned status from API is not very helpful in troubleshooting as it always returns "Not found" result.
Any suggestions?