SonaCORE

Referência / Quadra Core API

GL Accounts

2 operações em Quadra Core API 0.5.0.

GET/v1/gl/accounts

List GL Accounts

List all General Ledger accounts.

GL accounts track system-level balances (e.g. External Cash, Revenue). They are not owned by any party and are identified by GSI2PK = "GL".

Parâmetros

NomeTipoDetalhe
typestring, opcionalquery Filter by account type (e.g. ASSET)
parent_account_idstring, opcionalquery Filter by parent account ID

Respostas

StatusCorpoDetalhe
200GLAccountListResponseResposta bem-sucedida
422HTTPValidationErrorErro de validação
GET/v1/gl/accounts/{account_id}

Get GL Account Detail

Get a single GL account with its current balance.

Returns the account metadata and balance computed from UTXOs. Pass ?include=obligations to include individual obligation details.

Parâmetros

NomeTipoDetalhe
account_idstringpathobrigatório
includestring, opcionalquery Comma-separated includes (e.g. obligations)

Respostas

StatusCorpoDetalhe
200GLAccountResponseResposta bem-sucedida
422HTTPValidationErrorErro de validação

Esquemas

Os modelos que as operações acima aceitam e devolvem. Campos opcionais estão marcados como tal; um campo tipado como outro modelo está documentado sob o nome dele.

GLAccountBalance

GL account balance.

CampoTipoDetalhe
amountstringobrigatórioBalance in minor units as a decimal string (e.g. '325000.00')
currencystringobrigatórioISO 4217 currency code

GLAccountListResponse

Response model for listing GL accounts.

CampoTipoDetalhe
accountsarray de GLAccountSummaryobrigatórioList of GL accounts

GLAccountResponse

Response model for a single GL account detail (includes balance).

CampoTipoDetalhe
account_idstringobrigatórioGL account identifier
balanceGLAccountBalance, opcionalCurrent balance
derivedbooleanWhether this is a derived/virtual account with no on-chain keysPadrão false
namestring, opcionalHuman-readable account name
normal_balancestring, opcionalNormal balance side (DR|CR). CR-normal nodes render cr − dr at roll-up (RFC-025).
obligationsarray de ObligationSummary, opcionalObligation details (when include=obligations)
parent_account_idstring, opcionalParent GL account ID
typestringobrigatórioAccount type (ASSET, LIABILITY, TRANSIT, REVENUE, EXCEPTION)

GLAccountSummary

Summary model for GL accounts in list responses (no balance/obligations).

CampoTipoDetalhe
account_idstringobrigatórioGL account identifier
derivedbooleanWhether this is a derived/virtual account with no on-chain keysPadrão false
namestring, opcionalHuman-readable account name
normal_balancestring, opcionalNormal balance side (DR|CR). CR-normal nodes render cr − dr at roll-up (RFC-025).
parent_account_idstring, opcionalParent GL account ID
typestringobrigatórioAccount type (ASSET, LIABILITY, TRANSIT, REVENUE, EXCEPTION)

HTTPValidationError

CampoTipoDetalhe
detailarray de ValidationError

ObligationSummary

Obligation summary returned inside the balance response.

CampoTipoDetalhe
amountintegerobrigatórioAmount in minor units (cents)
created_atstringobrigatórioISO 8601 creation timestamp
currencystringobrigatórioISO 4217 currency code
obligation_idstringobrigatórioObligation identifier (txhash_index)
statestringobrigatórioObligation state (OPEN, RESOLVED)

ValidationError

CampoTipoDetalhe
ctxobject
inputnão declarado
locarray de string ou integerobrigatório
msgstringobrigatório
typestringobrigatório