Ledgera
ledgera.io
  • Introduction
  • Documentation Structure
  • CORE
    • Currencies
    • Balances
      • Balance Creation
      • Balance Query
      • Bulk Balance Query
      • Balance Statements Query
    • Transactions
      • Transaction Creation
      • Transaction Query
      • Entries
  • SETUP
    • Account Rules
    • Chart of Accounts
    • Execution Rules
    • Authorization Rules
    • Billing Plan
      • Custom Entries
  • REGISTER
    • Accounts
      • Account Creation
      • Account Updates
      • Account Query
        • Account Balance Query
        • Account Bulk Balance Query
        • Account Statements Query
  • OPERATION
    • Execution
    • Authorization / Confirmation
    • Split
    • Balance Sheet
  • REPORT
    • Request a report
    • Report Query
  • MULTI-TENANCY
    • Tenant Query
Powered by GitBook
On this page
  1. CORE

Currencies

Last updated 1 year ago

Was this helpful?

CtrlK
  • Adding a new currency
  • Currency query
  • Adding a new currency
  • Currency query

Was this helpful?

The system allows the creation of currencies according to the user's choice. Once created, currencies cannot be deleted from the system. Created currencies are validated at the time creating balances.

Currencies have a decimals propriety that describes how many precision characters will exist after the floating point, once all amounts persisted in the balances will be in an integer type. Example: a currency created with 2 decimals will return the amount 150000 as 1500.00.

Adding a new currency

To add a new currency, use POST /currency method.

Important: once created, currencies cannot be deleted from the system

Example of including a new currency:

Currency query

Querying the list of currencies is performed using GET /currency method.

Response example:

The system allows the creation of currencies according to the user's choice. Once created, currencies cannot be deleted from the system. Created currencies are validated at the time creating accounts balances.

Adding a new currency

To add a new currency, use POST /currency method.

Important: once created, currencies cannot be deleted from the system

Example of including a new currency:

Currency query

Querying the list of currencies is performed using GET /currency method.

Response example:

{
  "data": [
    {
      "code": "usd",
      "name": "us dollar",
      "decimals": 2
    }
  ]
}
POST /currency

{
  "code": "usd",
  "description": "us dollar"
}
GET /currency
{
  [
    {
      "code": "usd",
      "description": "us dollar"      
    }
  ]
}
POST /currency

{
  "code": "usd",
  "name": "us dollar",
  "decimals": 2
}
GET /currency