Skip to main content
GET
/
v1
/
wastes
/
{waste_id}
/
detail
Get Waste
const options = {
  method: 'GET',
  headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};

fetch('https://api.dcycle.io/v1/wastes/{waste_id}/detail', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "<string>",
  "type": "<string>",
  "status": "<string>",
  "quantity": {},
  "base_quantity": {},
  "percentage": {},
  "identification_name": {},
  "description": {},
  "low_code": {},
  "rd_code": {},
  "total_km_to_waste_center": {},
  "start_date": {},
  "end_date": {},
  "co2e": {},
  "co2e_biomass": {},
  "facility_id": {},
  "uploaded_by": {},
  "source_invoice_id": {},
  "invoice_id": {},
  "file_url": {},
  "file_id": {},
  "file_name": {},
  "created_at": {},
  "updated_at": {},
  "custom_emission_factor_id": {},
  "custom_emission_factor": {},
  "error_messages": {},
  "unit": {
    "id": "<string>",
    "name": "<string>",
    "type": "<string>"
  },
  "user": {
    "id": "<string>",
    "first_name": {},
    "last_name": {},
    "email": "<string>",
    "prefix": {},
    "phone_number": {},
    "onboarding_done": true,
    "profile_img_url": {}
  },
  "linked_projects": {},
  "facility_percentages": {}
}

Get Waste

Retrieve a single waste record by ID with enriched data including CO2e emissions, user who created it, unit details, and linked projects.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

waste_id
string
required
UUID of the waste recordExample: f47ac10b-58cc-4372-a567-0e02b2c3d479

Response

id
string
Waste record UUID
type
string
Always "wastes"
status
string
Record status: active, error, pending
quantity
number | null
Waste quantity after facility allocation, in the specified unit
base_quantity
number | null
Original waste quantity before facility allocation
percentage
number | null
Facility allocation percentage (0–1)
identification_name
string | null
Waste stream identification name
description
string | null
Free-text description of the waste record
low_code
string | null
European Waste Catalogue (LER/LoW) code
rd_code
string | null
Recovery/disposal operation code
total_km_to_waste_center
number | null
Distance in km to the waste treatment center
start_date
string | null
Start date of the waste period (ISO 8601)
end_date
string | null
End date of the waste period (ISO 8601)
co2e
number | null
Calculated CO2 equivalent emissions in kg
co2e_biomass
number | null
CO2 equivalent biomass emissions in kg
facility_id
string | null
UUID of the facility this waste belongs to
uploaded_by
string | null
UUID of the user who created the record
source_invoice_id
string | null
Source waste UUID (if derived from a distributed waste record)
invoice_id
string | null
Same as identification_name (kept for consistency with other modules)
file_url
string | null
URL to download the linked file
file_id
string | null
UUID of the linked file
file_name
string | null
Name of the linked file
created_at
datetime
Timestamp when the record was created
updated_at
datetime | null
Timestamp when the record was last updated
custom_emission_factor_id
string | null
UUID of a custom emission factor, if applied
custom_emission_factor
object | null
Custom emission factor details, if applied
error_messages
array[string] | null
Error details when status is error
unit
object | null
Unit of measurement
user
object | null
User who created the record
linked_projects
array[object]
Projects linked to this waste record
facility_percentages
array[object]
Facility percentage allocations (for distributed waste records)

Example

curl "https://api.dcycle.io/v1/wastes/${WASTE_ID}/detail" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"

Successful Response

{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "type": "wastes",
  "status": "active",
  "quantity": 1250.5,
  "base_quantity": 1250.5,
  "percentage": null,
  "identification_name": "Paper & Cardboard",
  "description": null,
  "low_code": "200101",
  "rd_code": "R3",
  "total_km_to_waste_center": 45.0,
  "start_date": "2025-01-01",
  "end_date": "2025-03-31",
  "co2e": 26.26,
  "co2e_biomass": 0,
  "facility_id": "660e8400-e29b-41d4-a716-446655440000",
  "uploaded_by": "990e8400-e29b-41d4-a716-446655440000",
  "source_invoice_id": null,
  "invoice_id": "Paper & Cardboard",
  "file_url": null,
  "file_id": null,
  "file_name": null,
  "created_at": "2025-02-01T10:30:00Z",
  "updated_at": "2025-02-15T14:20:00Z",
  "custom_emission_factor_id": null,
  "custom_emission_factor": null,
  "error_messages": null,
  "unit": {
    "id": "ba80e6cb-86a4-4bb1-a0c5-8104365d523c",
    "name": "kg",
    "type": "weight"
  },
  "user": {
    "id": "990e8400-e29b-41d4-a716-446655440000",
    "first_name": "Ana",
    "last_name": "Garcia",
    "email": "ana.garcia@example.com",
    "prefix": null,
    "phone_number": null,
    "onboarding_done": true,
    "profile_img_url": null
  },
  "linked_projects": [],
  "facility_percentages": []
}

Common Errors

404 Not Found

Cause: Waste record does not exist or does not belong to your organization
{ "detail": "Waste not found" }

List Wastes

Browse waste records

Update Waste

Modify a waste record