{"info":{"_postman_id":"b631c71f-f999-4ac0-a6ad-9819efa90d9c","name":"Kenya Electoral Wards API","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>The Kenya Electoral Wards API provides the user with the names of all the wards in a particular county or counties based on the URL parameters provides. With this payload, the user can choose the data they want to consume in their app/website.</p>\n<p>Kenya has 47 counties. Each county is divided into constituencies and each constituency is divided into wards. As such, wards are the smallest electoral divisions in the country and closest the citizens can get government services.</p>\n<p>The code for this API can be found at <a href=\"https://github.com/bwainaina380/kenya-wards-constituencies-county-rest-api\">https://github.com/bwainaina380/kenya-wards-constituencies-county-rest-api</a></p>\n<p>For any questions, please feel free to contact me at:\nEmail: <a href=\"mailto:bwainaina380@gmail.com\">bwainaina380@gmail.com</a>\nTwitter: @bwainaina380</p>\n<h1 id=\"overview\">Overview</h1>\n<p>The most important thing you need to know as a developer is the syntax I've used when adding the names of the counties to the database. If you do not write the names exactly as in the following list, you will get an empty response.</p>\n<p>Make sure you follow the capitalizations and dashes that I've used to the letter.</p>\n<p>VERY IMPORTANT: There are counties with 2 names. Examples are \"West Pokot\", \"Homa Bay\" and \"Uasin Gishu\". When performing a GET request on such counties, you need to separate the two names with a \"+\".</p>\n<p>Example: \n/api/wards?county=West+Pokot\n/api/wards?county=Homa+Bay\n/api/wards?county=Uasin+Gishu</p>\n<ol>\n<li>Mombasa</li>\n<li>Kwale</li>\n<li>Kilifi</li>\n<li>Tana-River</li>\n<li>Lamu</li>\n<li>Taita-Taveta</li>\n<li>Garissa</li>\n<li>Wajir</li>\n<li>Mandera</li>\n<li>Marsabit</li>\n<li>Isiolo</li>\n<li>Meru</li>\n<li>Tharaka-Nithi</li>\n<li>Embu</li>\n<li>Kitui</li>\n<li>Machakos</li>\n<li>Makueni</li>\n<li>Nyandarua</li>\n<li>Nyeri</li>\n<li>Kirinyaga</li>\n<li>Muranga</li>\n<li>Kiambu</li>\n<li>Turkana</li>\n<li>West Pokot</li>\n<li>Samburu</li>\n<li>Trans-Nzoia</li>\n<li>Uasin Gishu</li>\n<li>Elgeyo-Marakwet</li>\n<li>Nandi</li>\n<li>Baringo</li>\n<li>Laikipia</li>\n<li>Nakuru</li>\n<li>Narok</li>\n<li>Kajiado</li>\n<li>Kericho</li>\n<li>Bomet</li>\n<li>Kakamega</li>\n<li>Vihiga</li>\n<li>Bungoma</li>\n<li>Busia</li>\n<li>Siaya</li>\n<li>Kisumu</li>\n<li>Homa Bay</li>\n<li>Migori</li>\n<li>Kisii</li>\n<li>Nyamira</li>\n<li>Nairobi</li>\n</ol>\n<h1 id=\"authentication\">Authentication</h1>\n<p>There is no authentication required to use this API. I will keep an eye on the number of requests to the API, and if it hits 10000 requests per month, I will enable authorization.</p>\n<p>This will help me know who is using the API and for what purpose.</p>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>402 - You will get this error when you try to perform a POST request without providing one or all of the following in the request body:</p>\n<ol>\n<li>Ward name</li>\n<li>Constituency name</li>\n<li>County Name</li>\n</ol>\n<p>In all other cases, you will get an empty response, showing that you have entered a county that does not exist in Kenya, or you have a typo in the request parameter.</p>\n<h1 id=\"rate-limit\">Rate limit</h1>\n<p>As of this writing, I have not imposed any rate limit on the use of this API.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"},{"content":"Rate limit","slug":"rate-limit"}],"owner":"4315414","collectionId":"b631c71f-f999-4ac0-a6ad-9819efa90d9c","publishedId":"Rzn8NgRo","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-12-21T10:05:15.000Z"},"item":[{"name":"https://frozen-basin-45055.herokuapp.com/api/wards?county=Nairobi","id":"ad7c7080-769d-4277-8f29-10eecb75c8f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://frozen-basin-45055.herokuapp.com/api/wards?county=Nairobi","description":"<p>This returns the names of all the wards in \"Nairobi\" county. You can replace \"countyName\" with the name of any of the 47 counties in the country.</p>\n","urlObject":{"protocol":"https","path":["api","wards"],"host":["frozen-basin-45055","herokuapp","com"],"query":[{"key":"county","value":"Nairobi"}],"variable":[]}},"response":[{"id":"25cf2bb5-76b4-4da4-8649-effda727b017","name":"Default","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"https://frozen-basin-45055.herokuapp.com/api/wards?county=Nairobi","protocol":"https","host":["frozen-basin-45055","herokuapp","com"],"path":["api","wards"],"query":[{"key":"county","value":"Nairobi"}]}},"code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n\"_id\": \"5c1b84588a6e0a0004a71cab\",\n\"name\": \"Kitisuru\",\n\"constituency\": \"Westlands\",\n\"county\": \"Nairobi\",\n\"__v\": 0\n},\n{\n\"_id\": \"5c1b84778a6e0a0004a71cac\",\n\"name\": \"Parklands\",\n\"constituency\": \"Westlands\",\n\"county\": \"Nairobi\",\n\"__v\": 0\n}"}],"_postman_id":"ad7c7080-769d-4277-8f29-10eecb75c8f6"},{"name":"https://frozen-basin-45055.herokuapp.com/api/wards?county=Nairobi&county=Mombasa","id":"3005d672-9967-4fd1-920b-29332a97172e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://frozen-basin-45055.herokuapp.com/api/wards?county=Nairobi&county=Mombasa","description":"<p>This returns the names of all the wards in Nairobi and Mombasa counties. You can replace \"Nairobi\" or \"Mombasa\" with the name of any of the 47 counties in the country. You can display more counties. Just separate them with \"&amp;\" as shown in this request URL example.</p>\n","urlObject":{"protocol":"https","path":["api","wards"],"host":["frozen-basin-45055","herokuapp","com"],"query":[{"key":"county","value":"Nairobi"},{"key":"county","value":"Mombasa"}],"variable":[]}},"response":[{"id":"ba225d28-da0c-4db0-80b0-25374dde1748","name":"Default","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"https://frozen-basin-45055.herokuapp.com/api/wards?county=Nairobi&county=Mombasa","protocol":"https","host":["frozen-basin-45055","herokuapp","com"],"path":["api","wards"],"query":[{"key":"county","value":"Nairobi"},{"key":"county","value":"Mombasa"}]}},"code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n\"_id\": \"5c1b82048a6e0a0004a71c88\",\n\"name\": \"Nyaura\",\n\"constituency\": \"Nyaribari Chache\",\n\"county\": \"Kisii\",\n\"__v\": 0\n},\n{\n\"_id\": \"5c1b84588a6e0a0004a71cab\",\n\"name\": \"Kitisuru\",\n\"constituency\": \"Westlands\",\n\"county\": \"Nairobi\",\n\"__v\": 0\n}"}],"_postman_id":"3005d672-9967-4fd1-920b-29332a97172e"},{"name":"https://frozen-basin-45055.herokuapp.com/api/wards","id":"3e2b3982-3ae4-4a35-b496-13cbc950a934","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{ \"name\":\"Kilimambogo\", \"constituency\":\"Kilima\", \"county\":\"Kakamega\"}"},"url":"https://frozen-basin-45055.herokuapp.com/api/wards","description":"<p>This adds a new ward to the wards database. You need to provide the name of the ward on the \"name\" property, the name of the constituency on the \"constituency\" property and the name of the county on the \"county\" property.</p>\n","urlObject":{"protocol":"https","path":["api","wards"],"host":["frozen-basin-45055","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"11291ae4-9a0f-4d65-a3d5-b96c3abe7937","name":"Default","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{ \"name\":\"Kilimambogo\", \"constituency\":\"Kilima\", \"county\":\"Kakamega\"}"},"url":"https://frozen-basin-45055.herokuapp.com/api/wards"},"code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n\"_id\": \"5c1b84588a6e0a9874a71cab\",\n\"name\": \"Kilimambogo\",\n\"constituency\": \"Kilima\",\n\"county\": \"Kakamega\",\n\"__v\": 0\n}"}],"_postman_id":"3e2b3982-3ae4-4a35-b496-13cbc950a934"},{"name":"https://frozen-basin-45055.herokuapp.com/api/wards/:id","id":"794c7b50-225b-44cf-b6bb-5b628bcf3043","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{ \"name\":\"Kilimambogo\", \"constituency\":\"Kitui East\", \"county\":\"Kitui\"}"},"url":"https://frozen-basin-45055.herokuapp.com/api/wards/:id","description":"<p>This updates data about the ward whose id is specified in the \"id\" request parameter. </p>\n","urlObject":{"protocol":"https","path":["api","wards",":id"],"host":["frozen-basin-45055","herokuapp","com"],"query":[],"variable":[{"type":"any","key":"id"}]}},"response":[{"id":"756b007a-47d2-45af-9a57-dbc53801fa63","name":"Default","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{ \"name\":\"Kilimambogo\", \"constituency\":\"Kitui East\", \"county\":\"Kitui\"}"},"url":{"raw":"https://frozen-basin-45055.herokuapp.com/api/wards/:id","protocol":"https","host":["frozen-basin-45055","herokuapp","com"],"path":["api","wards",":id"],"variable":[{"key":"id"}]}},"code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n\"_id\": \"5c1b84588a6e0a9874a71cab\",\n\"name\": \"Kilimambogo\",\n\"constituency\": \"Kitui East\",\n\"county\": \"Kitui\",\n\"__v\": 0\n}"}],"_postman_id":"794c7b50-225b-44cf-b6bb-5b628bcf3043"},{"name":"https://frozen-basin-45055.herokuapp.com/api/wards/:id","id":"de0e78af-0efd-42b6-be5e-9da1d91fb703","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":"https://frozen-basin-45055.herokuapp.com/api/wards/:id","description":"<p>This deletes the ward whose id is specified in the \"id\" request parameter. </p>\n","urlObject":{"protocol":"https","path":["api","wards",":id"],"host":["frozen-basin-45055","herokuapp","com"],"query":[],"variable":[{"type":"any","key":"id"}]}},"response":[{"id":"9d775558-db7f-40e8-8c74-4973a447144c","name":"Default","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"https://frozen-basin-45055.herokuapp.com/api/wards/:id","protocol":"https","host":["frozen-basin-45055","herokuapp","com"],"path":["api","wards",":id"],"variable":[{"key":"id"}]}},"code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n\"_id\": \"5c1b84588a6e0a9874a71cab\",\n\"name\": \"Kilimambogo\",\n\"constituency\": \"Kitui East\",\n\"county\": \"Kitui\",\n\"__v\": 0\n}"}],"_postman_id":"de0e78af-0efd-42b6-be5e-9da1d91fb703"}]}