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.
Query Parameters
Zero-based page index
0int32Number of records per page
10int32Header Parameters
Tenant identifier. Required for every request.
Request Body
application/json
Unique identifier of the Corporate or Program entity whose addresses are being fetched.
1 <= lengthOptional filter to retrieve only addresses of this type.
"BILLING_ADDRESS" | "BRANCH_ADDRESS" | "REGISTERED_ADDRESS"Optional filter to retrieve addresses associated with a specific branch.
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
}Add or update a Corporate/Program address POST
Creates a new address record or updates an existing one for the given `entityId`. Providing `branchId` links the address to a specific branch. Set `isDefault: true` to mark the primary address for an entity. Multiple addresses of different `addressType` can exist for the same `entityId`.
Search addresses by field and value POST
Partial-match search within address records of a specific entity. Provide the address `field` name to search on and a `value` for case-insensitive partial matching. All three fields (`entityId`, `field`, `value`) are required.
