---
# System prepended metadata

title: Regional API

---

# Regional API

## BASE URL: http://199.192.16.173:8000


## 1. Division

**(i) Create Division**

```json
Request Body:
POST {{BASE_URL}}/api/v1/pera/region-admin/division/

{
    "division_name": "চট্টগ্রাম"
}

Response:
Status Code: 201

{
    "id": 2,
    "created_at": "2022-08-17T11:52:04.920485+06:00",
    "updated_at": "2022-08-17T11:52:04.920500+06:00",
    "division_name": "চট্টগ্রাম",
    "status": "published"
}
```

**(ii) Get List Division**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/region-admin/division/

Response:
Status Code: 200

{
    "count": 9,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1,
            "division_name": "ঢাকা",
            "status": "published"
        },
        {
            "id": 2,
            "division_name": "চট্টগ্রাম",
            "status": "published"
        },
        {
            "id": 3,
            "division_name": "রাজশাহী",
            "status": "published"
        },
        {
            "id": 4,
            "division_name": "সিলেট",
            "status": "published"
        },
        {
            "id": 5,
            "division_name": "ময়মনসিংহ",
            "status": "published"
        },
        {
            "id": 6,
            "division_name": "বরিশাল",
            "status": "published"
        },
        {
            "id": 7,
            "division_name": "রংপুর",
            "status": "published"
        },
        {
            "id": 8,
            "division_name": "খুলনা",
            "status": "published"
        },
        {
            "id": 9,
            "division_name": "মেঘনা",
            "status": "published"
        }
    ]
}
```

**(iii) Get Detail Division**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/region-admin/division/<id>/

Response:
Status Code: 200

{
    "id": 9,
    "division_name": "মেঘনা"
}
```

**(iv) Update Division**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/region-admin/division/<id>/

{
    "status": "unpublished"
}

Response:
Status Code: 200

{
    "id": 9,
    "created_at": "2022-08-17T11:53:43.662079+06:00",
    "updated_at": "2022-08-17T11:59:10.465488+06:00",
    "division_name": "মেঘনা",
    "status": "unpublished"
}
```

**(v) Delete (Soft Delete) Division**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/region-admin/division/<id>/

{
    "status": "archived"
}

Response:
Status Code: 200

{
    "detail": "Not found."
}
```


## 2. District

**(i) Create District**

```json
Request Body:
POST {{BASE_URL}}/api/v1/pera/region-admin/district/

{
    "division": "1",
    "district_name": "নরসিংদী"
}

Response:
Status Code: 201

{
    "id": 2,
    "created_at": "2022-08-17T11:52:04.920485+06:00",
    "updated_at": "2022-08-17T11:52:04.920500+06:00",
    "division_name": "চট্টগ্রাম",
    "status": "published"
}
```

**(ii) Get List District**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/region-admin/district/

Response:
Status Code: 200

{
    "count": 13,
    "next": "http://127.0.0.1:8000/api/v1/pera/region-admin/district/?lim=10&offset=10",
    "previous": null,
    "results": [
        {
            "id": 1,
            "division": "ঢাকা",
            "district_name": "নরসিংদী",
            "status": "published"
        },
        {
            "id": 2,
            "division": "ঢাকা",
            "district_name": "গাজীপুর",
            "status": "published"
        },
        {
            "id": 3,
            "division": "ঢাকা",
            "district_name": "শরীয়তপুর",
            "status": "published"
        },
        {
            "id": 4,
            "division": "ঢাকা",
            "district_name": "নারায়ণগঞ্জ",
            "status": "published"
        },
        {
            "id": 5,
            "division": "ঢাকা",
            "district_name": "টাঙ্গাইল",
            "status": "published"
        },
        {
            "id": 6,
            "division": "ঢাকা",
            "district_name": "কিশোরগঞ্জ",
            "status": "published"
        },
        {
            "id": 7,
            "division": "ঢাকা",
            "district_name": "মানিকগঞ্জ",
            "status": "published"
        },
        {
            "id": 8,
            "division": "ঢাকা",
            "district_name": "ঢাকা",
            "status": "published"
        },
        {
            "id": 9,
            "division": "ঢাকা",
            "district_name": "মুন্সিগঞ্জ",
            "status": "published"
        },
        {
            "id": 10,
            "division": "ঢাকা",
            "district_name": "রাজবাড়ী",
            "status": "published"
        }
    ]
}
```

**(iii) Get Detail District**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/region-admin/district/<id>/

Response:
Status Code: 200

{
    "id": 13,
    "division": "ঢাকা",
    "district_name": "ফরিদপুর",
    "status": "published"
}
```

