Send campaign to the chunked recipients
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId}
Path Parameters
- clientIdnumberrequiredDescription
- sendingBatchIdnumberrequiredDescription
Body Parameters
- bodyRecipientsChunkRequestData
- chunkstring
- recipientsRecipient[]
- datamap<string, object>
- idstring
Responses
202
400
404
409
curl
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/sending/batches/{sendingBatchId}", 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}/sending/batches/{sendingBatchId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.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}/sending/batches/{sendingBatchId}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
202
// The import of recipients is initiated, the campaign will be started after import is finished.
400
// Chunk value is not alphanumeric (with '-' and '_' accepted) or not limited with 250 characters.
404
// The sending batch could not be found. Ensure that the required parameter is correct and the sending batch entry exists.
409