Skip to content
Vivek Lingayat (VvkLingayat) edited this page May 7, 2018 · 10 revisions

Explore India, API' Doc

Domain

Explore India: https://ei.wevands.com

  • API's Response pattern

Success

Success indicated by "success": true, followed by "message": "...", "response": [{..},{..}].

Example:

{
    "success": true,
    "message": "...",
    "response": [
        {
            ...
        },
        {
            ...
        }
    ]
}

Error

Error's indicated by "success": false, followed by "message": "...".

Example:

{
    "success": false,
    "message": "Invalide Token or Request"
}
  • Constants

Status

Indicated by "..._status": 1 or 2 wherein 1 = false and 2 = true.

Example:

user_status = 1 //  that is user_status = inactive
user_status = 2 //  that is user_status = active

city_status = 1 // that is city_status = unverified
city_status = 2 // that is city_status = verified

place_status = 1 // that is place_status = unverified
place_status = 2 // that is place_status = verified

...

token (for development)

Token for development purpose is available in Slack channel #cp_eplore_india, or contact Mod's/Co. Mod's.

  • API's

Create User (Register user in EI server)

Url [ Method: POST ]: https://ei.wevands.com/api/v1.0.0/add_user.php (Right click and click on "Copy link ..")

PARAMS

param value type
[GET] token unique token id
[POST] first_name First Name
[POST] last_name Last Name
[POST] country_code Country Code (+91) for India
[POST] mobile Mobile number (10 digit)
[POST] firebase_db_id User id from firebase
[POST] firebase_token Firebase notification token

Response Example:

{
   "success": true,
   "message": "Success",
   "response": {
           "id": 1,
           "user_hash": "7ebd76c375082e7e48fc60b05fa93f4e"
       }
}

State's (All states in India)

Url [ Method: GET ]: https://ei.wevands.com/api/v1.0.0/states.php (Right click and click on "Copy link ..")

PARAMS

param value type
[GET] token unique token id

Response Example:

{
   "success": true,
   "message": "Success",
   "response": [
       {
           "state_id": "1",
           "state_name": "Andhra Pradesh",
           "state_code": "AP",
           "description": "Located at Belum Village in Kurnool district, Belum Caves, the second largest cave in the Indian subcontinent and the longest in the plains of India, was formed by the constant flow of underground water. This natural underground cave has long passages, spacious chambers, fresh water galleries and siphons.",
           "img": "https://ei.wevands.com/uploads/state_img_ap.jpg",
           "state_status": "2"
       },
       {
           ...
       },
       ...
   ]
}

Cities (All cities in particular state)

Url [ Method: GET ]: https://ei.wevands.com/api/v1.0.0/cities.php (Right click and click on "Copy link ..")

PARAMS

param value type
[GET] token unique token id
[GET] state_code 2 Char

Response Example:

{
   "success": true,
   "message": "Success",
   "response": [
       {
           "city_id": "14",
           "city_name": "Nagpur",
           "city_status": "1",
           "user_id": "12",
           "add_date": "2018-03-26 22:03:17"
       },
       {
           "city_id": "42",
           "city_name": "Nasik",
           "city_status": "1",
           "user_id": "43",
           "add_date": "2018-04-05 14:44:16"
       },
       {
           ...
       },
       ...
   ]
}

Places (All places in particular city)

Url [ Method: GET ]: https://ei.wevands.com/api/v1.0.0/places.php (Right click and click on "Copy link ..")

PARAMS

param value type
[GET] token unique token id
[GET] city_id Integer

Response Example:

{
   "success": true,
   "message": "Success",
   "response": [
       {
           "place_id": "1",
           "place_name": "Gateway Of India",
           "place_local_name": "Gateway Of India",
           "place_description": "Grand, Indo-Saracenic-style, 26m-tall triumphal stone arch, built on the waterfront in 1924.",
           "city_id": "1",
           "place_google_place_id": "ChIJve6TOcfR5zsROpFK1_uLjJ4",
           "place_type": "1",
           "place_add_by": "User demo",
           "place_add_date": "2018-03-04 14:50:47",
           "place_status": "1"
       },
       {
           "place_id": "7",
           "place_name": "Hanging Gardens of Mumbai",
           "place_local_name": "Hanging Garden",
           "place_description": "Terraced gardens perched at the top of Malabar Hills",
           "city_id": "1",
           "place_google_place_id": "ChIJn3Q-5QnO5zsRmouUzzMGp5Q",
           "place_type": "1",
           "place_add_by": "29",
           "place_add_date": "2018-04-04 23:06:34",
           "place_status": "1"
       },
       {
           ...
       },
       ...
   ]
}