Ensure GAM custom-targeting keys exist
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/esa/{esaId}/gam-custom-targeting-keys/ensure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keys": [
{
"name": "<string>",
"displayName": "<string>"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/esa/{esaId}/gam-custom-targeting-keys/ensure"
payload = { "keys": [
{
"name": "<string>",
"displayName": "<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({keys: [{name: '<string>', displayName: '<string>'}]})
};
fetch('https://api.interchange.io/api/v2/storefront/esa/{esaId}/gam-custom-targeting-keys/ensure', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created": [
{
"name": "<string>",
"keyId": "<string>",
"displayName": "<string>"
}
],
"alreadyExisted": [
{
"name": "<string>",
"keyId": "<string>",
"displayName": "<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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Storefront Ad Server Buyer Routing
Ensure GAM custom-targeting keys exist
Idempotently create the named GAM custom-targeting keys on a Google Ad Manager-backed ad server source. Names already present in the source’s synced GAM catalog are reported in alreadyExisted with no GAM call; truly-missing names are minted as FREEFORM, ACTIVE, reportableType=ON and returned in created. After minting, the source re-runs its custom-targeting sync inline so a follow-up PUT /axe-keys call (or equivalent for other signal protocols) sees the fresh key IDs on the same turn. Protocol-agnostic — currently used to mint AXE keys (axei / axex / axem) but reusable for TMP and future signal protocols.
POST
/
esa
/
{esaId}
/
gam-custom-targeting-keys
/
ensure
Ensure GAM custom-targeting keys exist
curl --request POST \
--url https://api.interchange.io/api/v2/storefront/esa/{esaId}/gam-custom-targeting-keys/ensure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keys": [
{
"name": "<string>",
"displayName": "<string>"
}
]
}
'import requests
url = "https://api.interchange.io/api/v2/storefront/esa/{esaId}/gam-custom-targeting-keys/ensure"
payload = { "keys": [
{
"name": "<string>",
"displayName": "<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({keys: [{name: '<string>', displayName: '<string>'}]})
};
fetch('https://api.interchange.io/api/v2/storefront/esa/{esaId}/gam-custom-targeting-keys/ensure', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created": [
{
"name": "<string>",
"keyId": "<string>",
"displayName": "<string>"
}
],
"alreadyExisted": [
{
"name": "<string>",
"keyId": "<string>",
"displayName": "<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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Ad server source connection id. The wire field remains esaId for API compatibility.
Required range:
0 < x <= 9007199254740991Example:
123
Body
application/json
Minimum array length:
1Show child attributes
Show child attributes