curl --request POST \
--url https://api.interchange.io/api/v2/buyer/discovery/{discoveryId}/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"products": [
{
"productId": "product_123",
"storefrontId": "<string>",
"inventorySourceId": "<string>",
"selectionId": "product_123::a1b2c3",
"salesAgentId": "agent_456",
"groupId": "ctx_123-group-0",
"groupName": "Publisher Name",
"bidPrice": 12.5,
"budget": 5000,
"pricingOptionId": "po_abc123",
"targetingOverlay": {
"geo_countries": [
"<string>"
],
"geo_countries_exclude": [
"<string>"
],
"geo_regions": [
"<string>"
],
"geo_regions_exclude": [
"<string>"
],
"geo_metros": [
{
"system": "nielsen_dma",
"values": [
"<string>"
]
}
],
"geo_metros_exclude": [
{
"system": "nielsen_dma",
"values": [
"<string>"
]
}
],
"geo_postal_areas": [
{
"country": "US",
"values": [
"<string>"
]
}
],
"geo_postal_areas_exclude": [
{
"country": "US",
"values": [
"<string>"
]
}
],
"geo_places": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": [
"<string>"
],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"geo_places_exclude": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": [
"<string>"
],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"daypart_targets": [
{
"days": [
"monday"
],
"start_hour": 11,
"end_hour": 12,
"timezone": "inventory_local",
"label": "<string>"
}
],
"axe_include_segment": "<string>",
"axe_exclude_segment": "<string>",
"audience_include": [
"<string>"
],
"audience_exclude": [
"<string>"
],
"signal_targeting": [
{}
],
"frequency_cap": {
"suppress_minutes": 1,
"max_impressions": 4503599627370496,
"per": "individuals"
},
"placement_selection": {
"mode": "selected",
"placement_refs": [
{
"placement_id": "<string>",
"publisher_domain": "<string>"
}
],
"ext": {}
},
"collection_selection": {
"mode": "selected",
"collections": [
{
"publisher_domain": "<string>",
"collection_ids": [
"<string>"
]
}
],
"ext": {}
},
"device_platform": [
"ios"
],
"device_platform_exclude": [
"ios"
],
"device_type": [
"desktop"
],
"device_type_exclude": [
"desktop"
],
"browser": [
"chrome"
],
"browser_exclude": [
"chrome"
],
"store_catchments": [
{
"catalog_id": "<string>",
"store_ids": [
"<string>"
],
"catchment_ids": [
"<string>"
]
}
],
"geo_proximity": [
{}
],
"language": [
"<string>"
],
"keyword_targets": [
{
"keyword": "<string>",
"match_type": "broad",
"bid_price": 1
}
],
"negative_keywords": [
{
"keyword": "<string>",
"match_type": "broad"
}
],
"product_codes": [
"<string>"
]
},
"pageId": "1147910135081908",
"pixelId": "123456789012345",
"instagramActorId": "17841400000000000",
"welcomeMessageFlowId": "1122334455667788",
"leadFormId": "987654321098765",
"appId": "1827364556677889",
"optimizationGoals": [
{
"kind": "metric",
"metric": "clicks",
"reach_unit": "individuals",
"target_frequency": {},
"view_duration_seconds": 123,
"target": {
"kind": "cost_per",
"value": 123
},
"priority": 123
}
]
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/discovery/{discoveryId}/products"
payload = { "products": [
{
"productId": "product_123",
"storefrontId": "<string>",
"inventorySourceId": "<string>",
"selectionId": "product_123::a1b2c3",
"salesAgentId": "agent_456",
"groupId": "ctx_123-group-0",
"groupName": "Publisher Name",
"bidPrice": 12.5,
"budget": 5000,
"pricingOptionId": "po_abc123",
"targetingOverlay": {
"geo_countries": ["<string>"],
"geo_countries_exclude": ["<string>"],
"geo_regions": ["<string>"],
"geo_regions_exclude": ["<string>"],
"geo_metros": [
{
"system": "nielsen_dma",
"values": ["<string>"]
}
],
"geo_metros_exclude": [
{
"system": "nielsen_dma",
"values": ["<string>"]
}
],
"geo_postal_areas": [
{
"country": "US",
"values": ["<string>"]
}
],
"geo_postal_areas_exclude": [
{
"country": "US",
"values": ["<string>"]
}
],
"geo_places": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": ["<string>"],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"geo_places_exclude": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": ["<string>"],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"daypart_targets": [
{
"days": ["monday"],
"start_hour": 11,
"end_hour": 12,
"timezone": "inventory_local",
"label": "<string>"
}
],
"axe_include_segment": "<string>",
"axe_exclude_segment": "<string>",
"audience_include": ["<string>"],
"audience_exclude": ["<string>"],
"signal_targeting": [{}],
"frequency_cap": {
"suppress_minutes": 1,
"max_impressions": 4503599627370496,
"per": "individuals"
},
"placement_selection": {
"mode": "selected",
"placement_refs": [
{
"placement_id": "<string>",
"publisher_domain": "<string>"
}
],
"ext": {}
},
"collection_selection": {
"mode": "selected",
"collections": [
{
"publisher_domain": "<string>",
"collection_ids": ["<string>"]
}
],
"ext": {}
},
"device_platform": ["ios"],
"device_platform_exclude": ["ios"],
"device_type": ["desktop"],
"device_type_exclude": ["desktop"],
"browser": ["chrome"],
"browser_exclude": ["chrome"],
"store_catchments": [
{
"catalog_id": "<string>",
"store_ids": ["<string>"],
"catchment_ids": ["<string>"]
}
],
"geo_proximity": [{}],
"language": ["<string>"],
"keyword_targets": [
{
"keyword": "<string>",
"match_type": "broad",
"bid_price": 1
}
],
"negative_keywords": [
{
"keyword": "<string>",
"match_type": "broad"
}
],
"product_codes": ["<string>"]
},
"pageId": "1147910135081908",
"pixelId": "123456789012345",
"instagramActorId": "17841400000000000",
"welcomeMessageFlowId": "1122334455667788",
"leadFormId": "987654321098765",
"appId": "1827364556677889",
"optimizationGoals": [
{
"kind": "metric",
"metric": "clicks",
"reach_unit": "individuals",
"target_frequency": {},
"view_duration_seconds": 123,
"target": {
"kind": "cost_per",
"value": 123
},
"priority": 123
}
]
}
] }
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({
products: [
{
productId: 'product_123',
storefrontId: '<string>',
inventorySourceId: '<string>',
selectionId: 'product_123::a1b2c3',
salesAgentId: 'agent_456',
groupId: 'ctx_123-group-0',
groupName: 'Publisher Name',
bidPrice: 12.5,
budget: 5000,
pricingOptionId: 'po_abc123',
targetingOverlay: {
geo_countries: ['<string>'],
geo_countries_exclude: ['<string>'],
geo_regions: ['<string>'],
geo_regions_exclude: ['<string>'],
geo_metros: [{system: 'nielsen_dma', values: ['<string>']}],
geo_metros_exclude: [{system: 'nielsen_dma', values: ['<string>']}],
geo_postal_areas: [{country: 'US', values: ['<string>']}],
geo_postal_areas_exclude: [{country: 'US', values: ['<string>']}],
geo_places: [
{
country: '<string>',
system: 'geonames',
place_type: 'airport',
values: ['<string>'],
system_version: '<string>',
value_labels: {},
ext: {}
}
],
geo_places_exclude: [
{
country: '<string>',
system: 'geonames',
place_type: 'airport',
values: ['<string>'],
system_version: '<string>',
value_labels: {},
ext: {}
}
],
daypart_targets: [
{
days: ['monday'],
start_hour: 11,
end_hour: 12,
timezone: 'inventory_local',
label: '<string>'
}
],
axe_include_segment: '<string>',
axe_exclude_segment: '<string>',
audience_include: ['<string>'],
audience_exclude: ['<string>'],
signal_targeting: [{}],
frequency_cap: {suppress_minutes: 1, max_impressions: 4503599627370496, per: 'individuals'},
placement_selection: {
mode: 'selected',
placement_refs: [{placement_id: '<string>', publisher_domain: '<string>'}],
ext: {}
},
collection_selection: {
mode: 'selected',
collections: [{publisher_domain: '<string>', collection_ids: ['<string>']}],
ext: {}
},
device_platform: ['ios'],
device_platform_exclude: ['ios'],
device_type: ['desktop'],
device_type_exclude: ['desktop'],
browser: ['chrome'],
browser_exclude: ['chrome'],
store_catchments: [{catalog_id: '<string>', store_ids: ['<string>'], catchment_ids: ['<string>']}],
geo_proximity: [{}],
language: ['<string>'],
keyword_targets: [{keyword: '<string>', match_type: 'broad', bid_price: 1}],
negative_keywords: [{keyword: '<string>', match_type: 'broad'}],
product_codes: ['<string>']
},
pageId: '1147910135081908',
pixelId: '123456789012345',
instagramActorId: '17841400000000000',
welcomeMessageFlowId: '1122334455667788',
leadFormId: '987654321098765',
appId: '1827364556677889',
optimizationGoals: [
{
kind: 'metric',
metric: 'clicks',
reach_unit: 'individuals',
target_frequency: {},
view_duration_seconds: 123,
target: {kind: 'cost_per', value: 123},
priority: 123
}
]
}
]
})
};
fetch('https://api.interchange.io/api/v2/buyer/discovery/{discoveryId}/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"discoveryId": "<string>",
"products": [
{
"productId": "<string>",
"salesAgentId": "<string>",
"selectedAt": "<string>",
"groupId": "<string>",
"groupName": "<string>",
"storefrontId": "<string>",
"inventorySourceId": "<string>",
"selectionId": "<string>",
"bidPrice": 123,
"budget": 123,
"targetingOverlay": {
"geo_countries": [
"<string>"
],
"geo_countries_exclude": [
"<string>"
],
"geo_regions": [
"<string>"
],
"geo_regions_exclude": [
"<string>"
],
"geo_metros": [
{
"system": "nielsen_dma",
"values": [
"<string>"
]
}
],
"geo_metros_exclude": [
{
"system": "nielsen_dma",
"values": [
"<string>"
]
}
],
"geo_postal_areas": [
{
"country": "US",
"values": [
"<string>"
]
}
],
"geo_postal_areas_exclude": [
{
"country": "US",
"values": [
"<string>"
]
}
],
"geo_places": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": [
"<string>"
],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"geo_places_exclude": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": [
"<string>"
],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"daypart_targets": [
{
"days": [
"monday"
],
"start_hour": 11,
"end_hour": 12,
"timezone": "inventory_local",
"label": "<string>"
}
],
"axe_include_segment": "<string>",
"axe_exclude_segment": "<string>",
"audience_include": [
"<string>"
],
"audience_exclude": [
"<string>"
],
"signal_targeting_groups": {
"operator": "all",
"groups": [
{
"operator": "any",
"signals": [
{
"signal_ref": {
"scope": "product",
"signal_id": "<string>"
},
"value_type": "binary",
"value": true,
"pricing_option_id": "<string>",
"signal_agent_segment_id": "<string>",
"activation_key": {
"type": "segment_id",
"segment_id": "<string>"
}
}
]
}
]
},
"signal_targeting": [
{}
],
"demographics": {
"age": {
"include_unknown": true,
"min": 75,
"max": 75
}
},
"frequency_cap": {
"suppress": {
"interval": 4503599627370496,
"unit": "seconds"
},
"suppress_minutes": 1,
"max_impressions": 4503599627370496,
"per": "individuals",
"window": {
"interval": 4503599627370496,
"unit": "seconds"
}
},
"property_list": {
"agent_url": "<string>",
"list_id": "<string>",
"auth_token": "<string>"
},
"property_list_exclude": {
"agent_url": "<string>",
"list_id": "<string>",
"auth_token": "<string>"
},
"collection_list": {
"agent_url": "<string>",
"list_id": "<string>",
"auth_token": "<string>"
},
"collection_list_exclude": {
"agent_url": "<string>",
"list_id": "<string>",
"auth_token": "<string>"
},
"placement_selection": {
"mode": "selected",
"placement_refs": [
{
"placement_id": "<string>",
"publisher_domain": "<string>"
}
],
"ext": {}
},
"collection_selection": {
"mode": "selected",
"collections": [
{
"publisher_domain": "<string>",
"collection_ids": [
"<string>"
]
}
],
"ext": {}
},
"age_restriction": {
"min": 56,
"verification_required": true,
"accepted_methods": [
"facial_age_estimation"
]
},
"device_platform": [
"ios"
],
"device_platform_exclude": [
"ios"
],
"device_type": [
"desktop"
],
"device_type_exclude": [
"desktop"
],
"browser": [
"chrome"
],
"browser_exclude": [
"chrome"
],
"store_catchments": [
{
"catalog_id": "<string>",
"store_ids": [
"<string>"
],
"catchment_ids": [
"<string>"
]
}
],
"geo_proximity": [
{}
],
"language": [
"<string>"
],
"keyword_targets": [
{
"keyword": "<string>",
"match_type": "broad",
"bid_price": 1
}
],
"negative_keywords": [
{
"keyword": "<string>",
"match_type": "broad"
}
],
"product_codes": [
"<string>"
]
}
}
],
"totalProducts": 0,
"budgetContext": {
"sessionBudget": 123,
"allocatedBudget": 123,
"remainingBudget": 123,
"budgetWarning": "<string>"
},
"campaignBound": true,
"campaignWarning": "<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": {}
}
}Add products to selection
Add products to the selection. Products must have been discovered via GET /discovery//discover-products first.
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/discovery/{discoveryId}/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"products": [
{
"productId": "product_123",
"storefrontId": "<string>",
"inventorySourceId": "<string>",
"selectionId": "product_123::a1b2c3",
"salesAgentId": "agent_456",
"groupId": "ctx_123-group-0",
"groupName": "Publisher Name",
"bidPrice": 12.5,
"budget": 5000,
"pricingOptionId": "po_abc123",
"targetingOverlay": {
"geo_countries": [
"<string>"
],
"geo_countries_exclude": [
"<string>"
],
"geo_regions": [
"<string>"
],
"geo_regions_exclude": [
"<string>"
],
"geo_metros": [
{
"system": "nielsen_dma",
"values": [
"<string>"
]
}
],
"geo_metros_exclude": [
{
"system": "nielsen_dma",
"values": [
"<string>"
]
}
],
"geo_postal_areas": [
{
"country": "US",
"values": [
"<string>"
]
}
],
"geo_postal_areas_exclude": [
{
"country": "US",
"values": [
"<string>"
]
}
],
"geo_places": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": [
"<string>"
],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"geo_places_exclude": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": [
"<string>"
],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"daypart_targets": [
{
"days": [
"monday"
],
"start_hour": 11,
"end_hour": 12,
"timezone": "inventory_local",
"label": "<string>"
}
],
"axe_include_segment": "<string>",
"axe_exclude_segment": "<string>",
"audience_include": [
"<string>"
],
"audience_exclude": [
"<string>"
],
"signal_targeting": [
{}
],
"frequency_cap": {
"suppress_minutes": 1,
"max_impressions": 4503599627370496,
"per": "individuals"
},
"placement_selection": {
"mode": "selected",
"placement_refs": [
{
"placement_id": "<string>",
"publisher_domain": "<string>"
}
],
"ext": {}
},
"collection_selection": {
"mode": "selected",
"collections": [
{
"publisher_domain": "<string>",
"collection_ids": [
"<string>"
]
}
],
"ext": {}
},
"device_platform": [
"ios"
],
"device_platform_exclude": [
"ios"
],
"device_type": [
"desktop"
],
"device_type_exclude": [
"desktop"
],
"browser": [
"chrome"
],
"browser_exclude": [
"chrome"
],
"store_catchments": [
{
"catalog_id": "<string>",
"store_ids": [
"<string>"
],
"catchment_ids": [
"<string>"
]
}
],
"geo_proximity": [
{}
],
"language": [
"<string>"
],
"keyword_targets": [
{
"keyword": "<string>",
"match_type": "broad",
"bid_price": 1
}
],
"negative_keywords": [
{
"keyword": "<string>",
"match_type": "broad"
}
],
"product_codes": [
"<string>"
]
},
"pageId": "1147910135081908",
"pixelId": "123456789012345",
"instagramActorId": "17841400000000000",
"welcomeMessageFlowId": "1122334455667788",
"leadFormId": "987654321098765",
"appId": "1827364556677889",
"optimizationGoals": [
{
"kind": "metric",
"metric": "clicks",
"reach_unit": "individuals",
"target_frequency": {},
"view_duration_seconds": 123,
"target": {
"kind": "cost_per",
"value": 123
},
"priority": 123
}
]
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/discovery/{discoveryId}/products"
payload = { "products": [
{
"productId": "product_123",
"storefrontId": "<string>",
"inventorySourceId": "<string>",
"selectionId": "product_123::a1b2c3",
"salesAgentId": "agent_456",
"groupId": "ctx_123-group-0",
"groupName": "Publisher Name",
"bidPrice": 12.5,
"budget": 5000,
"pricingOptionId": "po_abc123",
"targetingOverlay": {
"geo_countries": ["<string>"],
"geo_countries_exclude": ["<string>"],
"geo_regions": ["<string>"],
"geo_regions_exclude": ["<string>"],
"geo_metros": [
{
"system": "nielsen_dma",
"values": ["<string>"]
}
],
"geo_metros_exclude": [
{
"system": "nielsen_dma",
"values": ["<string>"]
}
],
"geo_postal_areas": [
{
"country": "US",
"values": ["<string>"]
}
],
"geo_postal_areas_exclude": [
{
"country": "US",
"values": ["<string>"]
}
],
"geo_places": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": ["<string>"],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"geo_places_exclude": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": ["<string>"],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"daypart_targets": [
{
"days": ["monday"],
"start_hour": 11,
"end_hour": 12,
"timezone": "inventory_local",
"label": "<string>"
}
],
"axe_include_segment": "<string>",
"axe_exclude_segment": "<string>",
"audience_include": ["<string>"],
"audience_exclude": ["<string>"],
"signal_targeting": [{}],
"frequency_cap": {
"suppress_minutes": 1,
"max_impressions": 4503599627370496,
"per": "individuals"
},
"placement_selection": {
"mode": "selected",
"placement_refs": [
{
"placement_id": "<string>",
"publisher_domain": "<string>"
}
],
"ext": {}
},
"collection_selection": {
"mode": "selected",
"collections": [
{
"publisher_domain": "<string>",
"collection_ids": ["<string>"]
}
],
"ext": {}
},
"device_platform": ["ios"],
"device_platform_exclude": ["ios"],
"device_type": ["desktop"],
"device_type_exclude": ["desktop"],
"browser": ["chrome"],
"browser_exclude": ["chrome"],
"store_catchments": [
{
"catalog_id": "<string>",
"store_ids": ["<string>"],
"catchment_ids": ["<string>"]
}
],
"geo_proximity": [{}],
"language": ["<string>"],
"keyword_targets": [
{
"keyword": "<string>",
"match_type": "broad",
"bid_price": 1
}
],
"negative_keywords": [
{
"keyword": "<string>",
"match_type": "broad"
}
],
"product_codes": ["<string>"]
},
"pageId": "1147910135081908",
"pixelId": "123456789012345",
"instagramActorId": "17841400000000000",
"welcomeMessageFlowId": "1122334455667788",
"leadFormId": "987654321098765",
"appId": "1827364556677889",
"optimizationGoals": [
{
"kind": "metric",
"metric": "clicks",
"reach_unit": "individuals",
"target_frequency": {},
"view_duration_seconds": 123,
"target": {
"kind": "cost_per",
"value": 123
},
"priority": 123
}
]
}
] }
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({
products: [
{
productId: 'product_123',
storefrontId: '<string>',
inventorySourceId: '<string>',
selectionId: 'product_123::a1b2c3',
salesAgentId: 'agent_456',
groupId: 'ctx_123-group-0',
groupName: 'Publisher Name',
bidPrice: 12.5,
budget: 5000,
pricingOptionId: 'po_abc123',
targetingOverlay: {
geo_countries: ['<string>'],
geo_countries_exclude: ['<string>'],
geo_regions: ['<string>'],
geo_regions_exclude: ['<string>'],
geo_metros: [{system: 'nielsen_dma', values: ['<string>']}],
geo_metros_exclude: [{system: 'nielsen_dma', values: ['<string>']}],
geo_postal_areas: [{country: 'US', values: ['<string>']}],
geo_postal_areas_exclude: [{country: 'US', values: ['<string>']}],
geo_places: [
{
country: '<string>',
system: 'geonames',
place_type: 'airport',
values: ['<string>'],
system_version: '<string>',
value_labels: {},
ext: {}
}
],
geo_places_exclude: [
{
country: '<string>',
system: 'geonames',
place_type: 'airport',
values: ['<string>'],
system_version: '<string>',
value_labels: {},
ext: {}
}
],
daypart_targets: [
{
days: ['monday'],
start_hour: 11,
end_hour: 12,
timezone: 'inventory_local',
label: '<string>'
}
],
axe_include_segment: '<string>',
axe_exclude_segment: '<string>',
audience_include: ['<string>'],
audience_exclude: ['<string>'],
signal_targeting: [{}],
frequency_cap: {suppress_minutes: 1, max_impressions: 4503599627370496, per: 'individuals'},
placement_selection: {
mode: 'selected',
placement_refs: [{placement_id: '<string>', publisher_domain: '<string>'}],
ext: {}
},
collection_selection: {
mode: 'selected',
collections: [{publisher_domain: '<string>', collection_ids: ['<string>']}],
ext: {}
},
device_platform: ['ios'],
device_platform_exclude: ['ios'],
device_type: ['desktop'],
device_type_exclude: ['desktop'],
browser: ['chrome'],
browser_exclude: ['chrome'],
store_catchments: [{catalog_id: '<string>', store_ids: ['<string>'], catchment_ids: ['<string>']}],
geo_proximity: [{}],
language: ['<string>'],
keyword_targets: [{keyword: '<string>', match_type: 'broad', bid_price: 1}],
negative_keywords: [{keyword: '<string>', match_type: 'broad'}],
product_codes: ['<string>']
},
pageId: '1147910135081908',
pixelId: '123456789012345',
instagramActorId: '17841400000000000',
welcomeMessageFlowId: '1122334455667788',
leadFormId: '987654321098765',
appId: '1827364556677889',
optimizationGoals: [
{
kind: 'metric',
metric: 'clicks',
reach_unit: 'individuals',
target_frequency: {},
view_duration_seconds: 123,
target: {kind: 'cost_per', value: 123},
priority: 123
}
]
}
]
})
};
fetch('https://api.interchange.io/api/v2/buyer/discovery/{discoveryId}/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"discoveryId": "<string>",
"products": [
{
"productId": "<string>",
"salesAgentId": "<string>",
"selectedAt": "<string>",
"groupId": "<string>",
"groupName": "<string>",
"storefrontId": "<string>",
"inventorySourceId": "<string>",
"selectionId": "<string>",
"bidPrice": 123,
"budget": 123,
"targetingOverlay": {
"geo_countries": [
"<string>"
],
"geo_countries_exclude": [
"<string>"
],
"geo_regions": [
"<string>"
],
"geo_regions_exclude": [
"<string>"
],
"geo_metros": [
{
"system": "nielsen_dma",
"values": [
"<string>"
]
}
],
"geo_metros_exclude": [
{
"system": "nielsen_dma",
"values": [
"<string>"
]
}
],
"geo_postal_areas": [
{
"country": "US",
"values": [
"<string>"
]
}
],
"geo_postal_areas_exclude": [
{
"country": "US",
"values": [
"<string>"
]
}
],
"geo_places": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": [
"<string>"
],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"geo_places_exclude": [
{
"country": "<string>",
"system": "geonames",
"place_type": "airport",
"values": [
"<string>"
],
"system_version": "<string>",
"value_labels": {},
"ext": {}
}
],
"daypart_targets": [
{
"days": [
"monday"
],
"start_hour": 11,
"end_hour": 12,
"timezone": "inventory_local",
"label": "<string>"
}
],
"axe_include_segment": "<string>",
"axe_exclude_segment": "<string>",
"audience_include": [
"<string>"
],
"audience_exclude": [
"<string>"
],
"signal_targeting_groups": {
"operator": "all",
"groups": [
{
"operator": "any",
"signals": [
{
"signal_ref": {
"scope": "product",
"signal_id": "<string>"
},
"value_type": "binary",
"value": true,
"pricing_option_id": "<string>",
"signal_agent_segment_id": "<string>",
"activation_key": {
"type": "segment_id",
"segment_id": "<string>"
}
}
]
}
]
},
"signal_targeting": [
{}
],
"demographics": {
"age": {
"include_unknown": true,
"min": 75,
"max": 75
}
},
"frequency_cap": {
"suppress": {
"interval": 4503599627370496,
"unit": "seconds"
},
"suppress_minutes": 1,
"max_impressions": 4503599627370496,
"per": "individuals",
"window": {
"interval": 4503599627370496,
"unit": "seconds"
}
},
"property_list": {
"agent_url": "<string>",
"list_id": "<string>",
"auth_token": "<string>"
},
"property_list_exclude": {
"agent_url": "<string>",
"list_id": "<string>",
"auth_token": "<string>"
},
"collection_list": {
"agent_url": "<string>",
"list_id": "<string>",
"auth_token": "<string>"
},
"collection_list_exclude": {
"agent_url": "<string>",
"list_id": "<string>",
"auth_token": "<string>"
},
"placement_selection": {
"mode": "selected",
"placement_refs": [
{
"placement_id": "<string>",
"publisher_domain": "<string>"
}
],
"ext": {}
},
"collection_selection": {
"mode": "selected",
"collections": [
{
"publisher_domain": "<string>",
"collection_ids": [
"<string>"
]
}
],
"ext": {}
},
"age_restriction": {
"min": 56,
"verification_required": true,
"accepted_methods": [
"facial_age_estimation"
]
},
"device_platform": [
"ios"
],
"device_platform_exclude": [
"ios"
],
"device_type": [
"desktop"
],
"device_type_exclude": [
"desktop"
],
"browser": [
"chrome"
],
"browser_exclude": [
"chrome"
],
"store_catchments": [
{
"catalog_id": "<string>",
"store_ids": [
"<string>"
],
"catchment_ids": [
"<string>"
]
}
],
"geo_proximity": [
{}
],
"language": [
"<string>"
],
"keyword_targets": [
{
"keyword": "<string>",
"match_type": "broad",
"bid_price": 1
}
],
"negative_keywords": [
{
"keyword": "<string>",
"match_type": "broad"
}
],
"product_codes": [
"<string>"
]
}
}
],
"totalProducts": 0,
"budgetContext": {
"sessionBudget": 123,
"allocatedBudget": 123,
"remainingBudget": 123,
"budgetWarning": "<string>"
},
"campaignBound": true,
"campaignWarning": "<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
Discovery ID
1"abc123-def456-ghi789"
Body
Request to add products to a discovery session
Products to add to the selection
1 - 100 elementsShow child attributes
Show child attributes
When true, replaces all existing products instead of merging
Optional campaign association check. When provided, the server verifies this discovery session is attached to the campaign before reporting success.
"campaign_ea5e33dd-d65b-44c7-a3e8-8e1db1d137b4"
Response
Add products to selection
Response containing selected products
Discovery ID
Selected products in the discovery session
Show child attributes
Show child attributes
Total number of selected products
-9007199254740991 <= x <= 9007199254740991Budget allocation context
Show child attributes
Show child attributes
Whether this discovery session is attached to an active campaign. When false, the products are saved to the session but no active campaign reflects them yet.
Guidance shown only when campaignBound is false: either the session is not attached to any campaign, or the campaign it was attached to has been archived. Pass campaignId for an active campaign (or restore the archived one) so the campaign reflects the products.