---
title: Upload branch List
slug: api-marketplace/upload-branch-list
createdAt: 2025-01-17T07:58:06.350Z
---

## Introduction

Efficient lead allocation is critical for banks to streamline their operations and enhance customer experience. The following APIs are designed to solve lead allocation challenges by leveraging branch geolocation data and customer geocodes. These APIs enable banks to quickly upload branch information and determine the nearest branch for any given customer geocode, ensuring leads are directed to the most appropriate branch for prompt and effective service.

This API allows banks to upload a comprehensive list of their branches along with geolocation details (latitude and longitude). By storing precise geolocation data, the API sets the foundation for accurately matching customers to the nearest branch.
**Key Features:**
&#x20;1\. Bulk upload of branch information (branch ID, name, address, geolocation).
&#x20;2\. Seamless integration with internal systems.
&#x20;3\. Robust data validation to ensure accuracy and consistency.

***

## API details

### Endpoint

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/branch-list/upload
```
:::

:::CodeblockTabs
UAT Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/branch-list/upload
```
:::

***

### Request body parameters

| **Parameter** | **Data Type** | **Description**                          | **Required** |
| ------------- | ------------- | ---------------------------------------- | ------------ |
| fileUrl       | Object        | Persist url of branch list in csv format | Mandatory    |

### Request body

```json
{
    "fileUrl": "https://persist.signzy.tech/api/files/1111895731/download/05514680d4494a4586cfe432baa8b1835c51734d2fac48e491f5a9be87e9dae2.csv"
}
```

***

### Request Headers

| **Name&#x20;** | **Value**        | **Required** | **Description**                                                                                            |
| -------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-type   | application/json | Mandatory    | The type of content that the request body contains.                                                        |
| Authorization  | XXXXXXXXXXXXXXX  | Mandatory    | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Code Samples

:::CodeblockTabs
Curl

```json
curl --location 'https://api-preproduction.signzy.app/api/v3/branch-list/upload' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth token>' \
--data '{
    "fileUrl": "https://persist.signzy.tech/api/files/1111895731/download/05514680d4494a4586cfe432baa8b1835c51734d2fac48e491f5a9be87e9dae2.csv"
}'
```

Node.js

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "fileUrl": "https://persist.signzy.tech/api/files/1111895731/download/05514680d4494a4586cfe432baa8b1835c51734d2fac48e491f5a9be87e9dae2.csv"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/branch-list/upload',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<auth token>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

Python

```python
import requests
import json

url = "https://api-preproduction.signzy.app/api/v3/branch-list/upload"

payload = json.dumps({
  "fileUrl": "https://persist.signzy.tech/api/files/1111895731/download/05514680d4494a4586cfe432baa8b1835c51734d2fac48e491f5a9be87e9dae2.csv"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<auth token>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

GO

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/branch-list/upload"
  method := "POST"

  payload := strings.NewReader(`{
    "fileUrl": "https://persist.signzy.tech/api/files/1111895731/download/05514680d4494a4586cfe432baa8b1835c51734d2fac48e491f5a9be87e9dae2.csv"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<auth token>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| **Parameter**  | **Data Type** | **Description**                                         |
| -------------- | ------------- | ------------------------------------------------------- |
| result         | Object        | The root object containing the result of the operation. |
| result.fileId  | String        | fileId is the id which passed in next flow              |
| result.message |               | Success message of upload branch list                   |

:::CodeblockTabs
200

```json
{
    "result": {
        "fileId": "992fdc40416645b7987432f6370508f7",
        "message": "File uploaded successfully"
    }
}
```

400

```json
{
    "error": {
        "name": "error",
        "message": "fileUrl is not allowed to be empty",
        "status": 400,
        "reason": "VALIDATION_ERROR",
        "type": "Bad Request",
        "statusCode": 400
    }
}
```

401

```json
// If Authorization token is not passed
{
    "message": "No API key found in request"
}

// If Authorization token is invalid
{
    "message": "Invalid authentication credentials"
}
```

404

```json
{
    "error": {
        "statusCode": 404,
        "name": "Error",
        "message": "No Result found",
        "status": 404
    }
}
```

409

```json
{
    "error": {
        "name": "error",
        "message": "Upstream Down",
        "status": 409,
        "statusCode": 409
    }
}
```
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!
