Sync event sources
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/event-sources/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": {
"account_id": "12345"
},
"event_sources": [
{
"event_source_id": "website_pixel",
"name": "Website Pixel",
"event_types": [
"purchase",
"add_to_cart"
],
"allowed_domains": [
"shop.example.com",
"checkout.example.com"
],
"integration_platform": "Hightouch",
"mapping": {
"eventIdField": "order_id",
"eventTypeField": "event_name",
"eventTimeField": "occurred_at",
"userMatchFields": [
"hashed_email",
"sc3clid"
],
"valueField": "revenue",
"currencyField": "currency",
"orderIdField": "order_id",
"contentIdsField": "sku_ids",
"consentField": "marketing_consent",
"dedupeStrategy": "<string>",
"notes": "<string>"
},
"test_event_code": "<string>"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/event-sources/sync"
payload = {
"account": { "account_id": "12345" },
"event_sources": [
{
"event_source_id": "website_pixel",
"name": "Website Pixel",
"event_types": ["purchase", "add_to_cart"],
"allowed_domains": ["shop.example.com", "checkout.example.com"],
"integration_platform": "Hightouch",
"mapping": {
"eventIdField": "order_id",
"eventTypeField": "event_name",
"eventTimeField": "occurred_at",
"userMatchFields": ["hashed_email", "sc3clid"],
"valueField": "revenue",
"currencyField": "currency",
"orderIdField": "order_id",
"contentIdsField": "sku_ids",
"consentField": "marketing_consent",
"dedupeStrategy": "<string>",
"notes": "<string>"
},
"test_event_code": "<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({
account: {account_id: '12345'},
event_sources: [
{
event_source_id: 'website_pixel',
name: 'Website Pixel',
event_types: ['purchase', 'add_to_cart'],
allowed_domains: ['shop.example.com', 'checkout.example.com'],
integration_platform: 'Hightouch',
mapping: {
eventIdField: 'order_id',
eventTypeField: 'event_name',
eventTimeField: 'occurred_at',
userMatchFields: ['hashed_email', 'sc3clid'],
valueField: 'revenue',
currencyField: 'currency',
orderIdField: 'order_id',
contentIdsField: 'sku_ids',
consentField: 'marketing_consent',
dedupeStrategy: '<string>',
notes: '<string>'
},
test_event_code: '<string>'
}
]
})
};
fetch('https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/event-sources/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"event_sources": [
{
"event_source_id": "<string>",
"error": "<string>",
"setup": {
"snippet_type": "server_only",
"instructions": "<string>",
"snippet": "<string>"
}
}
]
}{
"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": {}
}
}Event Sources
Sync event sources
Inbound ADCP sync_event_sources endpoint. Buyers call this to sync their event source configurations to the advertiser.
POST
/
advertisers
/
{advertiserId}
/
event-sources
/
sync
Sync event sources
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/event-sources/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account": {
"account_id": "12345"
},
"event_sources": [
{
"event_source_id": "website_pixel",
"name": "Website Pixel",
"event_types": [
"purchase",
"add_to_cart"
],
"allowed_domains": [
"shop.example.com",
"checkout.example.com"
],
"integration_platform": "Hightouch",
"mapping": {
"eventIdField": "order_id",
"eventTypeField": "event_name",
"eventTimeField": "occurred_at",
"userMatchFields": [
"hashed_email",
"sc3clid"
],
"valueField": "revenue",
"currencyField": "currency",
"orderIdField": "order_id",
"contentIdsField": "sku_ids",
"consentField": "marketing_consent",
"dedupeStrategy": "<string>",
"notes": "<string>"
},
"test_event_code": "<string>"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/event-sources/sync"
payload = {
"account": { "account_id": "12345" },
"event_sources": [
{
"event_source_id": "website_pixel",
"name": "Website Pixel",
"event_types": ["purchase", "add_to_cart"],
"allowed_domains": ["shop.example.com", "checkout.example.com"],
"integration_platform": "Hightouch",
"mapping": {
"eventIdField": "order_id",
"eventTypeField": "event_name",
"eventTimeField": "occurred_at",
"userMatchFields": ["hashed_email", "sc3clid"],
"valueField": "revenue",
"currencyField": "currency",
"orderIdField": "order_id",
"contentIdsField": "sku_ids",
"consentField": "marketing_consent",
"dedupeStrategy": "<string>",
"notes": "<string>"
},
"test_event_code": "<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({
account: {account_id: '12345'},
event_sources: [
{
event_source_id: 'website_pixel',
name: 'Website Pixel',
event_types: ['purchase', 'add_to_cart'],
allowed_domains: ['shop.example.com', 'checkout.example.com'],
integration_platform: 'Hightouch',
mapping: {
eventIdField: 'order_id',
eventTypeField: 'event_name',
eventTimeField: 'occurred_at',
userMatchFields: ['hashed_email', 'sc3clid'],
valueField: 'revenue',
currencyField: 'currency',
orderIdField: 'order_id',
contentIdsField: 'sku_ids',
consentField: 'marketing_consent',
dedupeStrategy: '<string>',
notes: '<string>'
},
test_event_code: '<string>'
}
]
})
};
fetch('https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/event-sources/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"event_sources": [
{
"event_source_id": "<string>",
"error": "<string>",
"setup": {
"snippet_type": "server_only",
"instructions": "<string>",
"snippet": "<string>"
}
}
]
}{
"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
Request body for syncing event sources (ADCP spec)
Advertiser account to sync event sources onto
Show child attributes
Show child attributes
Event sources to sync (up to 50 per call)
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Archive buyer-managed event sources not included in this request
Response
Sync event sources
Response from sync_event_sources
Per-source sync results
Show child attributes
Show child attributes
⌘I