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

Unable to book cancelled slots #224

Open raykstar opened 3 years ago

raykstar commented 3 years ago

I think there was some logic change pushed on 15th May at around 9pm segregating 1st doses and 2nd doses. As a result of this, the slots there were released prior to this change cannot be booked anymore.

{"center_id":696212,"name":"Abhayacaran Pat(State Covaxin)","address":"788001","state_name":"Assam","district_name":"Cachar","block_name":"Silchar Urban","pincode":788001,"lat":24,"long":92,"from":"09:00:00","to":"16:00:00","fee_type":"Free","sessions":[{"session_id":"4b2777a4-41a9-47eb-a683-cabb5112f301","date":"17-05-2021","available_capacity":1,"min_age_limit":18,"vaccine":"COVAXIN","slots":["09:00AM-11:00AM","11:00AM-01:00PM","01:00PM-03:00PM","03:00PM-04:00PM"],"available_capacity_dose1":0,"available_capacity_dose2":0}

The available capacity is 1 (this is reflected in the homepage as well), but this slot cannot be booked for either 1st dose or a 2nd dose.

rohandhamapurkar commented 3 years ago

As you can see in the response that you have pasted "available_capacity_dose1" and "available_capacity_dose2" are both 0 if you refer to #226 here the same issue is being raised where all the available capacity data is inconsistent with the "available_capacity".

raykstar commented 3 years ago

I am aware of the fact that the data is inconsistent. Here, the issue is regarding cancelling slots that were released prior to the recent dose1-dose2 segregation change. When a slot is cancelled, it is correctly reflected in the available_capacity field. However, one cannot re-book this slot as neither dose1 nor dose2 fields are getting updated and the slot booking is now getting filtered using those two fields. This results in wastage of slots.

Kanchangk commented 3 years ago

The issue was with new relase of dose 1 and dose 2. The API response got changed and hence the data seemed to be inconsistent. Seems like I am able to get the correct data now after modifications in response receive code.