Skip to main content

GET/POST /get_report_summary

Returns pre-aggregated rollups of waste activity for a date range, grouped by month, material, disposal type, and service type. Use this endpoint when you need totals and trends without downloading every individual service record — for example, monthly tonnage and emissions by material stream.

This endpoint has zero overlap with /get_report_data and is safe to adopt alongside it.

Parameters

Parameters may be supplied as query-string values (GET) or as a JSON body (POST). The required dates and optional filters are identical to /get_report_data.

ParameterTypeRequiredDescription
begin_datestring (YYYY-MM-DD)YesStart of the report period.
end_datestring (YYYY-MM-DD)YesEnd of the report period. Must be on or after begin_date; the window may not exceed 366 days.
account_idintegerNoFilter to one or more child accounts.
location_idintegerNoFilter to one or more locations.
materialstringNoFilter by waste stream, e.g. Trash, Single Stream, Organics.
service_typestringNoFilter by service type, e.g. Recurring, On Call.
disposal_typestringNoFilter by disposal method, e.g. Landfill, Recycle.

Filters behave exactly as they do on /get_report_data: single value or comma-separated list, combined with AND across dimensions.

Example request

GET https://wgpfapimprod.azure-api.net/api/get_report_summary?begin_date=2024-07-01&end_date=2024-09-30
Ocp-Apim-Subscription-Key: your-subscription-key

Response

{
"summary": [
{
"month": "2024-07",
"material": "Trash",
"disposal_type": "Landfill",
"service_type": "Recurring",
"record_count": 312,
"total_amount": 18240.50,
"total_weight_in_lbs": 892300.0,
"total_weight_in_tons": 446.15,
"total_emission_co2e": 235.42
}
],
"meta": {
"begin_date": "2024-07-01",
"end_date": "2024-09-30",
"generated_at": "2026-07-16T14:22:00Z"
}
}

summary[] fields

Each row is one (month, material, disposal_type, service_type) group.

FieldTypeDescription
monthstring (YYYY-MM)Calendar month of the grouped activity.
materialstringWaste stream for the group.
disposal_typestringDisposal method for the group (Landfill, Recycle).
service_typestringService type for the group (Recurring, On Call).
record_countintegerNumber of underlying service records in the group.
total_amountfloatSum of billed amounts (USD).
total_weight_in_lbsfloatSum of weight in pounds.
total_weight_in_tonsfloatSum of weight in US short tons.
total_emission_co2efloatSum of carbon emissions in metric tons CO₂e (EPA factors).

meta fields

FieldTypeDescription
begin_datestring (YYYY-MM-DD)The requested start date.
end_datestring (YYYY-MM-DD)The requested end date.
generated_atstring (ISO 8601 UTC)Timestamp when the summary was produced.

Errors

StatusCause
400Missing/invalid dates, end_date before begin_date, date window over 366 days, or an invalid filter value.
401Missing or invalid Ocp-Apim-Subscription-Key.
500Unexpected server error.