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

{
    "count": 1337,
    "next": null,
    "previous": "https://api.represent.me/api/politician/?page=133",
    "next_id": null,
    "previous_id": 133,
    "results": [
        {
            "name": "Lisa Cameron",
            "family_name": "",
            "given_name": "Lisa",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Cameron, Lisa",
            "email": "lisa.cameron.mp@parliament.uk",
            "gender": "female",
            "birth_date": "1972-04-08",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/6047/image/54fde3b91ccf185f0d8cc4b2",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 6855",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/lisacameronsnp",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://www.facebook.com/lisacameronsnp",
                    "note": "facebook"
                },
                {
                    "url": "http://www.snp.org/people/lisa-cameron",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Lisa_Cameron",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Margaret Beckett",
            "family_name": "",
            "given_name": "Margaret",
            "additional_name": "",
            "honorific_prefix": "The Right Honourable",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Beckett, Margaret",
            "email": "margaret.beckett.mp@parliament.uk",
            "gender": "female",
            "birth_date": "1943-01-15",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/3393/image/552edf0c42862f047e51ccb3",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 5135; 020 7219 2088; Fax 020 7219 4780",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://en.wikipedia.org/wiki/Margaret_Beckett",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Maria Fyfe",
            "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": "Maria Miller",
            "family_name": "Miller",
            "given_name": "Maria",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Miller, Maria",
            "email": "maria.miller.mp@parliament.uk",
            "gender": "female",
            "birth_date": "1964-03-26",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/2525/image/552105458793cecd721b9bfd",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 5749",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/Maria_MillerMP",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://www.facebook.com/mariamilleruk?fref=ts",
                    "note": "facebook"
                },
                {
                    "url": "http://www.maria4basingstoke.com/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Maria_Miller",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Martin Docherty",
            "family_name": "",
            "given_name": "Martin",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Docherty, Martin John",
            "email": "martin.docherty.mp@parliament.uk",
            "gender": "male",
            "birth_date": "1971-01-21",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/6056/image/552aaa485b858ee163ed6371",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 4609",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/martinjdocherty",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://www.facebook.com/pages/Martin-Docherty-for-West-Dunbartonshire/1022409794455334?fref=nf",
                    "note": "facebook"
                },
                {
                    "url": "http://www.snp.org/people/martin-docherty",
                    "note": "website"
                },
                {
                    "url": "http://en.wikipedia.org/wiki/Martin_Docherty",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Matthew Offord",
            "family_name": "",
            "given_name": "Matthew",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Offord, Matthew",
            "email": "matthew.offord.mp@parliament.uk",
            "gender": "male",
            "birth_date": "1969-09-03",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/1323/image/5517fe0d249b917507bee534",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 7083",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/Offord4Hendon",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.matthewofford.co.uk",
                    "note": "website"
                },
                {
                    "url": "http://en.wikipedia.org/wiki/Matthew_Offord",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Michael Ellis",
            "family_name": "",
            "given_name": "Michael",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Ellis, Michael",
            "email": "michael.ellis.mp@parliament.uk",
            "gender": "male",
            "birth_date": "1967-10-13",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/1066/image/5534f8b1b247335574a42e3d",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 7220",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/Michael_Ellis1",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.michaelellis.co.uk/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Michael_Ellis_(British_politician)",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        }
    ]
}