---
# System prepended metadata

title: Political API

---

# Political API

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


## 1. Political Party

**(i) Create Political Party**

```json
Request Body:
POST {{BASE_URL}}/api/v1/pera/political/party/

{
    "party_name": "বাংলাদেশ আওয়ামী লীগ",
    "party_logo": "/home/user/Downloads/Images/বাংলাদেশ_আওয়ামী_লীগের_ব্যাজ.png",
    "symbol": "/home/user/Downloads/Images/বাংলাদেশ_আওয়ামী_লীগের_প্রতীক.png",
    "symbol_name": "নৌকা"
}

Response:
Status Code: 201

{
    "id": 1,
    "created_at": "2022-08-22T13:34:09.573165+06:00",
    "updated_at": "2022-08-22T13:34:09.573193+06:00",
    "party_name": "বাংলাদেশ আওয়ামী লীগ",
    "party_logo": "http://127.0.0.1:8000/media/%E0%A6%AC%E0%A6%B2%E0%A6%A6%E0%A6%B6_%E0%A6%86%E0%A6%93%E0%A6%AF%E0%A6%AE_%E0%A6%B2%E0%A6%97%E0%A6%B0_%E0%A6%AC%E0%A6%AF%E0%A6%9C.png",
    "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%AC%E0%A6%B2%E0%A6%A6%E0%A6%B6_%E0%A6%86%E0%A6%93%E0%A6%AF%E0%A6%AE_%E0%A6%B2%E0%A6%97%E0%A6%B0_%E0%A6%AA%E0%A6%B0%E0%A6%A4%E0%A6%95-2022-08-22-13-34-09.png",
    "symbol_name": "নৌকা",
    "vote": null,
    "status": "published"
}
```

**(ii) Get List Political Party**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/political/party/

Response:
Status Code: 200

