cowinapi / developer.cowin

This group is created to facilitate technical and integration discussions related to cowin platform. API related contents can be obtained at API setu portal https://apisetu.gov.in/public/marketplace/api/cowin
115 stars 30 forks source link

How to find district id ? #490

Closed siddharthbiju closed 3 years ago

siddharthbiju commented 3 years ago

​/v2​/appointment​/sessions​/public​/calendarByDistrict

big89 commented 3 years ago

You can get district list with district id using below API -

/v2/admin/location/districts/{state_id}

Thanks, Logicmaker

gourcool commented 3 years ago

Visit the following api -

https://cdn-api.co-vin.in/api/v2/admin/location/districts/[state_id]

In response you will get the districts with their id's like this -

{ "districts": [ { "state_id": 16, "district_id": 391, "district_name": "Ahmednagar", "district_name_l": "" } ], "ttl": 0 }

siddharthbiju commented 3 years ago

But how to get state ID ?

gourcool commented 3 years ago

Visit the following api -

https://cdn-api.co-vin.in/api/v2/admin/location/states

In response you will get the states with their id's like this -

{ "states": [ { "state_id": 58, "state_name": "Andaman and Nicobar Islands", "state_name_l": "" } ], "ttl": 0 }