import requests
url = "https://platform.ankra.app/api/v1/org/billing/standing"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/billing/standing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/billing/standing \
--header 'Authorization: Bearer <token>'{
"state": "ok",
"overdue_invoices": 123,
"oldest_overdue_days": 123,
"overdue_cents": 123,
"restrict_after_days": 123,
"suspend_after_days": 123,
"enforced": true,
"reason": "<string>",
"restricted": true,
"shadowed": true,
"message": "<string>",
"gated_actions": [
"<string>"
],
"wallet_state": "<string>",
"free_tier_standing": "<string>",
"wallet_enforced": true,
"free_tier_enforced": true,
"credit_limit_cents": 123,
"exposure_cents": 123,
"credit_limit_approaching": true,
"credit_limit_enforced": true
}Get the organisation's billing standing
Returns the one standing verdict every enforcement gate reads for the organisation the token acts in: the overdue-invoice rung with its thresholds, whether the organisation is restricted and why, the actions that pauses, and the wallet, free-tier and credit-limit states behind it. A standing that cannot be read reports ok with reason unknown, as the gates do. Requires billing.read.
import requests
url = "https://platform.ankra.app/api/v1/org/billing/standing"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/billing/standing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/billing/standing \
--header 'Authorization: Bearer <token>'{
"state": "ok",
"overdue_invoices": 123,
"oldest_overdue_days": 123,
"overdue_cents": 123,
"restrict_after_days": 123,
"suspend_after_days": 123,
"enforced": true,
"reason": "<string>",
"restricted": true,
"shadowed": true,
"message": "<string>",
"gated_actions": [
"<string>"
],
"wallet_state": "<string>",
"free_tier_standing": "<string>",
"wallet_enforced": true,
"free_tier_enforced": true,
"credit_limit_cents": 123,
"exposure_cents": 123,
"credit_limit_approaching": true,
"credit_limit_enforced": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Act in another organisation the token's owner is an active member of; defaults to the token's own organisation.
Response
The organisation's billing standing
The overdue-invoice rung.
ok, overdue, restricted, suspended Days overdue at which the organisation is restricted.
Days overdue at which the organisation is suspended.
Whether the overdue ladder is enforced rather than only reported.
Which ladder decided the verdict; unknown when the standing could not be read.
True when the verdict would restrict but its ladder is not enforced yet.
The actions the standing pauses.
The credit limit of an invoiced organisation; null when none applies.
What counts against the credit limit.