Account
Mandate Rule
Create Mandate Rule

Create Mandate Rule API

Welcome to the documentation for the Create Mandate Rule API. This API helps you create a new mandate rule.

Base URL

{baseURL}/v1/accounts/mandate-rules | POST

Authorization

Include the following Authorization header in your HTTP requests using a Bearer token:

Authorization: Bearer YOUR_ACCESS_TOKEN

Request Payload

FieldTypeSourceRequiredDescription
min_amountnumberbody✅ YesMinimum amount
max_amountnumberbody✅ YesMximum amount
role_idstringbody✅ YesRole ID
namestringbody✅ YesMandate rule title
minimum_no_of_authorization_requiredstringbody✅ YesMinimum number of authorization required

Sample Request

curl -X POST {baseURL}/v1/accounts/mandate-rules \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
   "min_amount": 10001,
    "max_amount": 200002,
    "role_id": "64f4b7b31dca9276ea1f786b",
    "name": "mandate rule 0",
    "minimum_no_of_authorization_required": "1"
  }'

Sample 201 Response

{
  "message": "Mandate rule created successfully",
  "data": [
    {
      "_id": "64e54a6e4548494e9fc1c6e9",
      "min_amount": 0,
      "max_amount": 100000,
      "role_id": "5f7f1f8f1c9d440000f3d8e6",
      "account_id": "64e54a6d4548494e9fc1c6e6",
      "name": "mandate rule 1",
      "createdAt": "2023-08-22T23:53:18.110Z",
      "updatedAt": "2023-08-22T23:53:18.110Z",
      "__v": 0,
      "minimum_no_of_authorization_required": 1,
      "mandate_id": "64e54a6e4548494e9fc1c6e9"
    }
  ],
  "success": true
}