curl --request POST \
--url https://api.interchange.io/api/v2/billing/media-entities/attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityId": 123
}
'import requests
url = "https://api.interchange.io/api/v2/billing/media-entities/attachments"
payload = { "entityId": 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({entityId: 123})
};
fetch('https://api.interchange.io/api/v2/billing/media-entities/attachments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"attachment": {
"id": 0,
"entityId": 0,
"advertiserId": "<string>",
"childCustomerId": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Attach media billing entity (admin)
Attach a media billing entity to an advertiser or an account (child customer) for resolution previews — exactly one of advertiserId/childCustomerId. Refused when the org has zero entities because there is no attachment target. Admin-only.
curl --request POST \
--url https://api.interchange.io/api/v2/billing/media-entities/attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityId": 123
}
'import requests
url = "https://api.interchange.io/api/v2/billing/media-entities/attachments"
payload = { "entityId": 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({entityId: 123})
};
fetch('https://api.interchange.io/api/v2/billing/media-entities/attachments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"attachment": {
"id": 0,
"entityId": 0,
"advertiserId": "<string>",
"childCustomerId": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"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": {}
}
}{
"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
Body
Attach a media billing entity to an advertiser or an account (child customer) for resolution previews. "Most specific wins": an advertiser attachment beats an account attachment, which beats the org primary entity when one exists.
Media billing entity to associate with this advertiser/account for resolution previews.
Advertiser to attach to entityId for resolution previews. Exactly one of advertiserId/childCustomerId must be set.
Account (child customer) to attach to entityId for previews when an advertiser has no more specific attachment. Exactly one of advertiserId/childCustomerId must be set.
Response
Attach media billing entity (admin)
Associates one advertiser or account (child customer) with a media billing entity for resolution previews.
Show child attributes
Show child attributes