Read immutable company credit and warning policy revisions
Generated from the checked-in source. Do not edit this reference by hand.
GET /api/v1/organizations/{organization}/billing/accounts/{currency}/policy/history
Organization-wide owner/admin or installation administration required, using the same authorization as company balance reads. Workspace-only sessions and company viewers cannot read shared financial policy. No account IDs, payment references or Provider prices. Exact amounts and revisions are decimal strings. Revision-descending keyset pages use one database snapshot per request; separate pages do not share a snapshot. Missing currency account returns 404; missing revision cursor returns 409. Revision zero with empty history denotes an account with no policy writes. This read does not change funds or credit. Cache-Control no-store.
Operation: getCustomerBalancePolicyHistory.
Authentication
Section titled “Authentication”Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.
[ { "bearerAuth": [] }]HTTP request
Section titled “HTTP request”Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.
curl --fail-with-body -X GET "$NIU_ORIGIN/api/v1/organizations/{organization}/billing/accounts/{currency}/policy/history" \ -H "Authorization: Bearer $NIU_BEARER_TOKEN"Parameters
Section titled “Parameters”organization
Section titled “organization”Location: path. Required.
{ "type": "string", "format": "uuid"}currency
Section titled “currency”Location: path. Required.
{ "type": "string", "pattern": "^[A-Z]{3}$"}before
Section titled “before”Location: query. Optional. Exclusive existing revision cursor.
{ "type": "string", "pattern": "^[1-9][0-9]*$"}Location: query. Optional.
{ "type": "integer", "minimum": 1, "maximum": 100, "default": 50}Request body
Section titled “Request body”No request body is declared.
Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Current revision and history page
Content type: application/json.
{ "type": "object", "required": [ "current_revision", "data", "next_before" ], "properties": { "current_revision": { "type": "string", "pattern": "^[0-9]+$" }, "data": { "type": "array", "items": { "type": "object", "required": [ "revision", "credit_limit_nanos", "warning_threshold_nanos", "created_at", "is_current" ], "properties": { "revision": { "type": "string", "pattern": "^[0-9]+$" }, "credit_limit_nanos": { "type": "string", "pattern": "^[0-9]+$" }, "warning_threshold_nanos": { "type": [ "string", "null" ], "pattern": "^[0-9]+$" }, "created_at": { "type": "string", "format": "date-time" }, "is_current": { "type": "boolean" } }, "additionalProperties": false } }, "next_before": { "type": [ "string", "null" ], "pattern": "^[1-9][0-9]*$" } }}HTTP 400
Section titled “HTTP 400”Invalid currency, revision or page query
HTTP 401
Section titled “HTTP 401”Invalid session
HTTP 404
Section titled “HTTP 404”Account absent or company billing access denied
HTTP 409
Section titled “HTTP 409”Cursor revision does not exist for this account
Behavior and supported scope
Section titled “Behavior and supported scope”Organization-wide owner/admin or installation administration required, using the same authorization as company balance reads. Workspace-only sessions and company viewers cannot read shared financial policy. No account IDs, payment references or Provider prices. Exact amounts and revisions are decimal strings. Revision-descending keyset pages use one database snapshot per request; separate pages do not share a snapshot. Missing currency account returns 404; missing revision cursor returns 409. Revision zero with empty history denotes an account with no policy writes. This read does not change funds or credit. Cache-Control no-store.
Supported scope: implemented