---
# System prepended metadata

title: Constituency API for Operator

---

# Constituency API for Operator


## BASE URL: http://199.192.16.173:8181


## 1. Previous Election Result

**(i) Previous Election Result Create API**

```json
Request Body:
POST {{BASE_URL}}/api/v1/constituency/operator/previous-election/

{
    "constituency": "266",
    "election": "১৯৯৬ (১২ জুন) - সপ্তম",
    "total_vote": "85",
    "casted_vote": "562154",
    "other": "",
    "candidates": [
        {
            "party": "6",
            "candidate_name": "প্রার্থীর নাম",
            "gained_vote": "5456",
            "gained_vote_percentage": "33.8",
            "party_candidate_or_opposite": "দলীয়",
            "is_successor": "বিজয়ী"
        },
        {
            "party": "7",
            "candidate_name": "প্রার্থীর নাম 2",
            "gained_vote": "2414",
            "gained_vote_percentage": "26.7",
            "party_candidate_or_opposite": "দলীয়",
            "is_successor": "নিকটতম প্রতিদ্বন্দ্বী"
        }
    ]
}

Response:
Status Code: 201

{
    "success": true,
    "message": "Created",
    "data": {
        "id": 14,
        "uid": "8aced4b8-5cd9-44f6-8599-ca210b98b3af",
        "election": "১৯৯৬ (১২ জুন) - সপ্তম",
        "total_vote": "85.00",
        "casted_vote": 562154,
        "other": "",
        "status": "published",
        "constituency": 266
    }
}
```


**(ii) Previous Election Result List API**

```json
Request Body:
GET {{BASE_URL}}/api/v1/constituency/operator/previous-election/


Response:
Status Code: 200

{
    "success": true,
    "message": "Status OK",
    "data": {
        "count": 5,
        "next": null,
        "previous": null,
        "results": [
            {
                "uid": "8aced4b8-5cd9-44f6-8599-ca210b98b3af",
                "constituency": "লক্ষ্মীপুর-৪ (২৭৭)",
                "election": "১৯৯৬ (১২ জুন) - সপ্তম",
                "total_vote": "85.00",
                "casted_vote": 562154,
                "other": "",
                "previous_candidate": [
                    {
                        "uid": "4f9be8d3-fdd1-48ff-ad24-9e6c9d433b05",
                        "previous_election": "১৯৯৬ (১২ জুন) - সপ্তম",
                        "party": "বাংলাদেশ আওয়ামী লীগ",
                        "candidate_name": "প্রার্থীর নাম",
                        "gained_vote": 5456,
                        "gained_vote_percentage": "33.80",
                        "party_candidate_or_opposite": "দলীয়",
                        "is_successor": "বিজয়ী",
                        "status": "published"
                    },
                    {
                        "uid": "89ff2102-a997-4b8e-9d5d-45778c3b646b",
                        "previous_election": "১৯৯৬ (১২ জুন) - সপ্তম",
                        "party": "বাংলাদেশ জাতীয়তাবাদী দল - বি.এন.পি",
                        "candidate_name": "প্রার্থীর নাম 2",
                        "gained_vote": 2414,
                        "gained_vote_percentage": "26.70",
                        "party_candidate_or_opposite": "দলীয়",
                        "is_successor": "নিকটতম প্রতিদ্বন্দ্বী",
                        "status": "published"
                    }
                ],
                "status": "published"
            },
            {
                "uid": "1991700f-4773-44f2-b1e3-8e8118439c37",
                "constituency": "লক্ষ্মীপুর-৪ (২৭৭)",
                "election": "২০০১ (১লা অক্টোবর) - অষ্টম",
                "total_vote": "53.80",
                "casted_vote": 128983,
                "other": "",
                "previous_candidate": [
                    {
                        "uid": "3977b3c9-d5f7-4063-9de4-43a615c3aec4",
                        "previous_election": "২০০১ (১লা অক্টোবর) - অষ্টম",
                        "party": "জাতীয় সমাজতান্ত্রিক দল-জাসদ",
                        "candidate_name": "জনাব আ স ম আবদুর রব",
                        "gained_vote": 43453,
                        "gained_vote_percentage": "33.70",
                        "party_candidate_or_opposite": "দলীয়",
                        "is_successor": "নিকটতম প্রতিদ্বন্দ্বী",
                        "status": "published"
                    },
                    {
                        "uid": "3977b3c9-d5f7-4063-9de4-43a615c3aec5",
                        "previous_election": "২০০১ (১লা অক্টোবর) - অষ্টম",
                        "party": "বাংলাদেশ জাতীয়তাবাদী দল - বি.এন.পি",
                        "candidate_name": "জনাব এ বি এম আশরাফ উদ্দিন",
                        "gained_vote": 45977,
                        "gained_vote_percentage": "35.60",
                        "party_candidate_or_opposite": "দলীয়",
                        "is_successor": "বিজয়ী",
                        "status": "published"
                    }
                ],
                "status": "published"
            },
            {
                "uid": "7b4c90e9-dc87-4e49-a9a5-274369044022",
                "constituency": "লক্ষ্মীপুর-৪ (২৭৭)",
                "election": "২০০৮ (২৯ ডিসেম্বর) - নবম",
                "total_vote": "77.40",
                "casted_vote": 178767,
                "other": "",
                "previous_candidate": [
                    {
                        "uid": "660bbd07-ebd7-4446-b975-11e397b0601c",
                        "previous_election": "২০০৮ (২৯ ডিসেম্বর) - নবম",
                        "party": "বাংলাদেশ আওয়ামী লীগ",
                        "candidate_name": "জনাব আব্দুর রব চৌধুরী",
                        "gained_vote": 58427,
                        "gained_vote_percentage": "32.70",
                        "party_candidate_or_opposite": "দলীয়",
                        "is_successor": "নিকটতম প্রতিদ্বন্দ্বী",
                        "status": "published"
                    },
                    {
                        "uid": "660bbd07-ebd7-4446-b975-11e397b0601b",
                        "previous_election": "২০০৮ (২৯ ডিসেম্বর) - নবম",
                        "party": "বাংলাদেশ জাতীয়তাবাদী দল - বি.এন.পি",
                        "candidate_name": "জনাব এ বি এম আশরাফ উদ্দিন",
                        "gained_vote": 68549,
                        "gained_vote_percentage": "38.30",
                        "party_candidate_or_opposite": "দলীয়",
                        "is_successor": "বিজয়ী",
                        "status": "published"
                    }
                ],
                "status": "published"
            }
        ]
    }
}
```


