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

Use `available_capacity_dose1` for reporting available capacity #244

Open xsreality opened 3 years ago

xsreality commented 3 years ago

As per analysis of the CoWIN website, it seems available_capacity_dose1 is being used to show the numbers in the UI. The old field available_capacity is ignored. The field available_capacity_dose2 is also completely ignored. So rely on dose1 field until further changes are made in the API.

ajendrana commented 3 years ago

available_capacity is used as the total count of vaccine to be displayed on UI. But for booking they are using available_capacity_dose 1 or 2 ... depending on the previous status of your booking. So that all new user and existing user who have taken 1st dose gets equal chance for booking. As per analysis..

sidpagariya commented 3 years ago

Also would like to highlight the likely UI bug mentioned in #227 with this field change

xsreality commented 3 years ago

@ajendrana Indeed. Although available_capacity does not always seem to be sum of dose1+2. It also seems to be not updated and remains non-zero even when dose1+2 are exhausted.

ts1506 commented 3 years ago

+1 to this. Additionally, seems like cancelled slots are queueing up on available_capacity, but no change to dose1/dose2 figures.

Cowin website is displaying figures from available_capacity on the non-authenticated search, and dose1 / dose2 on the logged-in booking UI. On the other hand, Aarogya Setu's UI is even more confusing. It reports available_capacity data on the scheduling page, however, booking always fails (presumably because its trying to use the dose1 data in background).

rohandhamapurkar commented 3 years ago

The new changes has brought some bugs I hope they fix all these issues soon. I read a few threads they are aware of these bugs we will all have to wait patiently until they resolve all of them.

manigameon commented 3 years ago

Correct: Total dose count does not match with sum of dose1 and dose2 capacity and displaying inaccurate data. Waiting for issue to get resolved.

xsreality commented 3 years ago

One of the users of my bot informed me that they were getting the same notification non-stop. In this case, the total capacity was zero, dose1 was non-zero and dose2 was zero. In the UI it showed the dose1 value (for beneficiary looking for first dose) but clicking on it did not trigger booking. I have updated the logic to send notifications only when TC=dose1+dose2 and one of dose1,dose2 is non-zero. But this seems to be trying to aim at a moving target. It would be nice if the API docs are updated to indicate the desired behaviour of these fields.