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

{
    "count": 1337,
    "next": "https://api.represent.me/api/politician/?ordering=-family_name&page=2",
    "previous": null,
    "next_id": 2,
    "previous_id": null,
    "results": [
        {
            "name": "Sammy Wilson",
            "family_name": "Wilson",
            "given_name": "Sammy",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Wilson, Sammy",
            "email": "barronj@parliament.uk",
            "gender": "male",
            "birth_date": "1953-04-04",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/1364/image/5534f702b247335574a42e34",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "fax",
                    "value": "020 7219 3671",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 8523",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/eastantrimmp",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://www.facebook.com/SammyWilsonMP",
                    "note": "facebook"
                },
                {
                    "url": "http://www.sammywilson.org",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Sammy_Wilson",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Rob Wilson",
            "family_name": "Wilson",
            "given_name": "Rob",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Wilson, Rob",
            "email": "robwilsonmp@parliament.uk",
            "gender": "male",
            "birth_date": "1965-01-04",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/1040/image/5517f6b6249b917507bee512",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "fax",
                    "value": "020 7219 6519",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 2498",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/minforcivsoc",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.robwilsonmp.com",
                    "note": "website"
                },
                {
                    "url": "http://en.wikipedia.org/wiki/Rob_Wilson",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Phil Wilson",
            "family_name": "Wilson",
            "given_name": "Phil",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Wilson, Phil",
            "email": "phil.wilson.mp@parliament.uk",
            "gender": "male",
            "birth_date": "1959-05-31",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/174/image/553ba06410284be476aae887",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 4966",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/PhilWilsonMP",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.phil4sedgefield.uk/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Phil_Wilson_(British_politician)",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Hywel Williams",
            "family_name": "Williams",
            "given_name": "",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Williams, Hywel",
            "email": "hywel.williams.mp@parliament.uk",
            "gender": "male",
            "birth_date": "1953-05-14",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/2286/image/54b837fe7089b96b50247a2d",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 8150",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/hywelplaidcymru",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://www.facebook.com/HywelWilliamsASMP",
                    "note": "facebook"
                },
                {
                    "url": "http://www.hywelwilliams.org/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Hywel_Williams",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Mark Williams",
            "family_name": "Williams",
            "given_name": "Mark",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Williams, Mark",
            "email": "williamsmf@parliament.uk",
            "gender": "male",
            "birth_date": "1966-03-24",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/15/image/5481e8e4b150e238702c0610",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 8469",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/mark4ceredigion",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "https://www.facebook.com/mark4ceredigion",
                    "note": "facebook"
                },
                {
                    "url": "http://www.markwilliams.org.uk/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Mark_Williams_%28politician%29",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Tom Watson",
            "family_name": "Watson",
            "given_name": "Thomas",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Watson, Tom",
            "email": "tom.watson.mp@parliament.uk",
            "gender": "male",
            "birth_date": "1967-01-08",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/2252/image/553396c2bbbc92023d8a8625",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "fax",
                    "value": "020 7219 1943",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 8335",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/tom_watson?lang=en",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.tom-watson.co.uk",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Tom_Watson_(politician)",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Charles Walker",
            "family_name": "Walker",
            "given_name": "Charles",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Walker, Charles",
            "email": "charles.walker.mp@parliament.uk",
            "gender": "male",
            "birth_date": "1967-09-11",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/3600/image/5522580f328bff5d39338a5a",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "fax",
                    "value": "020 7219 0505",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 0338",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.charleswalker.org",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Charles_Walker_(British_politician)",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Robin Walker",
            "family_name": "Walker",
            "given_name": "Robin",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Walker, Robin",
            "email": "robin.walker.mp@parliament.uk",
            "gender": "male",
            "birth_date": "1978-04-12",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/496/image/551be5a8209513973bc512a3",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 7196",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/walkerworcester",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.walker4worcester.com",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Robin_Walker",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Iain Duncan Smith",
            "family_name": "Smith",
            "given_name": "Iain",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Duncan Smith, Iain",
            "email": "olivia.kybett@parliament.uk",
            "gender": "male",
            "birth_date": "1954-04-09",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/308/image/55249f84f0e9e2c82406eba7",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 2667/2664",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.iainduncansmith.org.uk/",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Iain_Duncan_Smith",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        },
        {
            "name": "Chloe Smith",
            "family_name": "Smith",
            "given_name": "Chloe",
            "additional_name": "",
            "honorific_prefix": "",
            "honorific_suffix": "",
            "patronymic_name": "",
            "sort_name": "Smith, Chloe",
            "email": "chloe.smith.mp@parliament.uk",
            "gender": "female",
            "birth_date": "1982-05-17",
            "death_date": "",
            "image": "http://yournextmp.popit.mysociety.org/persons/1684/image/5534f64bb247335574a42e33",
            "summary": "",
            "biography": "",
            "national_identity": null,
            "contact_details": [
                {
                    "label": "",
                    "contact_type": "phone",
                    "value": "020 7219 8449",
                    "note": ""
                },
                {
                    "label": "",
                    "contact_type": "twitter",
                    "value": "https://twitter.com/NorwichChloe",
                    "note": ""
                }
            ],
            "links": [
                {
                    "url": "http://www.chloesmith.org.uk",
                    "note": "website"
                },
                {
                    "url": "https://en.wikipedia.org/wiki/Chloe_Smith",
                    "note": "wikipedia"
                }
            ],
            "sources": []
        }
    ]
}