{
    "count": 16,
    "next": "http://127.0.0.1:8000/api/v1/pera/political/party/?lim=10&offset=10",
    "previous": null,
    "results": [
        {
            "id": 1,
            "party_name": "বাংলাদেশ আওয়ামী লীগ",
            "party_logo": "http://127.0.0.1:8000/media/%E0%A6%AC%E0%A6%B2%E0%A6%A6%E0%A6%B6_%E0%A6%86%E0%A6%93%E0%A6%AF%E0%A6%AE_%E0%A6%B2%E0%A6%97%E0%A6%B0_%E0%A6%AC%E0%A6%AF%E0%A6%9C.png",
            "symbol_name": "নৌকা",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%AC%E0%A6%B2%E0%A6%A6%E0%A6%B6_%E0%A6%86%E0%A6%93%E0%A6%AF%E0%A6%AE_%E0%A6%B2%E0%A6%97%E0%A6%B0_%E0%A6%AA%E0%A6%B0%E0%A6%A4%E0%A6%95-2022-08-22-13-34-09.png",
            "vote": null,
            "status": "published"
        },
        {
            "id": 2,
            "party_name": "লিবারেল ডেমোক্রেটিক পার্টি",
            "party_logo": "http://127.0.0.1:8000/media/%E0%A6%B2%E0%A6%AC%E0%A6%B0%E0%A6%B2_%E0%A6%A1%E0%A6%AE%E0%A6%95%E0%A6%B0%E0%A6%AF%E0%A6%9F%E0%A6%95_%E0%A6%AA%E0%A6%B0%E0%A6%9F_%E0%A6%AC%E0%A6%B2%E0%A6%A6%E0%A6%B6_%E0%A6%B2%E0%A6%97.png",
            "symbol_name": "ছাতা",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%B2%E0%A6%AC%E0%A6%B0%E0%A6%B2_%E0%A6%A1%E0%A6%AE%E0%A6%95%E0%A6%B0%E0%A6%AF%E0%A6%9F%E0%A6%95_%E0%A6%AA%E0%A6%B0%E0%A6%9F_%E0%A6%AC%E0%A6%B2%E0%A6%A6%E0%A6%B6_%E0%A6%B2%E0%A6%97-2022-08-22-13-51-05.jpg",
            "vote": null,
            "status": "published"
        },
        {
            "id": 3,
            "party_name": "জাতীয় পার্টি - জেপি",
            "party_logo": "http://127.0.0.1:8000/media/%E0%A6%9C%E0%A6%A4%E0%A6%AF_%E0%A6%AA%E0%A6%B0%E0%A6%9F_%E0%A6%9C%E0%A6%AA.jpg",
            "symbol_name": "বাইসাইকেল",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/Bicycle-2022-08-22-13-54-05.png",
            "vote": null,
            "status": "published"
        },
        {
            "id": 4,
            "party_name": "বাংলাদেশের সাম্যবাদী দল (এম.এল)",
            "party_logo": "http://127.0.0.1:8000/media/South_Asian_Communist_Banner.png",
            "symbol_name": "চাকা",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%9A%E0%A6%95-2022-08-22-13-55-00.png",
            "vote": null,
            "status": "published"
        },
        {
            "id": 36,
            "party_name": "বাংলাদেশের কমিউনিস্ট পার্টি",
            "party_logo": "http://127.0.0.1:8000/media/South_Asian_Communist_Banner_wYjz6BU.png",
            "symbol_name": "কাস্তে",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%95%E0%A6%B8%E0%A6%A4-2022-08-22-15-04-45.png",
            "vote": null,
            "status": "published"
        },
        {
            "id": 37,
            "party_name": "বাংলাদেশ জাতীয়তাবাদী দল",
            "party_logo": "http://127.0.0.1:8000/media/%E0%A6%AC%E0%A6%B2%E0%A6%A6%E0%A6%B6_%E0%A6%9C%E0%A6%A4%E0%A6%AF%E0%A6%A4%E0%A6%AC%E0%A6%A6_%E0%A6%A6%E0%A6%B2%E0%A6%B0_%E0%A6%AA%E0%A6%A4%E0%A6%95.png",
            "symbol_name": "ধানের শীষ",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%AC%E0%A6%B2%E0%A6%A6%E0%A6%B6_%E0%A6%86%E0%A6%93%E0%A6%AF%E0%A6%AE_%E0%A6%B2%E0%A6%97%E0%A6%B0_%E0%A6%AA%E0%A6%B0%E0%A6%A4%E0%A6%95-2022-08-22-15-06-07.png",
            "vote": null,
            "status": "published"
        },
        {
            "id": 38,
            "party_name": "কৃষক শ্রমিক জনতা লীগ",
            "party_logo": null,
            "symbol_name": "গামছা",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%97%E0%A6%AE%E0%A6%9B-2022-08-22-15-06-52.png",
            "vote": null,
            "status": "published"
        },
        {
            "id": 39,
            "party_name": "গণতন্ত্রী পার্টি",
            "party_logo": null,
            "symbol_name": "কবুতর",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%95%E0%A6%AC%E0%A6%A4%E0%A6%B0-2022-08-22-15-07-43.png",
            "vote": null,
            "status": "published"
        },
        {
            "id": 40,
            "party_name": "বাংলাদেশের ওয়ার্কার্স পার্টি",
            "party_logo": "http://127.0.0.1:8000/media/South_Asian_Communist_Banner_mjjVQ8B.png",
            "symbol_name": "হাতুড়ী",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%B9%E0%A6%A4%E0%A6%A1-2022-08-22-15-09-55.png",
            "vote": null,
            "status": "published"
        },
        {
            "id": 41,
            "party_name": "বিকল্পধারা বাংলাদেশ",
            "party_logo": null,
            "symbol_name": "কুলা",
            "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%95%E0%A6%B2-2022-08-22-15-10-59.png",
            "vote": null,
            "status": "published"
        }
    ]
}
```

**(iii) Get Detail Political Party**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/political/party/<id>/

Response:
Status Code: 200

{
    "id": 41,
    "party_name": "বিকল্পধারা বাংলাদেশ",
    "party_logo": null,
    "symbol_name": "কুলা",
    "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%95%E0%A6%B2-2022-08-22-15-10-59.png",
    "vote": null,
    "status": "published"
}
```

**(iv) Update Political Party**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/political/party/<id>/

{
    "status": "unpublished"
}

Response:
Status Code: 200

{
    "id": 41,
    "created_at": "2022-08-22T15:10:59.003868+06:00",
    "updated_at": "2022-08-22T15:28:28.319538+06:00",
    "party_name": "বিকল্পধারা বাংলাদেশ",
    "party_logo": null,
    "symbol": "http://127.0.0.1:8000/media/party/2022-08-22/%E0%A6%95%E0%A6%B2-2022-08-22-15-10-59.png",
    "symbol_name": "কুলা",
    "vote": null,
    "status": "unpublished"
}
```

**(v) Delete (Soft Delete) Political Party**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/political/party/<id>/

{
    "status": "archived"
}

Response:
Status Code: 200

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


## 2. Political Candidate

**(i) Create Political Party**

```json
Request Body:
POST {{BASE_URL}}/api/v1/pera/political/candidate/

{
    "party_name": "1",
    "constituency": "94",
    "candidate_name": "মাশরাফি বিন মর্তুজা",
    "candidate_image": "/home/jaki/Pictures/mashrafe-bin-mortaza.jpg",
    "vote": ""
}

Response:
Status Code: 201

