Onboarding
Use the Onboarding domain to perform the initial configurations a company needs to start operating with its ledger.
The Onboarding domain can be used by all Midaz users, regardless of the contracting model being Open Source or SaaS (hosted by Lerian or by the client). However, each contracting model has a slight difference:
SaaS model - Lerian handles the authentication process. This ensures that a client cannot access the information of another client's ledger.
Open Source model - the client handles the authentication process since they will likely host the application exclusively for their company.
Initial configuration
When you first start using Midaz, you must perform the following steps:
Step 1 - Create the Organization
The first thing to do is to create the Organization.
To create an Organization, use the Create an Organization endpoint.
Organizational structure
If you have an Organization with multiple branches, you must create various Organizations and set one as the "Parent Organization".
For example, let's say you own Company XYZ, which has a branch in New York, called XYZ New York. You will then create the Company XYZ Organization and set it as the parent of XYZ New York and XYZ Brasil.
To create the structure, follow these steps:
Create the Organization for Company XYZ.
Create the Organization for XYZ New York and set the identifier of Company XYZ as the parent in the
parentOrganizationId
field.
Retrieving Organization information
After creating the Organization, you can retrieve the information as follows:
To retrieve the information of all Organizations you have created, use the Retrieve all Organizations endpoint.
To retrieve the information of a specific Organization, use the Retrieve Organization by id endpoint.
Updating an Organization
If you need to update the information of an Organization, use the Update an Organization endpoint.
You cannot edit the document (legal_document
) of an Organization.
Deleting an Organization
For safety reasons, once an Organization is in production, you cannot delete it. If you need to do so, contact Lerian support.
However, if the Organization is still in the homologation process, use the Delete an Organization endpoint.
Step 2 - Create the Ledgers
You can create various Ledgers for each Organization.
To create a Ledger using our APIs, use the Create a Ledger endpoint.
Retrieving Ledger information
A user can retrieve the information of the Ledgers that they have access to as follows:
To retrieve the information of all Ledgers, use the Retrieve all Ledgers endpoint.
To retrieve the information of a specific Ledger, use the Retrieve Ledger by id endpoint.
Updating a Ledger
If you need to update the information of a Ledger, use the Update a Ledger endpoint.
Deleting a Ledger
For safety reasons, once a Ledger is in production, it cannot be deleted. If you need to do it, for any reason, contact Lerian support.
However, if the Ledger is still in the homologation process, use the Delete a Ledger endpoint.
Step 3 - Create the instruments
There can be multiple instruments in the structure. However, each instrument must be created individually (one at a time).
Each instrument can have its decimal place settings and other specific parameters
If you want to have the same instrument in two different ledgers with different configurations, you must create the instrument twice so that the configurations are different.
For example, you want to have the BTC instrument in two Ledgers: in one you want to use 10 decimal places, and in the other 20 decimal places.
To create an instrument using our APIs, use the Create an Instrument endpoint.
Retrieving Instrument information
After creating the Instrument, you can retrieve the information as follows:
To retrieve the information of all Instruments you have created, use the Retrieve all Instruments endpoint.
To retrieve the information of a specific Instrument, use the Retrieve Instrument by id endpoint.
Updating an Instrument
If you need to update the information of an Instrument, use the Update an Instrument endpoint.
Deleting an Instrument
An instrument can only be deleted if there is no balance available in any of its Ledger accounts. Therefore, before deleting an instrument, all remaining amounts must be moved to an external account.
To delete an Instrument, use the Delete an Instrument endpoint.
Last updated