curl --request POST \
--url https://api.interchange.io/api/v2/billing/media-entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": [
"jsmith@example.com"
],
"addressLine1": "<string>",
"city": "<string>",
"postalCode": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/billing/media-entities"
payload = {
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": ["jsmith@example.com"],
"addressLine1": "<string>",
"city": "<string>",
"postalCode": "<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({
entityName: '<string>',
countryCode: 'US',
currency: 'USD',
billingEmails: ['jsmith@example.com'],
addressLine1: '<string>',
city: '<string>',
postalCode: '<string>'
})
};
fetch('https://api.interchange.io/api/v2/billing/media-entities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"entity": {
"id": 0,
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": [
"jsmith@example.com"
],
"addressLine1": "<string>",
"city": "<string>",
"postalCode": "<string>",
"isPrimary": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"addressLine2": "<string>",
"state": "<string>",
"taxId": "<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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Create media billing entity (admin)
Create a media billing configuration entity. An org’s first entity becomes PRIMARY regardless of isPrimary; PRIMARY is the fallback in resolution previews while entities exist. The invoice producer does not consume these records yet. Admin-only.
curl --request POST \
--url https://api.interchange.io/api/v2/billing/media-entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": [
"jsmith@example.com"
],
"addressLine1": "<string>",
"city": "<string>",
"postalCode": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/billing/media-entities"
payload = {
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": ["jsmith@example.com"],
"addressLine1": "<string>",
"city": "<string>",
"postalCode": "<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({
entityName: '<string>',
countryCode: 'US',
currency: 'USD',
billingEmails: ['jsmith@example.com'],
addressLine1: '<string>',
city: '<string>',
postalCode: '<string>'
})
};
fetch('https://api.interchange.io/api/v2/billing/media-entities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"entity": {
"id": 0,
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": [
"jsmith@example.com"
],
"addressLine1": "<string>",
"city": "<string>",
"postalCode": "<string>",
"isPrimary": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"addressLine2": "<string>",
"state": "<string>",
"taxId": "<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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Body
Create a media billing entity for configuration and resolution previews. The invoice producer does not consume these records yet.
Legal name of the media billing entity (e.g. "WPP South Africa (Pty) Ltd").
1 - 255Stored country identity metadata for the billing entity, as an ISO 3166-1 alpha-2 code. It does not derive currency, tax/address behavior, or resolution.
^[A-Z]{2}$"US"
ISO 4217 currency code
^[A-Z]{3}$"USD"
Invoicing contact email(s) for this entity. At least one is required.
1 - 20 elements^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Entity street address, line 1.
1 - 255Entity city.
1 - 128Entity postal/ZIP code.
1 - 32Entity street address, line 2 (optional).
255Entity state/province/region (optional).
128Tax identifier for this entity (e.g. VAT number, EIN), when applicable.
64Set true to make this the org's PRIMARY media billing entity, demoting any other primary entity. The primary is the fallback in resolution previews when no advertiser or account attachment matches. Omit to leave the current primary/non-primary status unchanged. An org's FIRST entity always becomes primary regardless of this field.
Response
Create media billing entity (admin)
A media billing configuration entity used by resolution previews. The invoice producer does not consume it yet.
Show child attributes
Show child attributes