> For the complete documentation index, see [llms.txt](https://spice.docs.medtroniclabs.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spice.docs.medtroniclabs.org/engineering/api-documentation/admin-services/region/region-upload.md).

# Region Upload

| **API URL**     | {{url}}/admin-service/region-details/upload-file          |
| --------------- | --------------------------------------------------------- |
| **Method**      | POST                                                      |
| **Description** | Upload the region data file with all the required fields. |

#### **Sample Input** <a href="#fileuploda-v2-sampleinput" id="fileuploda-v2-sampleinput"></a>

| **Field Name**         | **Type** | **Mandatory** | **Example**                                                                                                                             |
| ---------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| file                   | Binary   | Yes           | Sample data input file                                                                                                                  |
| appTypes               | String   | Yes           | COMMUNITY                                                                                                                               |
| Authorization (Header) | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client                 | String   | Yes           | web                                                                                                                                     |

Sample Input data file with all the required fields

E.g Below the sample file, **Sierra Leone.xlsx**

| **country**  | **country code** | **district** | **district code** | **chiefdom** | **chiefdom code** | **village** | **village code** | **village type** |
| ------------ | ---------------- | ------------ | ----------------- | ------------ | ----------------- | ----------- | ---------------- | ---------------- |
| Sierra Leone | 1                | Chennai      | 111               | Guindy       | 222               | Water Works | 333              | HTR              |

#### **Sample Output** <a href="#fileuploda-v2-sampleoutput" id="fileuploda-v2-sampleoutput"></a>

| **Field Name** | **Type** | **Comments**                        |
| -------------- | -------- | ----------------------------------- |
| message        | String   | The file was uploaded successfully. |
| status         | String   | File upload status                  |

```
{
    "message": "File uploaded successfully.",
    "entity": null,
    "status": true,
    "entityList": null,
    "responseCode": 200,
    "totalCount": null
}
```
