Upload context records
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/context-records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"records": [
{
"geo": "<string>",
"timeWindowStart": "2023-12-25",
"timeWindowEnd": "2023-12-25",
"promoActive": false,
"promoType": "<string>",
"temperatureAvg": 123,
"competitorActivity": {},
"seasonalityIndex": 123,
"flightStatus": "active"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/context-records"
payload = { "records": [
{
"geo": "<string>",
"timeWindowStart": "2023-12-25",
"timeWindowEnd": "2023-12-25",
"promoActive": False,
"promoType": "<string>",
"temperatureAvg": 123,
"competitorActivity": {},
"seasonalityIndex": 123,
"flightStatus": "active"
}
] }
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({
records: [
{
geo: '<string>',
timeWindowStart: '2023-12-25',
timeWindowEnd: '2023-12-25',
promoActive: false,
promoType: '<string>',
temperatureAvg: 123,
competitorActivity: {},
seasonalityIndex: 123,
flightStatus: 'active'
}
]
})
};
fetch('https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/context-records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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": {}
}
}Measurement
Upload context records
Upload exogenous context data (promos, weather, competitor activity) for measurement analysis.
POST
/
advertisers
/
{advertiserId}
/
context-records
Upload context records
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/context-records \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"records": [
{
"geo": "<string>",
"timeWindowStart": "2023-12-25",
"timeWindowEnd": "2023-12-25",
"promoActive": false,
"promoType": "<string>",
"temperatureAvg": 123,
"competitorActivity": {},
"seasonalityIndex": 123,
"flightStatus": "active"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/context-records"
payload = { "records": [
{
"geo": "<string>",
"timeWindowStart": "2023-12-25",
"timeWindowEnd": "2023-12-25",
"promoActive": False,
"promoType": "<string>",
"temperatureAvg": 123,
"competitorActivity": {},
"seasonalityIndex": 123,
"flightStatus": "active"
}
] }
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({
records: [
{
geo: '<string>',
timeWindowStart: '2023-12-25',
timeWindowEnd: '2023-12-25',
promoActive: false,
promoType: '<string>',
temperatureAvg: 123,
competitorActivity: {},
seasonalityIndex: 123,
flightStatus: 'active'
}
]
})
};
fetch('https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/context-records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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
Unique identifier for the advertiser
Minimum string length:
1Example:
"12345"
Body
application/json
Required array length:
1 - 5000 elementsShow child attributes
Show child attributes
Response
Upload context records
⌘I