Boundary

Overview

The Boundary V2 separates location boundaries into distinct hierarchies in the Citizen Complaints Resolution System on DIGIT.

Boundary Type
Description

REVENUE-LOCALITY

Urban boundary data (Cities, ULBs)

This helps the system route complaints more accurately based on whether they belong to urban or rural areas.

Services Required

To use Boundary V2 in your environment, the following DIGIT microservices must be deployed and running:

Service Name
Purpose

boundary-bulk-bff

Handles bulk upload of boundaries

boundary-service-db

Stores and manages boundary data

Release Update Highlights

  • Location boundaries are now handled via two separate hierarchies.

  • Enables better service routing and area-specific workflows.

  • Supports bulk creation and Excel-based uploads for managing boundaries easily.

Pre-requisites

Before starting, make sure the following are ready:

  • Postman is installed

  • ✅ Your DIGIT app base URL (e.g., https://dev.digit.org)

  • AuthToken of a superuser (from installation)

  • ✅ The target tenantId where the boundary is to be set (e.g., pg.citya)


Configure Boundary

1

Import Postman Collection

  • Copy the provided Postman collection URL.

  • Open Postman.

  • Click the Import icon.

  • Paste the URL and click ContinueImport.

  • The collection will now appear on the left side in Postman.

Before running any APIs, update your Postman environment with:

  • baseUrl = your DIGIT app domain (e.g., https://dev.digit.org)

  • authToken = superuser token

  • tenantId = state + city ULB (e.g., pg.citya)

2

Create a Hierarchy Type

API: POST /boundary-service/boundary-hierarchy-definition/_create

  • This defines the type of boundary you’re setting up.

  • Common types: ADMIN, REVENUE, etc.

Example: To set up localities, use hierarchyType = ADMIN.

3

Generate Excel Template

API: GET /boundary-bulk-bff/v1/boundary/generate?tenantId=as&hierarchyType=TestNew4

  • This will generate a boundary upload Excel template specific to the chosen hierarchy.

  • It will return a fileStoreId in the response.

4

Download the Template

API: GET /filestore/v1/files/url?tenantId=as&fileStoreIds=<fileStoreId>

Replace <fileStoreId> with the value from Step 2.

  • The response contains a file URL — open it to download the Excel file.

  • Example Files: locality.xlsx – for urban boundaries

5

Fill in Boundary Details

Open the downloaded Excel file and fill in boundary data, such as:

  • Region name

  • Boundary code

  • Parent-child relationships

  • Latitude/Longitude (if applicable)

  • Boundary type (Ward, Locality, Village, etc.)

Important: Ensure no formatting is changed. Stick to the given format.

6

Upload the filled Excel file

API: POST /filestore/v1/files

  • Upload the updated Excel file.

  • This will return a new fileStoreId that contains your boundary data.

7

Create Boundaries in the System

API: POST /boundary-bulk-bff/v1/boundary/createw4

  • Use the new fileStoreId from Step 5 to trigger boundary creation in the system.

  • This API reads the file and creates the location hierarchy in the backend database.

The system will now save the boundary data into the backend database.


Sample Reference Files

(Provide internal links or shareable URLs if hosting these templates in your internal system.)


Summary

Step
Task
API/Tool Used

1

Create boundary hierarchy

/boundary-service/boundary-hierarchy-definition/_create

2

Generate Excel template

/boundary-bulk-bff/v1/boundary/generate

3

Download the template

/filestore/v1/files/url

4

Fill Excel with boundary data

Use Excel locally

5

Upload filled file

/filestore/v1/files

6

Create boundaries from the file

/boundary-bulk-bff/v1/boundary/createw4


Tips

  • Always use the correct tenantId (e.g., pb, uk, as) across all requests.

  • Don’t modify the template structure when filling in the Excel.

  • If the hierarchy already exists, you can skip Step 1.

  • If you encounter errors during boundary creation, check:

    • Hierarchy names are consistent

    • Excel fields are not empty

    • Uploaded Excel matches template format

Last updated

Was this helpful?