API reference

Midaz APIs deliver reliable, secure, and scalable access to the platform’s services, empowering seamless integration and adaptability to your evolving needs. Designed with RESTful principles, they provide a robust foundation for building innovative solutions.

Key highlights

  • RESTful architecture: Ensures predictable, consistent, and easy-to-use APIs.
  • JSON data exchange: Simplifies integrations with universal format compatibility.
  • Explicit versioning: Guarantees backward compatibility during updates.
📘

Note

Building a plugin or integration for Lerian? The Partners Hub has everything you need, development standards, documentation rules, and tools to help your solution work smoothly across the Lerian ecosystem.

Recommended for partners, clients, and internal teams working on custom plugins


Authentication


Midaz does not include a built-in authentication or authorization system. This gives you the flexibility to integrate with your existing identity provider or security stack.

If you need a ready-to-use solution, you can add Access Manager, a separate paid plugin developed by Lerian. It handles both authentication and fine-grained authorization, making it easier to control who can access what across your Midaz ecosystem. For more information, contact us.


Midaz APIs


Midaz is structured into three domains: Onboarding, Portfolio, and Transactions, each with APIs and endpoints tailored to specific functionalities. The tables below provide an overview of the available endpoints within each domain:

Onboarding domain

Organizations API

Endpoint Path
Create an OrganizationPOST /v1/organizations
List OrganizationsGET /v1/organizations
Retrieve an OrganizationGET /v1/organizations/{organization_id}
Update an OrganizationPATCH /v1/organizations/{organization_id}
Delete an OrganizationDELETE /v1/organizations/{organization_id}

Ledgers API

Endpoint Path
Create a LedgerPOST /v1/organizations/{organization_id}/ledgers
List LedgersGET /v1/organizations/{organization_id}/ledgers
Retrieve a LedgerGET /v1/organizations/{organization_id}/ledgers/{ledger_id}
Update a LedgerPATCH /v1/organizations/{organization_id}/ledgers/{ledger_id}
Delete a LedgerDELETE /v1/organizations/{organization_id}/ledgers/{ledger_id}

Portfolio domain

Assets API

Endpoint Path
Create an AssetPOST /v1/organizations/{organization_id}/ledgers/{ledger_id}/assets
List AssetsGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/assets
Retrieve an AssetGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/assets/{asset_id}
Update an AssetPATCH /v1/organizations/{organization_id}/ledgers/{ledger_id}/assets/{asset_id}
Delete an AssetDELETE /v1/organizations/{organization_id}/ledgers/{ledger_id}/assets/{asset_id}

Segments API

Endpoint Path
Create a SegmentPOST /v1/organizations/{organization_id}/ledgers/{ledger_id}/segments
List SegmentsGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/segments
Retrieve a SegmentGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/segments/{segment_id}
Update a SegmentPATCH /v1/organizations/{organization_id}/ledgers/{ledger_id}/segments/{segment_id}
Delete a SegmentDELETE /v1/organizations/{organization_id}/ledgers/{ledger_id}/segments/{segment_id}

Portfolios API

Endpoint Path
Create a PortfolioPOST /v1/organizations/{organization_id}/ledgers/{ledger_id}/portfolios
List PortfoliosGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/portfolios
Retrieve a PortfolioGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/portfolios/{portfolio_id}
Update a PortfolioPATCH /v1/organizations/{organization_id}/ledgers/{ledger_id}/portfolios/{portfolio_id}
Delete a PortfolioDELETE /v1/organizations/{organization_id}/ledgers/{ledger_id}/portfolios/{portfolio_id}

Accounts API

Endpoint Path
Create an AccountPOST /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts
List AccountsGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts
Retrieve an AccountGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}
Retrieve an Account by AliasGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/alias/{alias}
Retrieve an External AccountGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{asset_code}
Update an AccountPATCH /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}
Delete an AccountDELETE /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}

Transactions domain

Balances API

Endpoint Path
List BalancesGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/balances
Retrieve a BalanceGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/balances/{balance_id}
Retrieve Balances by AccountGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}/balances
Retrieve an Account by AliasGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/alias/{alias}/balances
Retrieve an External AccountGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/external/{asset_code}/balances
Update a BalancePATCH /v1/organizations/{organization_id}/ledgers/{ledger_id}/balances/{balance_id}
Delete a BalanceDELETE /v1/organizations/{organization_id}/ledgers/{ledger_id}/balances/{balance_id}

Transactions API

Endpoint Path
Create a Transaction using JSONPOST /v1/organizations/{organization_id}/ledgers/{ledger_id}/transactions/json
Create a Transaction using DSLPOST /v1/organizations/{organization_id}/ledgers/{ledger_id}/transactions/dsl
Create an Inflow TransactionPOST /v1/organizations/{organization_id}/ledgers/{ledger_id}/transactions/inflow
Create an Outflow TransactionPOST /v1/organizations/{organization_id}/ledgers/{ledger_id}/transactions/outflow
List TransactionsGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/transactions
Retrieve a TransactionGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/transactions/{transaction_id}
Update a TransactionPATCH /v1/organizations/{organization_id}/ledgers/{ledger_id}/transactions/{transaction_id}