**(iv) Update District**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/region-admin/district/<id>/

{
    "status": "unpublished"
}

Response:
Status Code: 200

{
    "id": 13,
    "created_at": "2022-08-17T16:51:11.709908+06:00",
    "updated_at": "2022-08-17T16:57:33.714458+06:00",
    "district_name": "ফরিদপুর",
    "status": "unpublished",
    "division": 1
}
```

**(v) Delete (Soft Delete) District**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/region-admin/district/<id>/

{
    "status": "archived"
}

Response:
Status Code: 200

{
    "detail": "Not found."
}
```


## 3. Constituency

**(i) Create Constituency**

```json
Request Body:
POST {{BASE_URL}}/api/v1/pera/region-admin/constituency/

{
    "district": "41",
    "seat": "পঞ্চগড় - ১",
    "seat_no": "১"
}

Response:
Status Code: 201

{
    "id": 1,
    "created_at": "2022-08-17T17:22:43.846941+06:00",
    "updated_at": "2022-08-17T17:22:43.846955+06:00",
    "seat": "পঞ্চগড় - ১",
    "seat_no": 1,
    "status": "published",
    "district": 41
}
```

**(ii) Get List Constituency**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/region-admin/constituency/

Response:
Status Code: 200

{
    "count": 300,
    "next": "http://127.0.0.1:8000/api/v1/pera/region-admin/constituency/?lim=10&offset=10",
    "previous": null,
    "results": [
        {
            "id": 1,
            "district": "পঞ্চগড়",
            "seat": "পঞ্চগড় - ১",
            "seat_no": 1,
            "status": "published"
        },
        {
            "id": 2,
            "district": "পঞ্চগড়",
            "seat": "পঞ্চগড় - ২",
            "seat_no": 2,
            "status": "published"
        },
        {
            "id": 3,
            "district": "ঠাকুরগাঁও",
            "seat": "ঠাকুরগাঁও - ১",
            "seat_no": 3,
            "status": "published"
        },
        {
            "id": 4,
            "district": "ঠাকুরগাঁও",
            "seat": "ঠাকুরগাঁও - ২",
            "seat_no": 4,
            "status": "published"
        },
        {
            "id": 5,
            "district": "ঠাকুরগাঁও",
            "seat": "ঠাকুরগাঁও - ৩",
            "seat_no": 5,
            "status": "published"
        },
        {
            "id": 6,
            "district": "দিনাজপুর",
            "seat": "দিনাজপুর - ১",
            "seat_no": 6,
            "status": "published"
        },
        {
            "id": 7,
            "district": "দিনাজপুর",
            "seat": "দিনাজপুর - ২",
            "seat_no": 7,
            "status": "published"
        },
        {
            "id": 8,
            "district": "দিনাজপুর",
            "seat": "দিনাজপুর - ৩",
            "seat_no": 8,
            "status": "published"
        },
        {
            "id": 9,
            "district": "দিনাজপুর",
            "seat": "দিনাজপুর - ৪",
            "seat_no": 9,
            "status": "published"
        },
        {
            "id": 10,
            "district": "দিনাজপুর",
            "seat": "দিনাজপুর - ৫",
            "seat_no": 10,
            "status": "published"
        }
    ]
}
```

**(iii) Get Detail Constituency**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/region-admin/constituency/<id>/

Response:
Status Code: 200

{
    "id": 1,
    "district": 41,
    "seat": "পঞ্চগড় - ১",
    "seat_no": 1,
    "status": "published"
}
```

**(iv) Update Constituency**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/region-admin/constituency/<id>/

{
    "status": "unpublished"
}

Response:
Status Code: 200

{
    "id": 1,
    "created_at": "2022-08-17T17:22:43.846941+06:00",
    "updated_at": "2022-08-17T17:30:27.092771+06:00",
    "seat": "পঞ্চগড় - ১",
    "seat_no": 1,
    "status": "unpublished",
    "district": 41
}
```

**(v) Delete (Soft Delete) Constituency**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/region-admin/constituency/<id>/

{
    "status": "archived"
}

Response:
Status Code: 200

{
    "detail": "Not found."
}
```


## 4. Center

**(i) Create Center**

