Assign account
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storefrontId": 42,
"sourceId": "src_main",
"accountId": "acc_67890"
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/accounts"
payload = {
"storefrontId": 42,
"sourceId": "src_main",
"accountId": "acc_67890"
}
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({storefrontId: 42, sourceId: 'src_main', accountId: 'acc_67890'})
};
fetch('https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/accounts', 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": {}
}
}Advertisers
Assign account
Link a partner (source) account discovered via list_available_accounts to an advertiser.
POST
/
advertisers
/
{advertiserId}
/
accounts
Assign account
curl --request POST \
--url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storefrontId": 42,
"sourceId": "src_main",
"accountId": "acc_67890"
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/accounts"
payload = {
"storefrontId": 42,
"sourceId": "src_main",
"accountId": "acc_67890"
}
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({storefrontId: 42, sourceId: 'src_main', accountId: 'acc_67890'})
};
fetch('https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/accounts', 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
Request body for assigning a source account to an advertiser
Storefront the source lives on. Pair with sourceId.
Required range:
0 < x <= 9007199254740991Example:
42
Inventory source within storefrontId to register this account against.
Minimum string length:
1Example:
"src_main"
Account ID at the source to assign to this advertiser. Must come from list_available_accounts.
Minimum string length:
1Example:
"acc_67890"
Credential ID returned by list_available_accounts. Required when the same account ID is exposed by more than one mapped connection.
Example:
"42"
Billing arrangement type for this account (e.g. "advertiser", "operator", "agent"). Defaults to the source's default billing type.
Example:
"advertiser"
Response
Assign account