Tutorial: Generate an Account Statement

In this tutorial, we will guide you through the process of generating an account statement using the MBanq API. The statement will be generated as a document (media) of type "statement" and will be linked to the specified savings account. We will use cURL statements to demonstrate the API requests and responses. Let's get started!

📘

API References for Endpoints in this tutorial:

Step 1: Generate a Statement

To generate an account statement, use the Generate Statement endpoint

ParameterValue TypeExample ValueExplanation
reportNameString"Report current and saving account(Pentaho)"The name of the report to be generated
parentEntityTypeString"savings"The entity type to link the statement (e.g., "savings" for savings account)
parentEntityIdNumber12The identifier of the parent entity (e.g., savings account ID)
reportTypeString"PDF"The type of the generated report ("PDF", "HTML", "XLSX", "XLS")
docType (optional)String"statement"The type of document to be generated (optional, can be set to "statement")
paramsObjectSee example requestParameters specific to the report (e.g., start_date, end_date, saving_account_id)

The response will include the jobId and status of the generated statement.

{
  "jobId": 209,
  "status": "ACCEPTED"
}

This table provides an overview of the parameters used in the given data object. Each parameter has a corresponding value type and a definition that clarifies its purpose in the context of job status updates.

ParameterValue TypeDefinition
jobIdIntegerThe ID of the job associated with the status update.
statusStringThe updated status of the job.

You have successfully learned how to generate an account statement using the MBanq API with cURL. By following the steps in this tutorial, you can easily trigger the generation of statements for your desired accounts.