Skip to main content
GET
https://api.dcycle.io
/
v1
/
invoices
/
{invoice_id}
curl -X GET "https://api.dcycle.io/v1/invoices/550e8400-e29b-41d4-a716-446655440000" \
  -H "x-organization-id: YOUR_ORGANIZATION_ID" \
  -H "x-api-key: YOUR_API_KEY"
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "type": "electricity",
  "status": "active",
  "quantity": 1500.00,
  "base_quantity": 3000.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",
  "facility_fuel_id": null,
  "supplier_id": "770e8400-e29b-41d4-a716-446655440000",
  "custom_emission_factor_id": null,
  "co2e": 245.5,
  "co2e_biomass": 0,
  "cups": "ES0021000000000001XX",
  "file_id": "880e8400-e29b-41d4-a716-446655440000",
  "file_url": "https://storage.dcycle.io/invoices/invoice-2024-001.pdf",
  "uploaded_by": "990e8400-e29b-41d4-a716-446655440000",
  "percentage": 0.5,
  "enabled": true,
  "created_at": "2024-02-01T10:30:00Z",
  "updated_at": "2024-02-01T10:30:00Z"
}

Overview

Retrieves detailed information about a specific invoice. This includes all invoice attributes including emissions data and facility allocation details.

Path Parameters

invoice_id
UUID
required
The unique identifier of the invoice.Example: 550e8400-e29b-41d4-a716-446655440000

Response

id
UUID
Unique identifier for the invoice.
type
string
Invoice type: heat, electricity, water, or recharge.
status
string
Current status: uploaded, loading, active, inactive, review, or error.
quantity
float
Consumption amount after facility allocation.
base_quantity
float
Original consumption amount before facility allocation.
unit_id
UUID
Unit of measurement ID.
start_date
datetime
Billing period start date.
end_date
datetime
Billing period end date.
invoice_id
string
Invoice number from the utility provider.
facility_id
UUID
Associated facility ID.
facility_fuel_id
UUID
Fuel type ID (for combustion invoices).
supplier_id
UUID
Energy supplier ID.
custom_emission_factor_id
UUID
Custom emission factor ID (if applicable).
co2e
float
Calculated CO2 equivalent emissions (kg).
co2e_biomass
float
CO2e from biomass sources (kg).
cups
string
CUPS code (for Spanish electricity).
file_id
UUID
Linked file/document ID.
file_url
string
URL to download the linked file.
uploaded_by
UUID
User ID who uploaded the invoice.
percentage
float
Facility allocation percentage (0-1).
enabled
boolean
Whether the invoice is enabled.
created_at
datetime
When the invoice was created.
updated_at
datetime
When the invoice was last updated.
curl -X GET "https://api.dcycle.io/v1/invoices/550e8400-e29b-41d4-a716-446655440000" \
  -H "x-organization-id: YOUR_ORGANIZATION_ID" \
  -H "x-api-key: YOUR_API_KEY"
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "type": "electricity",
  "status": "active",
  "quantity": 1500.00,
  "base_quantity": 3000.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",
  "facility_fuel_id": null,
  "supplier_id": "770e8400-e29b-41d4-a716-446655440000",
  "custom_emission_factor_id": null,
  "co2e": 245.5,
  "co2e_biomass": 0,
  "cups": "ES0021000000000001XX",
  "file_id": "880e8400-e29b-41d4-a716-446655440000",
  "file_url": "https://storage.dcycle.io/invoices/invoice-2024-001.pdf",
  "uploaded_by": "990e8400-e29b-41d4-a716-446655440000",
  "percentage": 0.5,
  "enabled": true,
  "created_at": "2024-02-01T10:30:00Z",
  "updated_at": "2024-02-01T10:30:00Z"
}