Operations API

Endpoint Path
List Operations by AccountGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}/operations
Retrieve an Operation by AccountGET /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}/operations/{operation_id}

Error list

Refer to the Midaz Error List page to check which errors Midaz endpoints might return. You’ll find all the details you need to handle them.


Access Manager APIs


The primary goal of the Access Manager plugin is to enable the client to effectively control user access and manage applications (Midaz and plugins).

Auth APIs

Authentication API

Endpoint Path
Request an Access TokenPOST /v1/login/oauth/access_token
Refresh the Access TokenPOST /v1/login/oauth/refresh_token
End User SessionPOST /v1/logout

Authorization API

Endpoint Path
Validate User PermissionPOST /v1/authorize

User Information API

Endpoint Path
Retrieve User InformationGET /v1/userinfo
Retrieve User PermissionGET /v1/permissions

Identity APIs

Groups API

Endpoint Path
List GroupsGET /v1/groups
Retrieve Group detailsGET /v1/groups/{id}

Applications API

Endpoint Path
Create an ApplicationPOST /v1/applications
List ApplicationsGET /v1/applications
Retrieve an ApplicationGET /v1/applications/{id}
Delete an ApplicationDELETE /v1/applications/{id}

Users API

Endpoint Path
Create a UserPOST /v1/users
List UsersGET /v1/users
Retrieve User detailsGET /v1/users/{id}
Update a UserPATCH /v1/users/{id}
Delete a UserDELETE /v1/users/{id}
Reset a User PasswordPATCH /v1/users/{id}/reset-password
Update a User PasswordPATCH /v1/users/{id}/update-password

Error list

Refer to the Access Manager Error List page to check which errors Access Manager endpoints might return. You’ll find all the details you need to handle them.


CRM APIs


The CRM (Customer Relationship Manager) plugin integrates data by storing essential registration information for the Midaz account user (Holder/Owner Account), termed as the “Entity.” While necessary for validation in integration processes, it is not part of the Ledger's transactional domain.

Holders API

Endpoint Path
Create a HolderPOST /v1/holders
List HoldersGET /v1/holders
Retrieve a HolderGET /v1/holders/{id}
Update a HolderPATCH /v1/holders/{id}
Delete a HolderDELETE /v1/holders/{id}

Alias Accounts API

Endpoint Path
Create an Alias AccountPOST /v1/holders/{holder_id}/aliases
List Alias AccountsGET /v1/aliases
List Alias Accounts for a Holder (deprecated)GET /v1/holders/{holder_id}/aliases
Retrieve Alias AccountGET /v1/holders/{holder_id}/aliases/{alias_id}
Update an Alias AccountPATCH /v1/holders/{holder_id}/aliases/{alias_id}
Delete an Alias AccountDELETE /v1/holders/{holder_id}/aliases/{alias_id}

Error list

Refer to the CRM Error List page to check which errors CRM endpoints might return. You’ll find all the details you need to handle them.


Fee Engine APIs


The Fere Engine plugin manages fees across operations (financial, logistics, agriculture, pharmaceuticals, etc.) while storing transactions in customer ledgers. It aims for transparency, automation, and efficient control of fee charges.

Packages API

Endpoint Path
Create a PackagePOST /v1/packages
List PackagesGET /v1/packages
Retrieve a PackageGET /v1/packages/{id}
Update a PackagePATCH /v1/packages/{id}
Delete a PackageDELETE /v1/packages/{id}

Calculation API

Endpoint Path
Calculate Fees for a PackagePOST /v1/fees

Simulation API

Endpoint Path
Simulate Transaction FeesPOST /v1/estimates

Error list

Refer to the Fee Engine Error List page to check which errors Fee Engine endpoints might return. You’ll find all the details you need to handle them.


Smart Templates APIs


The Fere Engine plugin helps you generate dynamic, data-driven reports that can be rendered in CSV, XML, HTML, or TXT, always matching the structure defined in the template file.

Templates API

Endpoint Path
Upload a TemplatePOST /v1/templates
List TemplatesGET /v1/templates
Retrieve Template detailsGET /v1/templates/{id}
Update a TemplatePATCH /v1/templates/{id}
Delete a TemplateDELETE /v1/templates/{id}

Reports API

Endpoint Path
Create a ReportPOST /v1/reports
Check Report StatusGET /v1/reports/{id}
Download a ReportGET /v1/reports/{id}/download

Error list

Refer to the Smart Templates error list page to check which errors Smart Templates endpoints might return. You’ll find all the details you need to handle them.