Create and inspect an account
Required permission: finance.write to create, finance.read to inspect.
-
Create the account
Terminal window curl -sS -X POST https://ledger.mavula.dev/api/accounts \-H "Authorization: Bearer $MAVULA_ACCESS_TOKEN" \-H 'Content-Type: application/json' \-H 'Idempotency-Key: 56a1f534-9054-4dcf-82cb-55ebc102da18' \-H 'X-Correlation-ID: 9ab719e7-7aa6-4cc5-9d03-01eef511262b' \-d '{"customer_id":"customer_001","product_id":"current_account_mzn","name":"Operating account","currency":"MZN"}' -
Read the current balance
Terminal window curl -sS https://ledger.mavula.dev/api/accounts/ACCOUNT_ID/balance \-H "Authorization: Bearer $MAVULA_ACCESS_TOKEN" -
Page through the statement
Terminal window curl -sS 'https://ledger.mavula.dev/api/accounts/ACCOUNT_ID/statement?limit=100' \-H "Authorization: Bearer $MAVULA_ACCESS_TOKEN"When
next_cursoris present, send it ascursoron the next request. A statement entry includes its direction, amount, currency, resulting balance and posting timestamp.
Monetary amounts are decimal strings. Never parse them with binary floating-point arithmetic.