Update media billing entity (admin)
curl --request PUT \
--url https://api.apostra.com/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.apostra.com/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.apostra.com/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": {}
}
}Media Billing
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.
PUT
/
billing
/
media-entities
/
{entityId}
Update media billing entity (admin)
curl --request PUT \
--url https://api.apostra.com/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.apostra.com/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.apostra.com/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": {}
}
}Body
application/json
Update fields on an existing media billing entity.