Batch processing refers to the execution of multiple operations or tasks as a single unit, rather than individually processing each operation. It allows consumers to send a batch of requests to an API in a single HTTP call, reducing network latency and improving overall performance. The MBanq Batch API enables consumers to access large amounts of data or make changes to multiple objects efficiently.

Using the MBanq Batch API, the NeoBank FinTech can efficiently process multiple banking operations in a single batch request, improving performance and reducing network overhead. Additionally, the Batch API supports handling dependencies between operations and deeply nested dependent requests, allowing for complex transactional scenarios.

In a scenario where a NeoBank FinTech is using the MBanq API, they might need to perform various banking operations in bulk, such as creating multiple client accounts, processing loan applications, or applying charges to multiple loans. Instead of making separate API calls for each operation, the NeoBank can utilize the Batch API to combine these operations into a single batch request, improving efficiency and reducing the number of network round-trips.

Example Scenario: Batch Client Onboarding

For example, let's consider a NeoBank that wants to onboard a batch of new clients and process loan applications for each client. They can use the Batch API to send a single request containing multiple operations. The request body might include instructions for creating client accounts, submitting loan applications, and applying charges to the loans. The NeoBank can specify dependencies between operations, such as ensuring that a loan application is processed only after the corresponding client account is created.

In this example, the batch request includes four operations:

  1. Creating a client account: The first operation has a requestId of 1 and specifies the relativeUrl as "clients". It uses the HTTP method POST to create a new client account with the provided details.

  2. Processing a loan application: The second operation has a requestId of 2 and specifies the relativeUrl as "loans". It uses the HTTP method POST to submit a loan application for the client created in the previous operation. The reference field with a value of 1 indicates that this operation depends on the successful completion of the operation with requestId 1. The clientId is set to "$.clientId", indicating that the value will be substituted from the response of the previous operation.

  3. Applying charges to the loan: The third operation has a requestId of 3 and specifies the relativeUrl as "loans/$.loanId/charges". It uses the HTTP method POST to apply charges to the loan created in the previous operation. The reference field with a value of 2 indicates that this operation depends on the successful completion of the operation with requestId 2. The loanId is set to "$.loanId", indicating that the value will be substituted from the response of the previous operation.

  4. Retrieving loan charges: The fourth operation has a requestId of 4 and specifies the relativeUrl as "loans/$.loanId/charges". It uses the HTTP method GET to retrieve the charges applied to the loan created in the previous operation. The reference field with a value of 2 indicates that this operation depends on the successful completion of the operation with requestId 2.

Here's an example of a batch request using the MBanq Batch API:

POST https://api.cloud.mbanq.com/v1/batches
Content-Type: application/json

[
  {
    "requestId": 1,
    "relativeUrl": "clients",
    "method": "POST",
    "headers": [
      {
        "name": "Content-type",
        "value": "text/html"
      }
    ],
    "body": {
      "officeId": 1,
      "firstname": "Petra",
      "lastname": "Yton",
      "externalId": "ex_externalId1",
      "dateFormat": "dd MMMM yyyy",
      "locale": "en",
      "active": true,
      "activationDate": "04 March 2009",
      "submittedOnDate": "04 March 2009"
    }
  },
  {
    "requestId": 2,
    "relativeUrl": "loans",
    "method": "POST",
    "headers": [
      {
        "name": "Content-type",
        "value": "text/html"
      }
    ],
    "reference": 1,
    "body": {
      "dateFormat": "dd MMMM yyyy",
      "locale": "en_GB",
      "clientId": "$.clientId",
      "productId": 26,
      "principal": "10,000.00",
      "loanTermFrequency": 12,
      "loanTermFrequencyType": 2,
      "loanType": "individual",
      "numberOfRepayments": 10,
      "repaymentEvery": 1,
      "repaymentFrequencyType": 2,
      "interestRatePerPeriod": 10,
      "amortizationType": 1,
      "interestType": 0,
      "interestCalculationPeriodType": 1,
      "transactionProcessingStrategyId": 1,
      "expectedDisbursementDate": "10 Jun 2013",
      "submittedOnDate": "10 Jun 2013"
    }
  },
  {
    "requestId": 3,
    "relativeUrl": "loans/$.loanId/charges",
    "method": "POST",
    "reference": 2,
    "headers": [
      {
        "name": "Content-type",
        "value": "text/html"
      }
    ],
    "body": {
      "chargeId": "2",
      "locale": "en",
      "amount": "100",


"dateFormat": "dd MMMM yyyy",
      "dueDate": "29 April 2013"
    }
  },
  {
    "requestId": 4,
    "relativeUrl": "loans/$.loanId/charges",
    "method": "GET",
    "reference": 2,
    "headers": [
      {
        "name": "Content-type",
        "value": "text/html"
      }
    ],
    "body": {}
  }
]

The batch request is sent to the MBanq Batch API, and the response contains an array of logical HTTP responses, each corresponding to the success or failure of an operation. The response includes the requestId, statusCode, headers, and body for each operation.