Overview
Retrieves a paginated list of invoices for your organization. Use query parameters to filter by type, status, facility, and date range.
Query Parameters
Filter by invoice type. Can include multiple values. Allowed values: heat, electricity, water, rechargeExample: ?type[]=electricity&type[]=heat
Filter by invoice status. Can include multiple values. Allowed values: uploaded, loading, active, inactive, review, errorExample: ?status[]=active&status[]=review
Filter by facility IDs. Can include multiple values. Example: ?facility_id[]=550e8400-e29b-41d4-a716-446655440000
Filter invoices starting on or after this date (YYYY-MM-DD format). Example: ?start_date=2024-01-01
Filter invoices ending on or before this date (YYYY-MM-DD format). Example: ?end_date=2024-12-31
Filter by whether emissions have been calculated. Allowed values: calculated, not_calculated
Partial, case-insensitive match against the invoice number. Example: ?invoice_id=INV-2024
Filter by one or more CUPS codes. Example: ?cups[]=ES0021000000000001XX
Filter by one or more supplier IDs.
Filter by one or more facility fuel IDs.
Filter by the IDs of users who uploaded the invoice.
Filter by invoice creation source. Known values: manual, pdf, bulk_file, datadis. Sending
manual also matches invoices where source is NULL (legacy rows
written before explicit source tracking).
Filter invoices uploaded on or after this date (YYYY-MM-DD format).
Filter invoices uploaded on or before this date (YYYY-MM-DD format).
Filter by stationary fuel IDs (natural gas, diesel, biomass, …). Relevant
for heat invoices.
Filter by one or more supply contract IDs.
Field to sort by. Prefix with - for descending order. Allowed values: start_date, end_date, created_at, quantity, invoice_idExample: ?sort=-start_date
Page number for pagination.
Number of items per page (max 100).
Response
List of invoice objects. Show Invoice object properties
Unique identifier for the invoice.
Invoice type: heat, electricity, water, or recharge.
Current status of the invoice.
Billing period start date.
Invoice number from the utility provider.
Calculated CO2 equivalent emissions (kg).
Total energy consumption in kWh. Only returned for electricity and heat invoices. May be null if the energy calculation has not completed yet.
CUPS code (for Spanish electricity).
When the invoice was created.
When the invoice was last updated.
Total number of invoices matching the filters.
Number of items per page.
curl -X GET "https://api.dcycle.io/v1/invoices?type[]=electricity&status[]=active&page=1&size=20" \
-H "x-organization-id: YOUR_ORGANIZATION_ID" \
-H "x-api-key: YOUR_API_KEY"
200 - Success
401 - Unauthorized
{
"items" : [
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"type" : "electricity" ,
"status" : "active" ,
"quantity" : 1500.00 ,
"unit_id" : "ba80e6cb-86a4-4bb1-a0c5-8104365d523c" ,
"start_date" : "2024-01-01T00:00:00" ,
"end_date" : "2024-01-31T23:59:59" ,
"invoice_id" : "INV-2024-001" ,
"facility_id" : "660e8400-e29b-41d4-a716-446655440000" ,
"supplier_id" : "770e8400-e29b-41d4-a716-446655440000" ,
"co2e" : 245.5 ,
"total_energy_kwh" : 1500.00 ,
"cups" : "ES0021000000000001XX" ,
"created_at" : "2024-02-01T10:30:00Z" ,
"updated_at" : "2024-02-01T10:30:00Z"
}
],
"total" : 1 ,
"page" : 1 ,
"size" : 20 ,
"pages" : 1
}