**(iii) Previous Election Result Retrieve API**

```json
Request Body:
GET {{BASE_URL}}/api/v1/constituency/operator/previous-election/<uid>/


Response:
Status Code: 200

{
    "success": true,
    "message": "Status OK",
    "data": {
        "uid": "8aced4b8-5cd9-44f6-8599-ca210b98b3af",
        "constituency": "লক্ষ্মীপুর-৪ (২৭৭)",
        "election": "১৯৯৬ (১২ জুন) - সপ্তম",
        "total_vote": "85.00",
        "casted_vote": 562154,
        "other": "",
        "previous_candidate": [
            {
                "uid": "4f9be8d3-fdd1-48ff-ad24-9e6c9d433b05",
                "previous_election": "১৯৯৬ (১২ জুন) - সপ্তম",
                "party": "বাংলাদেশ আওয়ামী লীগ",
                "candidate_name": "প্রার্থীর নাম",
                "gained_vote": 5456,
                "gained_vote_percentage": "33.80",
                "party_candidate_or_opposite": "দলীয়",
                "is_successor": "বিজয়ী",
                "status": "published"
            },
            {
                "uid": "89ff2102-a997-4b8e-9d5d-45778c3b646b",
                "previous_election": "১৯৯৬ (১২ জুন) - সপ্তম",
                "party": "বাংলাদেশ জাতীয়তাবাদী দল - বি.এন.পি",
                "candidate_name": "প্রার্থীর নাম 2",
                "gained_vote": 2414,
                "gained_vote_percentage": "26.70",
                "party_candidate_or_opposite": "দলীয়",
                "is_successor": "নিকটতম প্রতিদ্বন্দ্বী",
                "status": "published"
            }
        ],
        "status": "published"
    }
}
```

**(iii) Previous Election Result Update API**

```json
Request Body:
GET {{BASE_URL}}/api/v1/constituency/operator/previous-election/<uid>/


Response:
Status Code: 200

{}
```
