m2pfintech
API LibraryBranch Management

Update Branch

Updates an existing branch record with the provided details. Only the branchId is mandatory to identify which branch to update. All other fields are optional and will be updated only if provided in the request body. The changer field can be used to record who performed the update for audit purposes.

PUT
/branch

Authorization

tenantAuth
tenant<token>

The DCMS tenant name for multi-tenant isolation. Every API call must include this header to identify the client organization.

In: header

Header Parameters

tenant*string

The DCMS client or tenant name for multi-tenant isolation.

Request Body

application/json

branchId*string

Unique identifier of the branch to update. This field is mandatory and used to locate the branch record.

branchCode?string

Unique code assigned to the branch for identification purposes across systems.

branchName?string

Human-readable display name of the branch.

address?string

Primary street address of the branch location.

address2?string

Secondary address line such as landmark or building name.

address3?string

Tertiary address line such as area or locality name.

city?string

City where the branch is located.

state?string

State or province where the branch is located.

country?string

Country where the branch is located.

district?string

District within the state where the branch is located.

zipCode?string

Postal or ZIP code of the branch location.

branchPhoneNumber?string

Contact phone number of the branch including country code.

branchEmailId?string

Contact email address of the branch for correspondence.

Formatemail
changer?string

Identifier of the user or system making the change, used for audit trail.

pocDetails?

List of point of contact details for the branch. Each entry represents a contact person with their role and escalation level.

Response Body

application/json

application/json

application/json

curl -X PUT "https://api.dcms.example.com/v1/branch" \  -H "tenant: ACME_BANK" \  -H "Content-Type: application/json" \  -d '{    "branchId": "789001",    "branchCode": "BR001",    "branchName": "Main Branch",    "address": "123 Main Street",    "address2": "Near City Center",    "address3": "MG Road",    "city": "Bangalore",    "state": "Karnataka",    "country": "India",    "district": "Bangalore Urban",    "zipCode": "560001",    "branchPhoneNumber": "+919876543210",    "branchEmailId": "mainbranch@example.com",    "changer": "ADMIN001",    "pocDetails": [      {        "pocName": "John Doe",        "pocRole": "Branch Manager",        "pocEmailId": "john.doe@example.com",        "pocLevel": "L1"      },      {        "pocName": "Jane Smith",        "pocRole": "Operations Manager",        "pocEmailId": "jane.smith@example.com",        "pocLevel": "L2"      }    ]  }'
{
  "result": true,
  "exception": null,
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "BR001",
    "shortMessage": "Branch not found",
    "detailMessage": "No branch exists with the given branchId",
    "httpStatus": "BAD_REQUEST",
    "fieldError": [
      "Invalid branchId"
    ],
    "languageCode": "en",
    "cause": null,
    "localizedMessage": null,
    "message": null,
    "suppressed": []
  },
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "SYS001",
    "shortMessage": "Internal server error",
    "detailMessage": "An unexpected error occurred while updating the branch",
    "httpStatus": "INTERNAL_SERVER_ERROR",
    "fieldError": [],
    "languageCode": "en"
  },
  "pagination": null
}