In this article:
- Get Waste Schedule
- Get Waste Schedules by Service ID
- Get Waste Schedules by Service Name
- Get Waste Schedules for Address
- Get Waste Schedules for Address by External ID
- Add Waste Schedules to Address
- Add Waste Schedules to Address by External ID
- Remove Waste Schedules from Address
- Remove Waste Schedules from Address by External ID
- Save Waste Schedule
- Update Waste Service
- Delete Waste Service
Get Waste Schedule
Endpoint: GET /MyArea/GetWasteSchedule
Authentication: None required
Description: Get a specific waste schedule by OpenCities ID or API Alias.
Parameters
| Parameter | Type | Required | Description |
| scheduleId | string | No | The schedule ID |
| apiAlias | string | No | The API alias |
Sample Request
curl -H "Content-Type: application/json" \ "https://your-domain.com/api/v1/MyArea/GetWasteSchedule?scheduleId=123e4567-e89b-12d3-a456-426614174000"
Get Waste Schedules by Service ID
Endpoint: GET /MyArea/GetWasteSchedulesByServiceId
Authentication: None required
Description: Get the schedules for a specific service identified by ID.
Parameters
| Parameter | Type | Required | Description |
| serviceId | string | Yes | The service ID |
Get Waste Schedules by Service Name
Endpoint: GET /MyArea/GetWasteSchedulesByServiceName
Authentication: None required
Description: Get the schedules for a specific service identified by name.
Parameters
| Parameter | Type | Required | Description |
| serviceName | string | Yes | The service name |
Get Waste Schedules for Address
Endpoint: GET /MyArea/GetWasteSchedulesForAddress
Authentication: None required
Description: Get detailed waste schedules for a specific address by OpenCities ID.
Parameters
| Parameter | Type | Required | Description |
| addressID | string | Yes | The address ID |
Get Waste Schedules for Address by External ID
Endpoint: GET /MyArea/GetWasteSchedulesForAddressByExternalId
Authentication: None required
Description: Get detailed waste schedules for a specific address by external ID.
Parameters
| Parameter | Type | Required | Description |
| externalID | string | Yes | The external address ID |
Add Waste Schedules to Address
Endpoint: POST /MyArea/AddWasteSchedulesToAddress
Authentication: Required
Description: Add waste schedules to a specific address and optionally remove any existing schedules.
Parameters
| Parameter | Type | Required | Description |
| addressID | String (UUID) | Yes | The OpenCities ID for the address |
| replaceExisting | Boolean | No | When set to true, all schedules will be removed from the address before adding the schedules described in the 'schedules' parameter |
| schedule | array<string> | Yes | An array of Schedules identified by API Alias or OpenCities ID |
Sample Request
curl -u "your_app_id:your_api_key" \ -X POST \ "https://your-domain.com/api/v1/MyArea/AddWasteSchedulesToAddress?addressId=cb9e3bd6-34b2-4f9f-85d2-9ddcf3d7a05c
-d '["generalWasteZone1"]'
Add Waste Schedules to Address by External ID
Endpoint: POST /MyArea/AddWasteSchedulesToAddressByExternalId
Authentication: Required
Description: Add waste schedules to a specific address by external ID.
Parameters
| Parameter | Type | Required | Description |
| externalID | String | Yes | The external ID for the address |
| replaceExisting | Boolean | No | When set to true, all schedules will be removed from the address before adding the schedules described in the 'schedules' parameter |
| schedule | array<string> | Yes | An array of Schedules identified by API Alias or OpenCities ID |
Remove Waste Schedules from Address
Endpoint: POST /MyArea/RemoveWasteSchedulesFromAddress
Authentication: Required
Description: Remove a waste schedule from a specific address by OpenCities ID.
Parameters
| Parameter | Type | Required | Description |
| addressID | String (UUID) | Yes | The OpenCities ID for the address |
| schedule | array<string> | Yes | An array of Schedules identified by API Alias or OpenCities ID |
Remove Waste Schedules from Address by External ID
Endpoint: POST /MyArea/RemoveWasteSchedulesFromAddressByExternalId
Authentication: Required
Description: Remove a waste schedule from a specific address by external ID.
Parameters
| Parameter | Type | Required | Description |
| externalID | String | Yes | The external ID for the address |
| schedule | array<string> | Yes | An array of Schedules identified by API Alias or OpenCities ID |
Save Waste Schedule
Endpoint: POST /MyArea/SaveWasteSchedule
Authentication: Required
Description: Saves a waste schedule to the system. Updates if it exists, creates if it doesn't.
Parameters
| Parameter | Type | Required | Description |
| schedule | object | Yes | The waste schedule as JSON in request body |
Create Waste Schedule
Endpoint: POST /MyArea/CreateWasteSchedule
Authentication: Required
Description: Creates a waste schedule in the system. Returns error if ApiAlias already exists.
Parameters
| Parameter | Type | Required | Description |
| schedule | object | Yes | The waste schedule as JSON in request body |
Update Waste Schedule
Endpoint: POST /MyArea/UpdateWasteSchedule
Authentication: Required
Description: Updates an existing waste schedule. Returns error if schedule not found.
Parameters
| Parameter | Type | Required | Description |
| schedule | object | Yes | The waste schedule as JSON in request body |
Delete Waste Schedule
Endpoint: DELETE /MyArea/DeleteWasteSchedule
Authentication: Required
Description: Delete a specific schedule identified by scheduled.
Parameters
| Parameter | Type | Required | Description |
| scheduleId | string | Yes | The schedule ID to delete |
Sample Request
curl -X 'DELETE' \ 'https://your-domain.com/api/v1/MyArea/DeleteWasteSchedule?scheduleId=96d1df71-b2de-d48c-4843-445c17443f04' \ -H 'accept: application/json' \Get Waste Service by Name
Endpoint: GET /MyArea/GetWasteServiceByName
Authentication: None required
Description: Get a specific waste service by name.
Parameters
| Parameter | Type | Required | Description |
| serviceName | string | Yes | The service name |
Get All Waste Services
Endpoint: GET /MyArea/GetWasteServices
Authentication: None required
Description: Gets an array of all waste services in the system.
Sample Request
curl -H "Content-Type: application/json" \ "https://your-domain.com/api/v1/MyArea/GetWasteServices"
Save Waste Service
Endpoint: POST /MyArea/SaveWasteService
Authentication: Required
Description: Saves a waste service to the system. Updates if it exists, creates if it doesn't.
Update Waste Service
Endpoint: POST /MyArea/UpdateWasteService
Authentication: Required
Description: Updates a waste service in the system. Returns error if service not found.
Delete Waste Service
Endpoint: DELETE /MyArea/DeleteWasteService
Authentication: Required
Description: Delete a specific waste service identified by serviceId.
Parameters
| Parameter | Type | Required | Description |
| serviceId | String (UUID) | Yes | The service ID to delete |