Update attribute values of multiple recipients
1 min
PUT
https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}/modify
Path Parameters
- clientIdinteger<int64>requiredDescriptionFormatint64
- recipientListIdinteger<int64>requiredDescriptionFormatint64
Header Parameters
- acceptstringDescriptionDefaultapplication/jsonAllowedapplication/jsonapplication/vnd.optivo.broadmail.v1+json
Body Parameters
- bodyUpdateRecipientsRequestData
- updateModestring<set | prepend | append>Allowedsetprependappend
- recipientsRecipient[]
- datamap<string, object>
- idstring
Responses
200
- RestRecipientsCreationModify
- countinteger<int32>Formatint32
- failedIdsstring[]
curl
curl --request PUT \
--url https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}/modify \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'PUT',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}/modify", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}/modify")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}/modify"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
200
// The recipients' attributes were updated. The IDs of recipients for which attributes could not be updated are displayed as failedIds in the response body.
{
"count": "",
"failedIds": [
""
]
}