/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes
curl --request PATCH \
--url https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"type": "ContactlistWithUserAttributesAmendment",
"attributes": {
"operation": "add",
"identifierType": "email",
"identifiers": [
{
"identifier": "example1@gmail.com",
"attributes": [
{
"key": "age",
"value": "12"
},
{
"key": "country",
"value": "FR"
},
{
"key": "size",
"value": "S"
}
]
},
{
"identifier": "example2@gmail.com",
"attributes": [
{
"key": "age",
"value": "43"
},
{
"key": "preferredColor",
"value": "yellow"
}
]
}
]
}
}
}
'import requests
url = "https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes"
payload = { "data": {
"type": "ContactlistWithUserAttributesAmendment",
"attributes": {
"operation": "add",
"identifierType": "email",
"identifiers": [
{
"identifier": "example1@gmail.com",
"attributes": [
{
"key": "age",
"value": "12"
},
{
"key": "country",
"value": "FR"
},
{
"key": "size",
"value": "S"
}
]
},
{
"identifier": "example2@gmail.com",
"attributes": [
{
"key": "age",
"value": "43"
},
{
"key": "preferredColor",
"value": "yellow"
}
]
}
]
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
type: 'ContactlistWithUserAttributesAmendment',
attributes: {
operation: 'add',
identifierType: 'email',
identifiers: [
{
identifier: 'example1@gmail.com',
attributes: [
{key: 'age', value: '12'},
{key: 'country', value: 'FR'},
{key: 'size', value: 'S'}
]
},
{
identifier: 'example2@gmail.com',
attributes: [{key: 'age', value: '43'}, {key: 'preferredColor', value: 'yellow'}]
}
]
}
}
})
};
fetch('https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'ContactlistWithUserAttributesAmendment',
'attributes' => [
'operation' => 'add',
'identifierType' => 'email',
'identifiers' => [
[
'identifier' => 'example1@gmail.com',
'attributes' => [
[
'key' => 'age',
'value' => '12'
],
[
'key' => 'country',
'value' => 'FR'
],
[
'key' => 'size',
'value' => 'S'
]
]
],
[
'identifier' => 'example2@gmail.com',
'attributes' => [
[
'key' => 'age',
'value' => '43'
],
[
'key' => 'preferredColor',
'value' => 'yellow'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"ContactlistWithUserAttributesAmendment\",\n \"attributes\": {\n \"operation\": \"add\",\n \"identifierType\": \"email\",\n \"identifiers\": [\n {\n \"identifier\": \"example1@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"12\"\n },\n {\n \"key\": \"country\",\n \"value\": \"FR\"\n },\n {\n \"key\": \"size\",\n \"value\": \"S\"\n }\n ]\n },\n {\n \"identifier\": \"example2@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"43\"\n },\n {\n \"key\": \"preferredColor\",\n \"value\": \"yellow\"\n }\n ]\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"ContactlistWithUserAttributesAmendment\",\n \"attributes\": {\n \"operation\": \"add\",\n \"identifierType\": \"email\",\n \"identifiers\": [\n {\n \"identifier\": \"example1@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"12\"\n },\n {\n \"key\": \"country\",\n \"value\": \"FR\"\n },\n {\n \"key\": \"size\",\n \"value\": \"S\"\n }\n ]\n },\n {\n \"identifier\": \"example2@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"43\"\n },\n {\n \"key\": \"preferredColor\",\n \"value\": \"yellow\"\n }\n ]\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"ContactlistWithUserAttributesAmendment\",\n \"attributes\": {\n \"operation\": \"add\",\n \"identifierType\": \"email\",\n \"identifiers\": [\n {\n \"identifier\": \"example1@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"12\"\n },\n {\n \"key\": \"country\",\n \"value\": \"FR\"\n },\n {\n \"key\": \"size\",\n \"value\": \"S\"\n }\n ]\n },\n {\n \"identifier\": \"example2@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"43\"\n },\n {\n \"key\": \"preferredColor\",\n \"value\": \"yellow\"\n }\n ]\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "ContactlistAmendment",
"attributes": {
"contactListId": 12,
"operation": "add",
"requestDate": "2018-12-10T10:00:50.0000000+00:00",
"identifierType": "madid",
"nbValidIdentifiers": 7343,
"nbInvalidIdentifiers": 13,
"sampleInvalidIdentifiers": [
"InvalidIdentifier"
]
}
},
"errors": [],
"warnings": []
}/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes
Add/remove identifiers to or from a contact list.
PATCH
/
preview
/
marketing-solutions
/
audiences
/
{audience-id}
/
contactlist-attributes
/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes
curl --request PATCH \
--url https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"type": "ContactlistWithUserAttributesAmendment",
"attributes": {
"operation": "add",
"identifierType": "email",
"identifiers": [
{
"identifier": "example1@gmail.com",
"attributes": [
{
"key": "age",
"value": "12"
},
{
"key": "country",
"value": "FR"
},
{
"key": "size",
"value": "S"
}
]
},
{
"identifier": "example2@gmail.com",
"attributes": [
{
"key": "age",
"value": "43"
},
{
"key": "preferredColor",
"value": "yellow"
}
]
}
]
}
}
}
'import requests
url = "https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes"
payload = { "data": {
"type": "ContactlistWithUserAttributesAmendment",
"attributes": {
"operation": "add",
"identifierType": "email",
"identifiers": [
{
"identifier": "example1@gmail.com",
"attributes": [
{
"key": "age",
"value": "12"
},
{
"key": "country",
"value": "FR"
},
{
"key": "size",
"value": "S"
}
]
},
{
"identifier": "example2@gmail.com",
"attributes": [
{
"key": "age",
"value": "43"
},
{
"key": "preferredColor",
"value": "yellow"
}
]
}
]
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
type: 'ContactlistWithUserAttributesAmendment',
attributes: {
operation: 'add',
identifierType: 'email',
identifiers: [
{
identifier: 'example1@gmail.com',
attributes: [
{key: 'age', value: '12'},
{key: 'country', value: 'FR'},
{key: 'size', value: 'S'}
]
},
{
identifier: 'example2@gmail.com',
attributes: [{key: 'age', value: '43'}, {key: 'preferredColor', value: 'yellow'}]
}
]
}
}
})
};
fetch('https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'type' => 'ContactlistWithUserAttributesAmendment',
'attributes' => [
'operation' => 'add',
'identifierType' => 'email',
'identifiers' => [
[
'identifier' => 'example1@gmail.com',
'attributes' => [
[
'key' => 'age',
'value' => '12'
],
[
'key' => 'country',
'value' => 'FR'
],
[
'key' => 'size',
'value' => 'S'
]
]
],
[
'identifier' => 'example2@gmail.com',
'attributes' => [
[
'key' => 'age',
'value' => '43'
],
[
'key' => 'preferredColor',
'value' => 'yellow'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"ContactlistWithUserAttributesAmendment\",\n \"attributes\": {\n \"operation\": \"add\",\n \"identifierType\": \"email\",\n \"identifiers\": [\n {\n \"identifier\": \"example1@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"12\"\n },\n {\n \"key\": \"country\",\n \"value\": \"FR\"\n },\n {\n \"key\": \"size\",\n \"value\": \"S\"\n }\n ]\n },\n {\n \"identifier\": \"example2@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"43\"\n },\n {\n \"key\": \"preferredColor\",\n \"value\": \"yellow\"\n }\n ]\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"type\": \"ContactlistWithUserAttributesAmendment\",\n \"attributes\": {\n \"operation\": \"add\",\n \"identifierType\": \"email\",\n \"identifiers\": [\n {\n \"identifier\": \"example1@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"12\"\n },\n {\n \"key\": \"country\",\n \"value\": \"FR\"\n },\n {\n \"key\": \"size\",\n \"value\": \"S\"\n }\n ]\n },\n {\n \"identifier\": \"example2@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"43\"\n },\n {\n \"key\": \"preferredColor\",\n \"value\": \"yellow\"\n }\n ]\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.criteo.com/preview/marketing-solutions/audiences/{audience-id}/contactlist-attributes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"type\": \"ContactlistWithUserAttributesAmendment\",\n \"attributes\": {\n \"operation\": \"add\",\n \"identifierType\": \"email\",\n \"identifiers\": [\n {\n \"identifier\": \"example1@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"12\"\n },\n {\n \"key\": \"country\",\n \"value\": \"FR\"\n },\n {\n \"key\": \"size\",\n \"value\": \"S\"\n }\n ]\n },\n {\n \"identifier\": \"example2@gmail.com\",\n \"attributes\": [\n {\n \"key\": \"age\",\n \"value\": \"43\"\n },\n {\n \"key\": \"preferredColor\",\n \"value\": \"yellow\"\n }\n ]\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "ContactlistAmendment",
"attributes": {
"contactListId": 12,
"operation": "add",
"requestDate": "2018-12-10T10:00:50.0000000+00:00",
"identifierType": "madid",
"nbValidIdentifiers": 7343,
"nbInvalidIdentifiers": 13,
"sampleInvalidIdentifiers": [
"InvalidIdentifier"
]
}
},
"errors": [],
"warnings": []
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The id of the contact list audience-segment to amend
Body
application/json
Request for a contactlist amendment with user attributes
Parameters for a contactlist amendment with user attributes
Show child attributes
Show child attributes
Was this page helpful?
/preview/marketing-solutions/audiences
Previous
/preview/marketing-solutions/audiences/compute-sizes
Next
⌘I