Batch-reassign brought creatives to placements
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creatives/placements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mappings": [
{
"creative_id": "<string>",
"format_ids": [
{
"agent_url": "<string>",
"id": "<string>"
}
]
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creatives/placements"
payload = { "mappings": [
{
"creative_id": "<string>",
"format_ids": [
{
"agent_url": "<string>",
"id": "<string>"
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mappings: [
{creative_id: '<string>', format_ids: [{agent_url: '<string>', id: '<string>'}]}
]
})
};
fetch('https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creatives/placements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"coverage": {
"total_placements": 0,
"covered_placements": 0
},
"files": [
{
"file_id": "<string>",
"filename": "<string>",
"media_kind": "image",
"status": "recognizing",
"detected": {
"dimensions": "<string>",
"duration": "<string>",
"codec": "<string>",
"bitrate": "<string>",
"frameRate": "<string>",
"sampleRate": "<string>",
"container": "<string>",
"fileSize": "<string>",
"tagType": "<string>"
},
"suggestion": "<string>",
"format_incompatible": "<string>",
"preview_url": "<string>",
"message": "<string>",
"suggestions": [
"<string>"
],
"accepts_context": true,
"placements": [
{
"placement_id": "<string>",
"placement_name": "<string>",
"product_name": "<string>"
}
]
}
],
"campaign_id": "<string>",
"campaign_name": "<string>",
"missing_placements": [
{
"placement_id": "<string>",
"placement_name": "<string>",
"spec_label": "<string>",
"product_name": "<string>"
}
],
"available_placements": [
{
"placement_id": "<string>",
"placement_name": "<string>",
"spec_label": "<string>",
"product_name": "<string>"
}
],
"truncated": true,
"unreadable_placements": 4503599627370495,
"skipped_files_notice": "<string>",
"skipped_files": [
"<string>"
],
"attachment_summary": {
"requested_creatives": 4503599627370495,
"created_creatives": 4503599627370495,
"failed_creatives": 4503599627370495
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Creatives
Batch-reassign brought creatives to placements
Reassigns several already-attached creatives to placements in one call (the card’s “Save mappings” commit), then returns the refreshed confirmation card once. mappings is [{ creative_id, format_id }].
POST
/
campaigns
/
{campaignId}
/
creatives
/
placements
Batch-reassign brought creatives to placements
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creatives/placements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mappings": [
{
"creative_id": "<string>",
"format_ids": [
{
"agent_url": "<string>",
"id": "<string>"
}
]
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creatives/placements"
payload = { "mappings": [
{
"creative_id": "<string>",
"format_ids": [
{
"agent_url": "<string>",
"id": "<string>"
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mappings: [
{creative_id: '<string>', format_ids: [{agent_url: '<string>', id: '<string>'}]}
]
})
};
fetch('https://api.interchange.io/api/v2/buyer/campaigns/{campaignId}/creatives/placements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"coverage": {
"total_placements": 0,
"covered_placements": 0
},
"files": [
{
"file_id": "<string>",
"filename": "<string>",
"media_kind": "image",
"status": "recognizing",
"detected": {
"dimensions": "<string>",
"duration": "<string>",
"codec": "<string>",
"bitrate": "<string>",
"frameRate": "<string>",
"sampleRate": "<string>",
"container": "<string>",
"fileSize": "<string>",
"tagType": "<string>"
},
"suggestion": "<string>",
"format_incompatible": "<string>",
"preview_url": "<string>",
"message": "<string>",
"suggestions": [
"<string>"
],
"accepts_context": true,
"placements": [
{
"placement_id": "<string>",
"placement_name": "<string>",
"product_name": "<string>"
}
]
}
],
"campaign_id": "<string>",
"campaign_name": "<string>",
"missing_placements": [
{
"placement_id": "<string>",
"placement_name": "<string>",
"spec_label": "<string>",
"product_name": "<string>"
}
],
"available_placements": [
{
"placement_id": "<string>",
"placement_name": "<string>",
"spec_label": "<string>",
"product_name": "<string>"
}
],
"truncated": true,
"unreadable_placements": 4503599627370495,
"skipped_files_notice": "<string>",
"skipped_files": [
"<string>"
],
"attachment_summary": {
"requested_creatives": 4503599627370495,
"created_creatives": 4503599627370495,
"failed_creatives": 4503599627370495
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Body
application/json
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Response
Batch-reassign brought creatives to placements
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
0 < x <= 9007199254740991Show child attributes
Show child attributes