> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-branch-info.md).

# Get Branch Info

Returns the details of one or more of your **branches** (stores, warehouses, offices) by branch code: name, short name, address, contact details, GST details and branch groups. Use it to set up or refresh the branch list in your system, or to print a branch's address and GSTIN on your own documents.

### **Endpoint**

| Name          | Detail                                  |
| ------------- | --------------------------------------- |
| Address       | `https://your-server/api/GetBranchInfo` |
| Method        | `POST`                                  |
| Authorization | Basic Auth                              |

The response and the common request fields are explained in [How Every API Call Works](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/how-every-api-call-works.md).

This endpoint **does not use the change log**: `GlobalModifyCode`, `DateFrom`, `DateTo`, `Doc_Codes`, `Branch_Codes_From` and `Doc_Num_Like` are not read. Every call returns the branches you ask for as they are now, and `LastGlobalModifyCode` is always `0`.

### **Request fields**

| Field        | Type | Required | Default | Meaning                                                                                                                                                                                                         |
| ------------ | ---- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `BranchCode` | text | Yes      | —       | Logic ERP branch codes, separated by commas, for example `"2"` or `"2,5,7"`. Numbers only — there is no "all branches" value. Code `0` returns Logic ERP's placeholder branch named `(NIL)`; do not ask for it. |

### **Rules Logic ERP applies**

* Only **active** branches are returned. A branch marked inactive in Logic ERP is left out, even if you ask for it by code. A branch that is only blocked for login is still returned.
* If some of the codes you send are found and others are not, you get the ones that were found and `Status: true`. Compare the codes in `GetData` with what you asked for.
* If none of the codes is found (or all are inactive), the call fails with `Status: false`.
* The order of the branches in `GetData` is not guaranteed. Match them on `Branch_Code`.
* `Branch_Creation_Date` and `Branch_GST_Date` come as text in the **short date format of the Logic ERP server**, for example `31/01/2026` or `31/01/26`, so read both a four-digit and a two-digit year. A time is added if one was stored with the date. They are empty when no date is entered.
* A branch group level that is not used is shown as `(NIL)`.
* On success `Message` is `"Success"`.
* A branch that is linked to a branch group which no longer exists in Logic ERP is still returned; that group level comes back empty (`""`).

### **Example request**

```json
{
  "BranchCode": "2,5"
}
```

### **Test it**

Send a request to the Logic ERP **sandbox** (a test company) from this page: open the block below, enter the sandbox user name and password (ask your Logic ERP support team), change `BranchCode` if you like, and press **Test it**. The answer shows exactly what your own API site returns, with the sandbox's data.

## Get Branch Info

> Returns the details of one or more of your branches (stores, warehouses, offices) by branch code: name, short name, address, contact details, GST details and branch groups. Use it to set up or refresh the branch list in your system, or to print a branch's address and GSTIN on your own documents.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Masters - Pull"}],"servers":[{"url":"https://demo.logicerp.com/api","description":"Logic ERP sandbox (test company)"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"The user name and password of your API site."}}},"paths":{"/GetBranchInfo":{"post":{"tags":["Masters - Pull"],"operationId":"GetBranchInfo","summary":"Get Branch Info","description":"Returns the details of one or more of your branches (stores, warehouses, offices) by branch code: name, short name, address, contact details, GST details and branch groups. Use it to set up or refresh the branch list in your system, or to print a branch's address and GSTIN on your own documents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"BranchCode":{"type":"string","description":"Logic ERP branch codes, separated by commas, for example `\"2\"` or `\"2,5,7\"`. Numbers only — there is no \"all branches\" value. Code `0` returns Logic ERP's placeholder branch named `(NIL)`; do not ask for it."}},"required":["BranchCode"]}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status, Message and GetData.","content":{"application/json":{"schema":{"type":"object","properties":{"GetData":{"type":"array","items":{"type":"object","properties":{"Branch_Code":{"type":"integer","description":"Logic ERP's branch code."},"Branch_Name":{"type":"string","description":"Branch name."},"Branch_Short_Name":{"type":"string","description":"Short name of the branch, used by many Push endpoints to name the branch."},"Address_1":{"type":"string","description":"Address lines."},"Address_2":{"type":"string","description":"Address lines."},"Address_3":{"type":"string","description":"Address lines."},"Branch_City_Name":{"type":"string","description":"City."},"Branch_PIN_Code":{"type":"string","description":"PIN code."},"Branch_Creation_Date":{"type":"string","description":"When the branch was opened in Logic ERP (see the date rule above); empty if not entered."},"Branch_EMail":{"type":"string","description":"Branch e-mail address."},"Branch_GST_No":{"type":"string","description":"GSTIN of the branch."},"Branch_GST_Date":{"type":"string","description":"GST registration date (see the date rule above); empty if not entered."},"Branch_GST_State_Code":{"type":"string","description":"GST state code of the branch."},"Branch_Extra_1":{"type":"string","description":"Two free fields your company can use for its own branch information."},"Branch_Extra_2":{"type":"string","description":"Two free fields your company can use for its own branch information."},"Branch_Contact_Person":{"type":"string","description":"Contact person at the branch."},"Branch_State_Name":{"type":"string","description":"State."},"Branch_Telephone_Off":{"type":"string","description":"Office and residence telephone numbers."},"Branch_Telephone_Res":{"type":"string","description":"Office and residence telephone numbers."},"Branch_Group_Name_1":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_2":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_3":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_4":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_5":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_6":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_7":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_8":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_9":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_10":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_11":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_12":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_13":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_14":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Branch_Group_Name_15":{"type":"string","description":"The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used."},"Area_SqFT":{"type":"string","description":"Floor area of the branch in square feet, as a number in text (for example `\"2400\"`); `\"0\"` when not entered."}}},"nullable":true,"description":"The records found; null when the call failed or nothing was found - read Message."},"Status":{"type":"boolean","description":"See the Status rules on this page and on How Every API Call Works."},"Message":{"type":"string","description":"Why the call failed, or a note. The reason may be followed by technical detail - read the first line."},"LastGlobalModifyCode":{"type":"integer","description":"The change-log bookmark (see How Every API Call Works)."},"resultSize":{"type":"string","description":"Size of the answer, for example \"2 KB\"."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response fields**

