API endpoint that allows politicians to be viewed and edited.

to find by name:

http://localhost:8000/api/politician/?search=adam

or

http://localhost:8000/api/politician/?search=rian+bail

to find by id:

http://localhost:8000/api/simple_geos/?ID=GBR

or

http://localhost:8000/api/politician/?search=5

to find by birth date:

http://localhost:8000/api/politician/?birth_date=1965-07-29

or

http://localhost:8000/api/politician/?birth_date__gte=1965-07-29


endpoint http://localhost:8000/api/users/simple/ returns only id, image, name fields for every politicians

POST

{
"name": "Anna",
"family_name": "Ivanova",
"given_name": "",
"additional_name": "",
"honorific_prefix": "",
"honorific_suffix": "",
"patronymic_name": "",
"sort_name": "Anna I",
"email": "anna@gu.com",
"gender": "female",
"birth_date": "1981-03-29",
"death_date": "",
"image": "",
"summary": "",
"biography": "Tiny Anna's bio",
"national_identity": "",
"contact_details": [{"label": "label", "contact_type": "fax", "value": "123232323", "note": ""}],
"links": [{"url": "url", "note": ""}],
"sources": [{"url": "url", "note": ""}],
}
GET /api/politician/?ordering=birth_date
HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 1337,
    "next": "https://api.represent.me/api/politician/?ordering=birth_date&page=2",
    "previous": null,
    "next_id": 2,
    "previous_id": null,
    "results": [
        {
            "name": "Alan Keen",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Adam Price",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Adrian Flook",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Alan Hurst",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Adrian Sanders",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Aidan Burley",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Alan Beith",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Adam Ingram",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Alan Clark",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        },
        {
            "name": "Alan Milburn",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "",
            "email": null,
            "gender": "",
            "birth_date": "",
            "death_date": "",
            "image": null,
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [],
            "links": [],
            "sources": []
        }
    ]
}