Use the Ledgers API to manage the Ledgers that are part of the Organization.
Refer to Ledgers API in the Requests and Responses page for more information about the parameters.
Create a Ledger
POST/v1/organizations/{{organization_id}}/ledgers
Use this endpoint to create a Ledger.
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Request body
{"name":"The Neobank Brazil","status":{ //optional, default status.code = ACTIVE and description = null"code":"ACTIVE","description":"Ready to use" },"metadata":{ //optional"costCenter":"BR_11101997" }}
Response codes
{"id":"77b0fb8b-1bd9-4810-9c6d-7e80064fab0c","name":"The Neobank Brazil","organizationId":"cc15194a-6bc9-4ebb-b15d-43411a54ba4b","status":{"code":"ACTIVE","description":"Ready to use" },"createdAt":"2024-02-08T16:59:31+0300","updatedAt":"2024-02-08T16:59:31+0300","deletedAt":null,"metadata":{"costCenter":"BR_11101997" }}
{"code":"0002","title":"Ledger Name Conflict", "message":"A ledger named {{name}} already exists in your organization. Please rename the ledger, or if you want to use the same name, consider creating a new ledger for a different division."
}
{"code":"0009","title":"Missing Fields in Request", "message":"Your request is missing one or more required fields. Please refer to the documentation to ensure all necessary fields are included in your request."
}
Retrieve all Ledgers
GET/v1/organizations/{{organization_id}}/ledgers
Use this endpoint to retrieve the information of all Ledgers that the user has access to.
Headers
Name
Value
Authorization
Bearer <token>
Response codes
If a ledger has been deleted, the information of the ledger will be displayed, including the date when the deletion occurred in the deletedAt field.
{"code":"0007","title":"Entity Not Found", "description": "No entity was found matching the provided ID. Ensure the correct ID is being used for the entity you are attempting to manage."
}
Use this endpoint to edit and update the information of a specific Ledger. When you update a Ledger, the following fields can be edited:
name
status
metadata
When updating the "metadata" object, all previous key-value pairs must be included in the update, or they will be removed. Check the Metadata section for more information.
{"code":"0006","title":"Unmodifiable Field Error", "message":"Your request includes a field that cannot be modified. Please review your request and try again, removing any uneditable fields. Please refer to the documentation for guidance."
}
{"code":"0007","title":"Entity Not Found", "message":"No entity was found for the given ID. Please make sure to use the correct ID for the entity you are trying to manage."
}
Use this endpoint to deactivate a Ledger that is in the homologation process (HML).
Only Lerian's internal team can deactivate Ledgers in production (PROD).
Headers
Name
Value
Authorization
Bearer <token>
Response codes
{"code":"0008","title":"Action Not Permitted", "description": "The action you are attempting is not allowed in the current environment. Please consult the documentation for guidance on how to proceed."
}
{"code":"0007","title":"Entity Not Found", "message":"No entity was found for the given ID. Please make sure to use the correct ID for the entity you are trying to manage."
}