Wrong dates for some bins - Fixed offset calculations dont work for every address #1061
Open
4 tasks done
Labels
bug
Something isn't working
Name of Council
Cheltenham Borough Council
Issue Information
Not all postcodes follow the same pattern for bin collection days as the example originally given. As such, the fixed offset calculations which work for the example address do not work for all addresses.
Examples of a few patterns of collection dates below, including original example.
GL51 3NA (Original example)
GL53 8JL
GL52 3JB
Possible fix
The following sequence of API calls would return the schedule for an address.
Request session ID
https://maps.cheltenham.gov.uk/map/Aurora.svc/RequestSession?userName=guest+CBC&password=&script=%5CAurora%5CCBC+Waste+Streets.AuroraScript%24
Returns JSON with SessionID inside Session object
Request tasks
https://maps.cheltenham.gov.uk/map/Aurora.svc/GetWorkflow?sessionId=<session_id>&workflowId=wastestreet
Returns JSON of Tasks, including task of type
StatMap.Aurora.FetchResultSetTask, StatMapService
. The ID field from here is required later.Find address
Find location ID + X/Y coords from postcode/house number
https://maps.cheltenham.gov.uk/map/Aurora.svc/FindLocation?sessionId=<session_id>&address=<postcode>&limit=1
You can optionally set the
locationId
to a specific location ID from the response JSON to confirm a specific address.The above would return the following JSON
Get details for address
This is where you need the task ID from the workflow query above. Also the X and Y from the response to the previous call
https://maps.cheltenham.gov.uk/map/Aurora.svc/ExecuteTaskJob?sessionId=<session_id>&taskId=<task_id>&job=%7B%22QueryX%22:<x_coord>,%22QueryY%22:<y_coord>%7D
This returns a large JSON with all the result details in.
Collection date details are under
AlphabeticalExportSet
->ResultSet
->Tables
.Details are split between
ColumnDefinitions
andRecords
.ResolvedRecords
appears to contain the compiled text which is pushed into the web view. There is a USRN in here, but no UPRN. There are house numbers here for verification. This contains the Week-1/Week-2 dates for the address, along with which day of week that addresses bins get collected.Verification
The text was updated successfully, but these errors were encountered: