curl --request PUT \
--url https://api.interchange.io/api/v2/billing/media-entities/{entityId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": [
"jsmith@example.com"
],
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"taxId": "<string>",
"isPrimary": true
}
'import requests
url = "https://api.interchange.io/api/v2/billing/media-entities/{entityId}"
payload = {
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": ["jsmith@example.com"],
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"taxId": "<string>",
"isPrimary": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityName: '<string>',
countryCode: 'US',
currency: 'USD',
billingEmails: ['jsmith@example.com'],
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
state: '<string>',
postalCode: '<string>',
taxId: '<string>',
isPrimary: true
})
};
fetch('https://api.interchange.io/api/v2/billing/media-entities/{entityId}', 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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Update media billing entity (admin)
Update fields on an existing media billing entity. Setting isPrimary: false on the current primary is refused unless another entity is promoted in its place — an org always has exactly one primary once it has any entity. Admin-only.
curl --request PUT \
--url https://api.interchange.io/api/v2/billing/media-entities/{entityId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": [
"jsmith@example.com"
],
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"taxId": "<string>",
"isPrimary": true
}
'import requests
url = "https://api.interchange.io/api/v2/billing/media-entities/{entityId}"
payload = {
"entityName": "<string>",
"countryCode": "US",
"currency": "USD",
"billingEmails": ["jsmith@example.com"],
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"taxId": "<string>",
"isPrimary": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityName: '<string>',
countryCode: 'US',
currency: 'USD',
billingEmails: ['jsmith@example.com'],
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
state: '<string>',
postalCode: '<string>',
taxId: '<string>',
isPrimary: true
})
};
fetch('https://api.interchange.io/api/v2/billing/media-entities/{entityId}', 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": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Surrogate id of the media billing entity.
Body
Update fields on an existing media billing entity.
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 street address, line 2 (optional).
255Entity city.
1 - 128Entity state/province/region (optional).
128Entity postal/ZIP code.
1 - 32Tax identifier for this entity (e.g. VAT number, EIN), when applicable.
64Set true to promote this entity to PRIMARY (demoting any other primary entity in the same transaction), or false to demote it. Demoting the current primary is refused unless another entity is promoted in its place — an org always has exactly one primary once it has any entity.
Response
Update 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