m2pfintech
API LibraryBranch Address Management

Fetch addresses of a Corporate/Program entity

Returns a paginated list of addresses for the given entityId. Optionally filter by addressType or branchId to narrow results. An empty addressList in the response means no addresses matched the filter.

POST
/business/address/fetch

Query Parameters

pageNumber?integer

Zero-based page index

Default0
Formatint32
pageSize?integer

Number of records per page

Default10
Formatint32

Header Parameters

TENANT*string

Tenant identifier. Required for every request.

Request Body

application/json

entityId?string

Unique identifier of the Corporate or Program entity whose addresses are being fetched.

Length1 <= length
addressType?string

Optional filter to retrieve only addresses of this type.

Value in"BILLING_ADDRESS" | "BRANCH_ADDRESS" | "REGISTERED_ADDRESS"
branchId?string

Optional filter to retrieve addresses associated with a specific branch.

isDefault?boolean

When true, returns only the default address; when false, returns non-default addresses.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.m2pfintech.com/credit-customer/business/address/fetch" \  -H "TENANT: string" \  -H "Content-Type: application/json" \  -d '{    "entityId": "CORP001",    "addressType": "BRANCH_ADDRESS",    "isDefault": true  }'
{
  "result": [
    {
      "addressList": [
        {
          "addressType": "BRANCH_ADDRESS",
          "branchId": "BR001",
          "branchName": "Mumbai HQ",
          "city": "Mumbai",
          "state": "Maharashtra",
          "country": "INDIA",
          "isDefault": true,
          "status": "ACTIVE"
        }
      ]
    }
  ],
  "exception": null,
  "pagination": {
    "pageNumber": 0,
    "pageSize": 10,
    "totalElements": 1,
    "totalPages": 1
  }
}
{
  "result": null,
  "exception": {
    "errorCode": "ERR_400",
    "shortMessage": "Bad Request",
    "detailMessage": "Validation error — check field values and enum constraints."
  },
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "ERR_500",
    "shortMessage": "Internal Server Error",
    "detailMessage": "An unexpected error occurred. Please try again later."
  },
  "pagination": null
}