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=-created_at
HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 1337,
    "next": "https://api.represent.me/api/politician/?ordering=-created_at&page=2",
    "previous": null,
    "next_id": 2,
    "previous_id": null,
    "results": [
        {
            "name": "Zac Goldsmith",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Goldsmith, Zac",
            "email": "zac@zacgoldsmith.com",
            "gender": "male",
            "birth_date": "1975-01-20",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/502/image/55351f40b247335574a42e7e",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/ZacGoldsmith",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.zacgoldsmith.com/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Zac_Goldsmith",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Yvonne Fovargue",
            "family_name": "",
            "given_name": "Yvonne",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Fovargue, Yvonne",
            "email": "yvonne.fovargue.mp@parliament.uk",
            "gender": "female",
            "birth_date": "1956-11-29",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/375/image/55183a01249b917507bee56c",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 3000",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/Y_FovargueMP",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://en-gb.facebook.com/YvonneFovargueMP",
                    "note": "facebook"
                },
                {
                    "url": "http://www.yvonnefovargue.com/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Yvonne_Fovargue",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Yvette Cooper",
            "family_name": "",
            "given_name": "Yvette",
            "additional_name": "",
            "honorific_prefix": "The Right Honourable",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Cooper, Yvette",
            "email": "coopery@parliament.uk",
            "gender": "female",
            "birth_date": "1969-03-20",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/2607/image/55323efa29c5d53959d9e460",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "fax",
                    "value": "020 7219 0912",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 5080",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/YvetteCooperMP",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://facebook.com/YvetteCooperMP",
                    "note": "facebook"
                },
                {
                    "url": "http://www.yvettecooper.com",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Yvette_Cooper",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Yasmin Qureshi",
            "family_name": "",
            "given_name": "Yasmin",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Qureshi, Yasmin",
            "email": "yasmin.qureshi.mp@parliament.uk",
            "gender": "female",
            "birth_date": "1963-07-05",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/662/image/553baf70b9c95afe74c5d335",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 7019",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/YasminQureshiMP",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.yasminqureshi.org.uk",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Yasmin_Qureshi",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Win Griffiths",
            "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": "Willie Rennie",
            "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": "William Wragg",
            "family_name": "",
            "given_name": "William",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Wragg, William",
            "email": "william@williamwragg.org.uk",
            "gender": "male",
            "birth_date": "1987-12-11",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/4197/image/5481e73db150e238702c0501",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/william_wragg",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.williamwragg.org.uk/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/William_Wragg",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "William Thompson",
            "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": "William Ross",
            "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": "William McCrea",
            "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": []
        }
    ]
}