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.
parentOrganizationId field
The parentOrganizationId
field is optional and can be used in two different scenarios:
If the organization needs to be linked to an existing one, populate it with the ID of the "parent" organization obtained from the response of the previously created organization.
If you are creating an organization without a parent, the field is not needed.
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 assets
There can be multiple assets in the structure. However, each asset must be created individually (one at a time).
Each asset can have its decimal place settings and other specific parameters
If you want to have the same asset in two different ledgers with different configurations, you must create the asset twice so that the configurations are different.
For example, you want to have the BTC asset in two Ledgers: in one you want to use 10 decimal places, and in the other 20 decimal places.
To create an asset using our APIs, use the Create an Asset endpoint.
Retrieving Asset information
After creating the Asset, you can retrieve the information as follows:
Updating an Asset
Deleting an Asset
An Asset can only be deleted if there is no balance available in any of its Ledger accounts. Therefore, before deleting an Asset, all remaining amounts must be moved to an external account.
Last updated