Giter Club home page Giter Club logo

zepson-tech / mikoa-docs Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 14 KB

Welcome to mikoa API documentation, the API is prepared to help make it easy fetch any region, districts,wards and streets. We are creating an online portal where users can help fill in missing data and it will be reflected after aproval by the moderation Team.

Home Page: https://mikoa.kitivopoint.com/

License: MIT License

mikoa tanzania tanzania-locations tanzania-regions-package

mikoa-docs's Introduction

TANZANIA MIKOA API

Welcome to mikoa API documentation, the API is prepared to help make it easy fetch any region, districts,wards and streets. We are creating an online portal where users can help fill in missing data and it will be reflected after aproval by the moderation Team.

Acknowledgements

Authors

API Reference

BASE URL

BASE URL: https://mikoa.kitivopoint.com

Get all regions

  GET /api/v1/regions
sample response
[
   {
       "id": 1,
       "name": "Shinyanga",
       "code": "37",
       "created_at": "2021-11-07T15:18:52.000000Z",
       "updated_at": "2021-11-07T15:18:52.000000Z"
   },
   {
       "id": 2,
       "name": "Mara",
       "code": "31",
       "created_at": "2021-11-07T15:19:00.000000Z",
       "updated_at": "2021-11-07T15:19:00.000000Z"
   }

Get All Districts

  GET /api/v1/districts

sample response

[
     {
        "name": "Butiama",
        "code": "312"
    },
    {
        "name": "Rorya",
        "code": "313"
    }: "372"
    

Get all Wards

  GET /api/v1/wards

sample response

[
   {
       "name": "Mjini",
       "code": 35
   },
   {
       "name": "Kambarage",
       "code": 12
   }
]

Get All Streets

  GET /api/v1/Streets

sample response

{ 
    "name":"Bugayambelele magharibi",
    "code":"NULL"
    }

filter district by regions

  GET /api/v1/filter_districts_by_region
Parameter Type Description
region string Required. Region ID or name

Sample response

 {
        "id": 151,
        "name": "Dodoma\ncbd",
        "code": "411",
        "region_id": 26,
        "created_at": "2021-11-07T15:21:33.000000Z",
        "updated_at": "2021-11-07T15:21:33.000000Z"
    },
    {
        "id": 152,
        "name": "Dodoma",
        "code": "412",
        "region_id": 26,
        "created_at": "2021-11-07T15:21:33.000000Z",
        "updated_at": "2021-11-07T15:21:33.000000Z"
    }

filter ward by district

  GET /api/v1/filter_wards_by_district
Parameter Type Description
district string Required. District ID or name

Sample response

 {
        "id": 479,
        "name": "Machame mashariki",
        "code": 87,
        "district_id": 19,
        "created_at": "2021-11-07T15:19:11.000000Z",
        "updated_at": "2021-11-07T15:19:11.000000Z"
    },
    {
        "id": 480,
        "name": "Machame narumu",
        "code": 23,
        "district_id": 19,
        "created_at": "2021-11-07T15:19:11.000000Z",
        "updated_at": "2021-11-07T15:19:11.000000Z"
    }

filter Street by ward

  GET /api/v1/filter_streets_by_ward
Parameter Type Description
ward string Required. ward ID or name

Sample response

   {
        "id": 7221,
        "name": "Kibaoni",
        "code": 54,
        "ward_id": 490,
        "created_at": "2021-11-07T15:19:11.000000Z",
        "updated_at": "2021-11-07T15:19:11.000000Z"
    },
    {
        "id": 7222,
        "name": "Bomani",
        "code": 24,
        "ward_id": 490,
        "created_at": "2021-11-07T15:19:11.000000Z",
        "updated_at": "2021-11-07T15:19:11.000000Z"
    }

Get All regions with district

  GET /api/v1/regions_with_districts

Sample response

[
    {
        "id": 1,
        "name": "Shinyanga",
        "code": "37",
        "created_at": "2021-11-07T15:18:52.000000Z",
        "updated_at": "2021-11-07T15:18:52.000000Z",
        "districts": [
            {
                "id": 1,
                "name": "Shinyanga\ncbd",
                "code": "371",
                "region_id": 1,
                "created_at": "2021-11-07T15:18:52.000000Z",
                "updated_at": "2021-11-07T15:18:52.000000Z"
            },
            {
                "id": 2,
                "name": "Shinyanga",
                "code": "372",
                "region_id": 1,
                "created_at": "2021-11-07T15:18:53.000000Z",
                "updated_at": "2021-11-07T15:18:53.000000Z"
            }

Get All district with ward

  GET /api/v1/districts_with_wards

Sample response

[
    {
        "id": 1,
        "name": "Shinyanga\ncbd",
        "code": "371",
        "region_id": 1,
        "created_at": "2021-11-07T15:18:52.000000Z",
        "updated_at": "2021-11-07T15:18:52.000000Z",
        "wards": [
            {
                "id": 1,
                "name": "Mjini",
                "code": 87,
                "district_id": 1,
                "created_at": "2021-11-07T15:18:52.000000Z",
                "updated_at": "2021-11-07T15:18:52.000000Z"
            },
            {
                "id": 2,
                "name": "Kambarage",
                "code": 855,
                "district_id": 1,
                "created_at": "2021-11-07T15:18:52.000000Z",
                "updated_at": "2021-11-07T15:18:52.000000Z"
            }
            

Get All ward with Street

  GET /api/v1/wards_with_streets

Get total Regions

  GET /api/v1/total_regions

sample response

{
   "total": 158
}

Get total Districts

  GET /api/v1/total_districts

sample response

{
   "total": 3321
}

Get total Wards

  GET /api/v1/total_wards

Get total Street

  GET /api/v1/total_streets

total district by region

  GET /api/v1/total_districts_by_region
Parameter Type Description
region string Required. region ID or name

total ward by district

  GET /api/v1/total_wards_by_district
Parameter Type Description
district string Required. ID or name

total street by ward

  GET /api/v1/total_streets_by_ward
Parameter Type Description
ward string Required. ID or name

mikoa-docs's People

Contributors

pro-cms avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

mikoa-docs's Issues

Can't parse the response in Json

SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 3228 of the JSON data,
response seems to have trailing 1 in raw data response.

//=>Raw Data Responses
[{"id":1,"name":"Shinyanga","code":"37","created_at":"2021-11-07T15:18:52.000000Z","updated_at":"2021-11-07T15:18:52.000000Z"},{"id":2,"name":"Mara","code":"31","created_at":"2021-11-07T15:19:00.000000Z","updated_at":"2021-11-07T15:19:00.000000Z"},{"id":3,"name":"Dar-es-salaam","code":"11","created_at":"2021-11-07T15:19:07.000000Z","updated_at":"2021-11-07T15:19:07.000000Z"},{"id":4,"name":"Kilimanjaro","code":"25","created_at":"2021-11-07T15:19:09.000000Z","updated_at":"2021-11-07T15:19:09.000000Z"},{"id":5,"name":"Kagera","code":"35","created_at":"2021-11-07T15:19:14.000000Z","updated_at":"2021-11-07T15:19:14.000000Z"},{"id":6,"name":"Tanga","code":"21","created_at":"2021-11-07T15:19:24.000000Z","updated_at":"2021-11-07T15:19:24.000000Z"},{"id":7,"name":"Mwanza","code":"33","created_at":"2021-11-07T15:19:35.000000Z","updated_at":"2021-11-07T15:19:35.000000Z"},{"id":8,"name":"Tabora","code":"45","created_at":"2021-11-07T15:19:44.000000Z","updated_at":"2021-11-07T15:19:44.000000Z"},{"id":9,"name":"Kigoma","code":"47","created_at":"2021-11-07T15:19:54.000000Z","updated_at":"2021-11-07T15:19:54.000000Z"},{"id":10,"name":"Pwani","code":"61","created_at":"2021-11-07T15:19:58.000000Z","updated_at":"2021-11-07T15:19:58.000000Z"},{"id":11,"name":"Ruvuma","code":"57","created_at":"2021-11-07T15:20:02.000000Z","updated_at":"2021-11-07T15:20:02.000000Z"},{"id":12,"name":"Mtwara","code":"63","created_at":"2021-11-07T15:20:11.000000Z","updated_at":"2021-11-07T15:20:11.000000Z"},{"id":13,"name":"Morogoro","code":"67","created_at":"2021-11-07T15:20:20.000000Z","updated_at":"2021-11-07T15:20:20.000000Z"},{"id":14,"name":"Rukwa","code":"55","created_at":"2021-11-07T15:20:29.000000Z","updated_at":"2021-11-07T15:20:29.000000Z"},{"id":15,"name":"Katavi","code":"50","created_at":"2021-11-07T15:20:35.000000Z","updated_at":"2021-11-07T15:20:35.000000Z"},{"id":16,"name":"Simiyu","code":"39","created_at":"2021-11-07T15:20:38.000000Z","updated_at":"2021-11-07T15:20:38.000000Z"},{"id":17,"name":"Geita","code":"30","created_at":"2021-11-07T15:20:44.000000Z","updated_at":"2021-11-07T15:20:44.000000Z"},{"id":18,"name":"Arusha","code":"23","created_at":"2021-11-07T15:20:50.000000Z","updated_at":"2021-11-07T15:20:50.000000Z"},{"id":19,"name":"Iringa","code":"51","created_at":"2021-11-07T15:20:54.000000Z","updated_at":"2021-11-07T15:20:54.000000Z"},{"id":20,"name":"Mbeya","code":"53","created_at":"2021-11-07T15:21:00.000000Z","updated_at":"2021-11-07T15:21:00.000000Z"},{"id":21,"name":"Njombe","code":"59","created_at":"2021-11-07T15:21:08.000000Z","updated_at":"2021-11-07T15:21:08.000000Z"},{"id":22,"name":"Manyara","code":"27","created_at":"2021-11-07T15:21:12.000000Z","updated_at":"2021-11-07T15:21:12.000000Z"},{"id":23,"name":"Lindi","code":"65","created_at":"2021-11-07T15:21:17.000000Z","updated_at":"2021-11-07T15:21:17.000000Z"},{"id":24,"name":"Singida","code":"43","created_at":"2021-11-07T15:21:24.000000Z","updated_at":"2021-11-07T15:21:24.000000Z"},{"id":25,"name":"Songwe","code":"54","created_at":"2021-11-07T15:21:29.000000Z","updated_at":"2021-11-07T15:21:29.000000Z"},{"id":26,"name":"Dodoma","code":"41","created_at":"2021-11-07T15:21:33.000000Z","updated_at":"2021-11-07T15:21:33.000000Z"}]1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.