m2pfintech
API LibraryBranch Address Management

Add or update a Corporate/Program address

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.

POST
/business/address/addOrUpdate

Header Parameters

TENANT*string

Tenant identifier. Required for every request.

Request Body

application/json

entityId?string

Unique identifier of the Corporate or Program entity for which addresses are being added or updated.

Length1 <= length
address?

List of one or more address records to create or update for the entity.

Items1 <= items

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.m2pfintech.com/credit-customer/business/address/addOrUpdate" \  -H "TENANT: string" \  -H "Content-Type: application/json" \  -d '{    "entityId": "CORP001",    "address": [      {        "addressType": "BRANCH_ADDRESS",        "branchId": "BR001",        "branchName": "Mumbai HQ",        "addressLine1": "10 Business Park",        "city": "Mumbai",        "state": "Maharashtra",        "country": "INDIA",        "pinCode": "400001",        "contactEmail": "branch@acme.com",        "status": "ACTIVE",        "isDefault": true      }    ]  }'
{
  "result": {
    "status": "SUCCESS",
    "addressList": []
  },
  "exception": null,
  "pagination": null
}
{
  "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_404",
    "shortMessage": "Not Found",
    "detailMessage": "No entity found for the provided entityId."
  },
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "ERR_500",
    "shortMessage": "Internal Server Error",
    "detailMessage": "An unexpected error occurred. Please try again later."
  },
  "pagination": null
}