Skip to content

Conversation

@me-processware
Copy link

Fix HVC Garbage Collection API

Problem

HVC garbage collection stopped working due to API changes:

  • API moved from apps.hvcgroep.nl to inzamelkalender.hvcgroep.nl
  • Response format changed from single object to array
  • Field name changed from 'bagid' to 'bagId'
  • HTTPS/SSL issues in Docker environments with file_get_contents()

Solution

  • Updated API endpoints
  • Added proper array handling
  • Fixed field name references
  • Implemented cURL fallback for HTTPS compatibility
  • Added debug logging

Testing

Tested with address in Emmeloord, successfully retrieves:

  • gft & etensresten (2025-09-19)
  • restafval (2025-09-26)
  • plastic, blik & drinkpakken (2025-10-10)
  • papier en karton (2025-10-13)

Works with both service=hvc and service=afvalstromen&sub=hvc

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

Successfully merging this pull request may close these issues.

1 participant