Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kindly add booking by center ID directly #216

Open
rshnGhost opened this issue May 25, 2021 · 5 comments
Open

Kindly add booking by center ID directly #216

rshnGhost opened this issue May 25, 2021 · 5 comments

Comments

@rshnGhost
Copy link

(https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByCenter?center_id={centerID}&date={date})
using above url provid a booking option for particular "center ID" directly
@pallupz

cowinID1

@pallupz
Copy link
Owner

pallupz commented May 26, 2021

I wanted to but most people wont know the center ID, right? I hadn't seen an API to list centers or get their IDs

@rshnGhost
Copy link
Author

@pallupz
while user selects option pincode, prompt for option to book by center id, so now there will given list of centers in that picodes along is center name.

I am asking for this option because center in one pincodes is located with 3-5kilometers, during lockdown its hard to travel.
kindly look in to it.
thanku

@pallupz
Copy link
Owner

pallupz commented May 28, 2021

that is a good idea. Problem is where to get this part:

list of centers in that pincodes

@rshnGhost
Copy link
Author

@pallupz

when we get on below link, which is used for find by pincode and date

https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/findByPin?pincode=110011&date=29-05-2021

we get response as

{
  "sessions": [
    {
      "center_id": **624711**,
      "name": "Naval Medical Center INS India",
      "address": "Dara Shukoh Road New Delhi",
      "state_name": "Delhi",
      "district_name": "New Delhi",
      "block_name": "Not Applicable",
      "pincode": 110011,
      "from": "09:00:00",
      "to": "17:00:00",
      "lat": 28,
      "long": 77,
      "fee_type": "Free",
      "session_id": "d0ed0de1-ae90-4616-85ca-57b7def5e76a",
      "date": "29-05-2021",
      "available_capacity_dose1": 0,
      "available_capacity_dose2": 0,
      "available_capacity": 0,
      "fee": "0",
      "min_age_limit": 45,
      "vaccine": "COVISHIELD",
      "slots": [
        "09:00AM-11:00AM",
        "11:00AM-01:00PM",
        "01:00PM-03:00PM",
        "03:00PM-05:00PM"
      ]
    }
  ]
}

so filter by

centerId = sessions[center_id]

@rshnGhost
Copy link
Author

rshnGhost commented May 29, 2021

@pallupz

same with get request on findByDistrict

https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/findByDistrict?district_id=512&date=31-03-2021

we get response as..

{
  "sessions": [
    {
      "center_id": 605499,
      "name": "PHC NANGI BALHEER",
      "address": "",
      "state_name": "Rajasthan",
      "district_name": "Alwar",
      "block_name": "Shahjahanpur",
      "pincode": 301703,
      "from": "09:00:00",
      "to": "17:00:00",
      "lat": 27.56093,
      "long": 76.62502,
      "fee_type": "Free",
      "session_id": "c67953da-d9ce-4e56-9c97-4b2f96a49e79",
      "date": "31-03-2021",
      "available_capacity_dose1": 0,
      "available_capacity_dose2": 0,
      "available_capacity": 100,
      "fee": "0",
      "min_age_limit": 45,
      "vaccine": "COVISHIELD",
      "slots": [
        "09:00AM-11:00AM",
        "11:00AM-01:00PM",
        "01:00PM-03:00PM",
        "03:00PM-05:00PM"
      ]
    }
  ]
}

so filter by

centerId = sessions[center_id]

mrms123 pushed a commit to mrms123/covid-vaccine-booking that referenced this issue Jun 4, 2021
Selecting better center for higher chances of booking in one pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants