Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

Read a company balance transaction page

Generated from the checked-in source. Do not edit this reference by hand.

GET /api/v1/organizations/{organization}/billing/transactions

Organization-wide owner/admin or installation access required. Customer ledger only; no Provider costs or margins. Ordered by descending recorded time and internal reference. UUIDs are API routing references and must not be displayed as product labels. Each page contains up to 100 entries; next_cursor is null at the end. Pass the cursor as before to read older entries. Unknown or foreign cursors return a conflict. Traversal is a live view, not a fixed export snapshot; newly inserted later entries appear on refresh. Optional currency and kind filters apply before pagination. Keep filters fixed while following cursors; out-of-filter cursors return 409. Each page and cursor check share one database snapshot.

Operation: getCustomerBalanceTransactions.

Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.

JSON
[
{
"bearerAuth": []
}
]

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.

Shell
curl --fail-with-body -X GET "$NIU_ORIGIN/api/v1/organizations/{organization}/billing/transactions" \
-H "Authorization: Bearer $NIU_BEARER_TOKEN"

Location: path. Required.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Optional. next_cursor returned by the previous page. Must belong to this company.

JSON
{
"type": "string",
"format": "uuid"
}

Location: query. Optional.

JSON
{
"type": "string",
"pattern": "^[A-Z]{3}$"
}

Location: query. Optional.

JSON
{
"type": "string",
"enum": [
"funding",
"charge",
"refund",
"funding_reversal",
"adjustment"
]
}

No request body is declared.

Customer balance entries

Content type: application/json.

JSON
{
"type": "object",
"required": [
"data",
"next_cursor"
],
"properties": {
"next_cursor": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"kind": {
"type": "string",
"enum": [
"funding",
"charge",
"refund",
"funding_reversal",
"adjustment"
]
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"amount_nanos": {
"type": "string",
"pattern": "^-?[0-9]+$"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"reverses_entry_id": {
"type": [
"string",
"null"
],
"format": "uuid"
}
}
}
}
}
}

Invalid currency, entry kind or query

Authentication required

Company account access not granted

Cursor does not belong to this company ledger

Organization-wide owner/admin or installation access required. Customer ledger only; no Provider costs or margins. Ordered by descending recorded time and internal reference. UUIDs are API routing references and must not be displayed as product labels. Each page contains up to 100 entries; next_cursor is null at the end. Pass the cursor as before to read older entries. Unknown or foreign cursors return a conflict. Traversal is a live view, not a fixed export snapshot; newly inserted later entries appear on refresh. Optional currency and kind filters apply before pagination. Keep filters fixed while following cursors; out-of-filter cursors return 409. Each page and cursor check share one database snapshot.

Supported scope: implemented