GET/POST /get_report_data
Retrieves individual waste-service records for a date range — one row per service event at a location. This is the primary detail endpoint. It supports optional dimension filters and opt-in keyset pagination.
Parameters
Parameters may be supplied as query-string values (GET) or as a JSON body (POST).
| Parameter | Type | Required | Description |
|---|---|---|---|
begin_date | string (YYYY-MM-DD) | Yes | Start of the report period. |
end_date | string (YYYY-MM-DD) | Yes | End of the report period. Must be on or after begin_date; the window may not exceed 366 days. |
account_id | integer | No | Filter to one or more child accounts. |
location_id | integer | No | Filter to one or more locations. |
material | string | No | Filter by waste stream, e.g. Trash, Single Stream, Organics. |
service_type | string | No | Filter by service type, e.g. Recurring, On Call. |
disposal_type | string | No | Filter by disposal method, e.g. Landfill, Recycle. |
page_size | integer | No | Enables paginated responses. Default 100, maximum 1000. |
cursor | string | No | Opaque token for fetching the next page (see Pagination). |
Any filter accepts a single value or a comma-separated list (expanded to an IN match).
Unknown parameters are ignored.
Response shapes
The response shape depends on whether page_size is supplied.
Without page_size — bare array (backward compatible)
When page_size is absent, the endpoint returns a bare JSON array of records — identical to
the original API behaviour. Existing integrations that pass neither page_size nor cursor
receive exactly what they always received.
[
{
"parent_account_name": "Acme Healthcare Systems",
"parent_account_id": 1045,
"account_name": "Acme Surgery Center",
"account_id": 3203,
"location_name": "5621 CA089 Valley Surgical Center",
"location_id": 15424,
"service_date_details": "2024-07-15",
"material": "Trash",
"disposal_type": "Landfill",
"amount": 460.26,
"weight_in_lbs": 19052.0,
"weight_in_tons": 9.526,
"total_emission": 5.0284871952
}
]
Each object contains 28 fields — see the Response Fields reference for the complete list.
With page_size — paginated envelope
When page_size is present, records are wrapped in a data / paging envelope:
{
"data": [ /* array of records, same 28-field shape as above */ ],
"paging": {
"page_size": 100,
"returned": 100,
"has_more": true,
"next_cursor": "MjAyNC0wNy0xNXwxNTQyNHwxNDI1Njky"
}
}
paging field | Meaning |
|---|---|
page_size | The effective page size (after clamping to [1, 1000]). |
returned | Number of records in this page. |
has_more | true when another page may exist. |
next_cursor | Token to pass as cursor for the next page; null when has_more is false. |
Filtering
Filters narrow the result set on any combination of the supported dimensions. Combine them freely; they are ANDed together.
Single value:
GET /get_report_data?begin_date=2024-07-01&end_date=2024-07-31&material=Trash&disposal_type=Landfill
Multiple values on one dimension (comma-separated, matched with IN):
GET /get_report_data?begin_date=2024-07-01&end_date=2024-07-31&material=Trash,Single%20Stream
Restrict to specific locations:
GET /get_report_data?begin_date=2024-07-01&end_date=2024-07-31&location_id=15424,15425
Filters apply in both the bare-array and paginated response shapes.
Pagination
Pagination is opt-in and uses stable keyset (cursor) paging — reliable even while new records are being written.
-
Request the first page with a
page_size:GET /get_report_data?begin_date=2024-07-01&end_date=2024-09-30&page_size=500 -
Read
paging.has_more. Iftrue, request the next page by passingpaging.next_cursorback ascursor(keep all other parameters identical):GET /get_report_data?begin_date=2024-07-01&end_date=2024-09-30&page_size=500&cursor=MjAyNC0wNy0xNXwxNTQyNHwxNDI1Njky -
Repeat until
paging.has_moreisfalse. At that pointnext_cursorisnulland all records for the range have been returned.
The cursor is an opaque token — do not parse or construct it yourself. Always echo back the
exact next_cursor value from the previous page.
Errors
| Status | Cause |
|---|---|
400 | Missing/invalid begin_date or end_date, end_date before begin_date, date window over 366 days, an invalid filter value, or an invalid cursor. |
401 | Missing or invalid Ocp-Apim-Subscription-Key. |
500 | Unexpected server error. |