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

{
    "count": 1337,
    "next": "https://api.represent.me/api/politician/?page=2",
    "previous": null,
    "next_id": 2,
    "previous_id": null,
    "results": [
        {
            "name": "Adam Holloway",
            "family_name": "",
            "given_name": "Adam",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Holloway, Adam",
            "email": "hollowaya@parliament.uk",
            "gender": "male",
            "birth_date": "1965-07-29",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/1688/image/5516d1cd929f1bbe286be040",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "fax",
                    "value": "020 7219 2871",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 8402",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "adamhollowaymp",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://www.facebook.com/holloway.adam",
                    "note": "facebook"
                },
                {
                    "url": "http://www.adamholloway.co.uk/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Adam_Holloway",
                    "note": "wikipedia"
                }
            ],
            "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": "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 Bailey",
            "family_name": "",
            "given_name": "Adrian",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Bailey, Adrian",
            "email": "baileya@parliament.uk",
            "gender": "male",
            "birth_date": "1945-12-11",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/1466/image/5532412529c5d53959d9e466",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "fax",
                    "value": "020 7219 1202",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 6060",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/Adrian_BaileyMP",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.adrianbaileymp.org/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Adrian_Bailey",
                    "note": "wikipedia"
                }
            ],
            "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": "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": "Alan Campbell",
            "family_name": "",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Campbell, Alan",
            "email": "campbellal@parliament.uk",
            "gender": "male",
            "birth_date": "1957-07-08",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/2910/image/553aabd43a37ac905459295a",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "fax",
                    "value": "020 7219 3006",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 6619",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/alancampbellmp",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.alancampbellmp.co.uk",
                    "note": "website"
                },
                {
                    "url": "http://en.wikipedia.org/wiki/Alan_Campbell_%28politician%29",
                    "note": "wikipedia"
                }
            ],
            "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": []
        }
    ]
}