Each item in `GetData`:

| Field                                          | Type   | Meaning                                                                                                                          |
| ---------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `Branch_Code`                                  | number | Logic ERP's branch code.                                                                                                         |
| `Branch_Name`                                  | text   | Branch name.                                                                                                                     |
| `Branch_Short_Name`                            | text   | Short name of the branch, used by many Push endpoints to name the branch.                                                        |
| `Address_1`, `Address_2`, `Address_3`          | text   | Address lines.                                                                                                                   |
| `Branch_City_Name`                             | text   | City.                                                                                                                            |
| `Branch_PIN_Code`                              | text   | PIN code.                                                                                                                        |
| `Branch_Creation_Date`                         | text   | When the branch was opened in Logic ERP (see the date rule above); empty if not entered.                                         |
| `Branch_EMail`                                 | text   | Branch e-mail address.                                                                                                           |
| `Branch_GST_No`                                | text   | GSTIN of the branch.                                                                                                             |
| `Branch_GST_Date`                              | text   | GST registration date (see the date rule above); empty if not entered.                                                           |
| `Branch_GST_State_Code`                        | text   | GST state code of the branch.                                                                                                    |
| `Branch_Extra_1`, `Branch_Extra_2`             | text   | Two free fields your company can use for its own branch information.                                                             |
| `Branch_Contact_Person`                        | text   | Contact person at the branch.                                                                                                    |
| `Branch_State_Name`                            | text   | State.                                                                                                                           |
| `Branch_Telephone_Off`, `Branch_Telephone_Res` | text   | Office and residence telephone numbers.                                                                                          |
| `Branch_Group_Name_1` … `Branch_Group_Name_15` | text   | The branch groups (for example zone, region, format) the branch belongs to, at levels 1 to 15; `(NIL)` when a level is not used. |
| `Area_SqFT`                                    | text   | Floor area of the branch in square feet, as a number in text (for example `"2400"`); `"0"` when not entered.                     |

### **Example response**

```json
{
  "GetData": [
    {
      "Branch_Code": 2,
      "Branch_Name": "LUDHIANA MAIN",
      "Branch_Short_Name": "LDH",
      "Address_1": "SCO 21, Feroze Gandhi Market",
      "Address_2": "Pakhowal Road",
      "Address_3": "",
      "Branch_City_Name": "LUDHIANA",
      "Branch_PIN_Code": "141001",
      "Branch_Creation_Date": "01/04/15",
      "Branch_EMail": "ldh@example.in",
      "Branch_GST_No": "03AAACL1234K1Z2",
      "Branch_GST_Date": "01/07/17",
      "Branch_GST_State_Code": "03",
      "Branch_Extra_1": "",
      "Branch_Extra_2": "",
      "Branch_Contact_Person": "Amit Sharma",
      "Branch_State_Name": "PUNJAB",
      "Branch_Telephone_Off": "0161-2456789",
      "Branch_Telephone_Res": "",
      "Branch_Group_Name_1": "NORTH ZONE",
      "Branch_Group_Name_2": "COMPANY OWNED",
      "Branch_Group_Name_3": "(NIL)",
      "Branch_Group_Name_4": "(NIL)",
      "Branch_Group_Name_5": "(NIL)",
      "Branch_Group_Name_6": "(NIL)",
      "Branch_Group_Name_7": "(NIL)",
      "Branch_Group_Name_8": "(NIL)",
      "Branch_Group_Name_9": "(NIL)",
      "Branch_Group_Name_10": "(NIL)",
      "Branch_Group_Name_11": "(NIL)",
      "Branch_Group_Name_12": "(NIL)",
      "Branch_Group_Name_13": "(NIL)",
      "Branch_Group_Name_14": "(NIL)",
      "Branch_Group_Name_15": "(NIL)",
      "Area_SqFT": "2400"
    }
  ],
  "Status": true,
  "Message": "Success",
  "LastGlobalModifyCode": 0,
  "resultSize": "2 KB"
}
```

### **Messages you may see**

| Message                                                                                                              | Meaning                                                         | What to do                                                            |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------- |
| *Invalid Branch Code..* (with `Status: false`)                                                                       | `BranchCode` was missing or empty.                              | Send at least one branch code.                                        |
| *Unable to found Branch Code : …* (the codes you sent in place of …, with `Status: false`)                           | None of the codes you sent is an active branch.                 | Check the codes with your Logic ERP team; the branch may be inactive. |
| `Invalid code in list: '…'. Only numeric codes are allowed.` (with `Status: false`), where `…` is the value you sent | `BranchCode` contained something other than numbers and commas. | Send numbers separated by commas only.                                |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-branch-info.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