```json
Request Body:
POST {{BASE_URL}}/api/v1/pera/region-admin/center/

{
    "constituency": "33",
    "center": "কেতকির হাট সরকারি প্রাথমিক বিদ্যালয়-অবস্থান : কেতকিরহাট",
    "code": 3
}

Response:
Status Code: 201

{
    "id": 11,
    "created_at": "2022-08-22T12:04:49.043019+06:00",
    "updated_at": "2022-08-22T12:04:49.043033+06:00",
    "center": "কেতকির হাট সরকারি প্রাথমিক বিদ্যালয়-অবস্থান : কেতকিরহাট",
    "code": "3",
    "status": "published",
    "constituency": 33
}
```

**(ii) Get List Center**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/region-admin/center/

Response:
Status Code: 200

{
    "count": 11,
    "next": "http://127.0.0.1:8000/api/v1/pera/region-admin/center/?lim=10&offset=10",
    "previous": null,
    "results": [
        {
            "id": 1,
            "constituency": "গাইবান্ধা-১ - 29",
            "center": "জামালের হাট সরকারী প্রাথমিক বিদ্যালয়, জামাল",
            "code": "1",
            "status": "published"
        },
        {
            "id": 2,
            "constituency": "গাইবান্ধা-১ - 29",
            "center": "মধ্য হাতিবান্দা সরকারী প্রাথমিক বিদ্যালয়",
            "code": "2",
            "status": "published"
        },
        {
            "id": 3,
            "constituency": "গাইবান্ধা-২ - 30",
            "center": "উত্তরপাড়া ১নং সরকারী প্রাথমিক বিদ্যালয়,ডেভিড কোং পাড়া।",
            "code": "1",
            "status": "published"
        },
        {
            "id": 4,
            "constituency": "গাইবান্ধা-২ - 30",
            "center": "উত্তরপাড়া ২ নং সরকারী প্রাথমিক বিদ্যালয় ও লেবার অফিস, গোডাউন রোড,গাইবান্ধা।",
            "code": "2",
            "status": "published"
        },
        {
            "id": 5,
            "constituency": "গাইবান্ধা-৩ - 31",
            "center": "বড়দাউদপুর সরকারী প্রাথমিক বিদ্যালয়,বড়দাউদপুর",
            "code": "1",
            "status": "published"
        },
        {
            "id": 6,
            "constituency": "গাইবান্ধা-৩ - 31",
            "center": "তরফকামাল সরকারী প্রাথমিক বিদ্যালয়,তরফকামাল",
            "code": "2",
            "status": "published"
        },
        {
            "id": 7,
            "constituency": "গাইবান্ধা-৪ - 32",
            "center": "কামদিয়া সরকারী প্রাথমিক বিদ্যালয়, কামদিয়া। উভয়ের জন্য",
            "code": "1",
            "status": "published"
        },
        {
            "id": 8,
            "constituency": "গাইবান্ধা-৪ - 32",
            "center": "কোচমুড়ী সরকারী প্রাথমিক বিদ্যালয়, কোচমুড়ি। উভয়ের জন্য",
            "code": "2",
            "status": "published"
        },
        {
            "id": 9,
            "constituency": "গাইবান্ধা-৫ - 33",
            "center": "কঞ্চিপাড়া খবিরিয়া দাখিল মাদরাসা-কঞ্চিপাড়া",
            "code": "1",
            "status": "published"
        },
        {
            "id": 10,
            "constituency": "গাইবান্ধা-৫ - 33",
            "center": "কঞ্চিপাড়া ১নং সরকারী প্রাথমিক বিদ্যালয়-অবস্থান মধ্য কঞ্চিপাড়া",
            "code": "2",
            "status": "published"
        }
    ]
}
```

**(iii) Get Detail Center**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/region-admin/center/<id>/

Response:
Status Code: 200

{
    "id": 11,
    "constituency": "গাইবান্ধা-৫ - 33",
    "center": "কেতকির হাট সরকারি প্রাথমিক বিদ্যালয়-অবস্থান : কেতকিরহাট",
    "code": "3",
    "status": "published"
}
```

**(iv) Update Center**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/region-admin/center/<id>/

{
    "status": "unpublished"
}

Response:
Status Code: 200

{
    "id": 11,
    "created_at": "2022-08-22T12:04:49.043019+06:00",
    "updated_at": "2022-08-22T12:20:57.358598+06:00",
    "center": "কেতকির হাট সরকারি প্রাথমিক বিদ্যালয়-অবস্থান : কেতকিরহাট",
    "code": "3",
    "status": "unpublished",
    "constituency": 33
}
```

**(v) Delete (Soft Delete) Center**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/region-admin/center/<id>/

{
    "status": "archived"
}

Response:
Status Code: 200

{
    "detail": "Not found."
}
```