{
    "id": 1,
    "created_at": "2022-08-30T00:12:46.391384+06:00",
    "updated_at": "2022-08-30T00:12:46.391414+06:00",
    "candidate_name": "মাশরাফি বিন মর্তুজা",
    "candidate_image": "http://127.0.0.1:8000/media/candidate/2022-08-30/mashrafe-bin-mortaza-2022-08-30-00-12-46.jpg",
    "vote": null,
    "status": "published",
    "party_name": 1,
    "constituency": 94
}
```

**(ii) Get List Political Party**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/political/candidate/

Response:
Status Code: 200

{
    "count": 14,
    "next": "http://127.0.0.1:8000/api/v1/pera/political/candidate/?lim=10&offset=10",
    "previous": null,
    "results": [
        {
            "id": 28,
            "party_name": "বাংলাদেশের কমিউনিস্ট পার্টি (কাস্তে)",
            "candidate_name": "শ্রী যজ্ঞেশ্বর বর্মন",
            "candidate_image": null,
            "status": "published"
        },
        {
            "id": 29,
            "party_name": "ইসলামী আন্দোলন বাংলাদেশ (হাতপাখা)",
            "candidate_name": "মোঃ আব্দুর রাজ্জাক মন্ডল",
            "candidate_image": null,
            "status": "published"
        },
        {
            "id": 30,
            "party_name": "বাংলাদেশ আওয়ামী লীগ (নৌকা)",
            "candidate_name": "মোঃ ফজলে রাব্বী মিয়া",
            "candidate_image": "http://127.0.0.1:8000/media/candidate/2022-08-24/%E0%A6%AB%E0%A6%9C%E0%A6%B2_%E0%A6%B0%E0%A6%AC%E0%A6%AC_%E0%A6%AE%E0%A6%AF-2022-08-24-17-36-23.jpg",
            "status": "published"
        },
        {
            "id": 31,
            "party_name": "জাতীয় পার্টি (লাঙ্গল)",
            "candidate_name": "এ.এইচ এম গোলাম শহীদ রঞ্জু",
            "candidate_image": null,
            "status": "published"
        },
        {
            "id": 32,
            "party_name": "বাংলাদেশ জাতীয়তাবাদী দল (ধানের শীষ)",
            "candidate_name": "মোঃ ফারুক আলম সরকার",
            "candidate_image": null,
            "status": "published"
        },
        {
            "id": 33,
            "party_name": "গণতন্ত্রী পার্টি (কবুতর)",
            "candidate_name": "আবুল বাশার মোঃ শরিতুল্লাহ",
            "candidate_image": null,
            "status": "published"
        },
        {
            "id": 34,
            "party_name": "জাতীয় পার্টি (লাঙ্গল)",
            "candidate_name": "শামীম হায়দার পাটোয়ারী",
            "candidate_image": null,
            "status": "published"
        },
        {
            "id": 35,
            "party_name": "বাংলাদেশ মুসলিম লীগ (হারিকেন)",
            "candidate_name": "মোঃ গোলাম আহসান হাবীব মাসুদ",
            "candidate_image": null,
            "status": "published"
        },
        {
            "id": 36,
            "party_name": "বাংলাদেশের সমাজতান্ত্রিক দল (মই)",
            "candidate_name": "মোঃ গোলাম রব্বানী শাহ",
            "candidate_image": null,
            "status": "published"
        },
        {
            "id": 37,
            "party_name": "গণফ্রন্ট (মাছ)",
            "candidate_name": "মোঃ শরিফুল ইসলাম",
            "candidate_image": null,
            "status": "published"
        }
    ]
}
```

**(iii) Get Detail Political Party**

```json
Request Body:
GET {{BASE_URL}}/api/v1/pera/political/candidate/<id>/
Status Code: 200

{
    "id": 30,
    "party_name": "বাংলাদেশ আওয়ামী লীগ (নৌকা)",
    "candidate_name": "মোঃ ফজলে রাব্বী মিয়া",
    "candidate_image": "http://127.0.0.1:8000/media/candidate/2022-08-24/%E0%A6%AB%E0%A6%9C%E0%A6%B2_%E0%A6%B0%E0%A6%AC%E0%A6%AC_%E0%A6%AE%E0%A6%AF-2022-08-24-17-36-23.jpg",
    "status": "published"
}
```

**(iv) Update Political Party**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/political/candidate/<id>/

{
    "status": "unpublished"
}

Response:
Status Code: 200

{
    "id": 30,
    "created_at": "2022-08-24T17:33:19.192025+06:00",
    "updated_at": "2022-08-30T00:02:43.971064+06:00",
    "candidate_name": "মোঃ ফজলে রাব্বী মিয়া",
    "candidate_image": "http://127.0.0.1:8000/media/candidate/2022-08-24/%E0%A6%AB%E0%A6%9C%E0%A6%B2_%E0%A6%B0%E0%A6%AC%E0%A6%AC_%E0%A6%AE%E0%A6%AF-2022-08-24-17-36-23.jpg",
    "vote": null,
    "status": "unpublished",
    "party_name": 1,
    "constituency": 33
}
```

**(v) Delete (Soft Delete) Political Party**

```json
Request Body:

PATCH {{BASE_URL}}/api/v1/pera/political/party/<id>/

{
    "status": "archived"
}

Response:
Status Code: 200

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