GL Accounts
2 operações em Quadra Core API 0.5.0.
/v1/gl/accountsList 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
| Nome | Tipo | Detalhe |
|---|---|---|
| type | string, opcional | query Filter by account type (e.g. ASSET) |
| parent_account_id | string, opcional | query Filter by parent account ID |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | GLAccountListResponse | Resposta bem-sucedida |
| 422 | HTTPValidationError | Erro de validação |
/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
| Nome | Tipo | Detalhe |
|---|---|---|
| account_id | string | pathobrigatório |
| include | string, opcional | query Comma-separated includes (e.g. obligations) |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | GLAccountResponse | Resposta bem-sucedida |
| 422 | HTTPValidationError | Erro 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.
| Campo | Tipo | Detalhe |
|---|---|---|
| amount | string | obrigatórioBalance in minor units as a decimal string (e.g. '325000.00') |
| currency | string | obrigatórioISO 4217 currency code |
GLAccountListResponse
Response model for listing GL accounts.
| Campo | Tipo | Detalhe |
|---|---|---|
| accounts | array de GLAccountSummary | obrigatórioList of GL accounts |
GLAccountResponse
Response model for a single GL account detail (includes balance).
| Campo | Tipo | Detalhe |
|---|---|---|
| account_id | string | obrigatórioGL account identifier |
| balance | GLAccountBalance, opcional | Current balance |
| derived | boolean | Whether this is a derived/virtual account with no on-chain keysPadrão false |
| name | string, opcional | Human-readable account name |
| normal_balance | string, opcional | Normal balance side (DR|CR). CR-normal nodes render cr − dr at roll-up (RFC-025). |
| obligations | array de ObligationSummary, opcional | Obligation details (when include=obligations) |
| parent_account_id | string, opcional | Parent GL account ID |
| type | string | obrigatórioAccount type (ASSET, LIABILITY, TRANSIT, REVENUE, EXCEPTION) |
GLAccountSummary
Summary model for GL accounts in list responses (no balance/obligations).
| Campo | Tipo | Detalhe |
|---|---|---|
| account_id | string | obrigatórioGL account identifier |
| derived | boolean | Whether this is a derived/virtual account with no on-chain keysPadrão false |
| name | string, opcional | Human-readable account name |
| normal_balance | string, opcional | Normal balance side (DR|CR). CR-normal nodes render cr − dr at roll-up (RFC-025). |
| parent_account_id | string, opcional | Parent GL account ID |
| type | string | obrigatórioAccount type (ASSET, LIABILITY, TRANSIT, REVENUE, EXCEPTION) |
HTTPValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| detail | array de ValidationError |
ObligationSummary
Obligation summary returned inside the balance response.
| Campo | Tipo | Detalhe |
|---|---|---|
| amount | integer | obrigatórioAmount in minor units (cents) |
| created_at | string | obrigatórioISO 8601 creation timestamp |
| currency | string | obrigatórioISO 4217 currency code |
| obligation_id | string | obrigatórioObligation identifier (txhash_index) |
| state | string | obrigatórioObligation state (OPEN, RESOLVED) |
ValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| ctx | object | |
| input | não declarado | |
| loc | array de string ou integer | obrigatório |
| msg | string | obrigatório |
| type | string | obrigatório |