m2pfintech
API LibraryBranch Management

Create Branch

Creates a new branch with the provided details. Most fields are required to ensure complete branch information is captured including address, contact details, and point of contact information. The branchId must be unique across the tenant. The creator field can be used to record who created the branch for audit purposes.

POST
/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 for the new branch. Must not already exist in the system.

branchCode*string

Unique code assigned to the branch for cross-system identification.

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. Optional but recommended.

Formatemail
creator?string

Identifier of the user or system creating the branch, used for audit trail.

pocDetails*

List of point of contact details for the branch. At least one contact is recommended.

Response Body

application/json

application/json

application/json

curl -X POST "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",    "creator": "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": "BR004",
    "shortMessage": "Invalid request",
    "detailMessage": "Required fields are missing in the request body",
    "httpStatus": "BAD_REQUEST",
    "fieldError": [
      "branchName is required",
      "address is required"
    ],
    "languageCode": "en"
  },
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "BR002",
    "shortMessage": "Branch already exists",
    "detailMessage": "A branch with the given branchId already exists",
    "httpStatus": "CONFLICT",
    "fieldError": [
      "Duplicate branchId"
    ],
    "languageCode": "en"
  },
  "pagination": null
}