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));import requests
url = "https://api.dcycle.io/v1/wastes/{waste_id}/detail"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/wastes/{waste_id}/detail \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"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 with enriched data
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));import requests
url = "https://api.dcycle.io/v1/wastes/{waste_id}/detail"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/wastes/{waste_id}/detail \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"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": {}
}← Wastes API
Retrieve a single waste record by ID with enriched data including CO2e emissions, user who created it, unit details, and linked projects.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faPath Parameters
string
required
UUID of the waste recordExample:
f47ac10b-58cc-4372-a567-0e02b2c3d479Response
string
Waste record UUID
string
Always
"wastes"string
Record status:
active, error, pendingnumber | null
Waste quantity after facility allocation, in the specified unit
number | null
Original waste quantity before facility allocation
number | null
Facility allocation percentage (0–1)
string | null
Waste stream identification name
string | null
Free-text description of the waste record
string | null
European Waste Catalogue (LER/LoW) code. See
List Waste Emission Factors for the full catalog of
LER and RD codes with their descriptions.
string | null
Recovery/disposal operation code, zero-padded to two digits (
D09, R03)number | null
Distance in km to the waste treatment center
string | null
Start date of the waste period (ISO 8601)
string | null
End date of the waste period (ISO 8601)
number | null
Calculated CO2 equivalent emissions in kg
number | null
CO2 equivalent biomass emissions in kg
string | null
UUID of the facility this waste belongs to
string | null
UUID of the user who created the record
string | null
Source waste UUID (if derived from a distributed waste record)
string | null
Same as
identification_name (kept for consistency with other modules)string | null
URL to download the linked file
string | null
UUID of the linked file
string | null
Name of the linked file
datetime
Timestamp when the record was created
datetime | null
Timestamp when the record was last updated
string | null
UUID of a custom emission factor, if applied
object | null
Custom emission factor details, if applied
array[string] | null
Error details when status is
errorobject | null
object | null
array[object]
Projects linked to this waste record
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}"
import requests
import os
response = requests.get(
f"https://api.dcycle.io/v1/wastes/{os.getenv('WASTE_ID')}/detail",
headers={
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
},
)
waste = response.json()
print(f"LER {waste['low_code']} / RD {waste['rd_code']}: {waste['co2e']} kg CO2e")
const axios = require('axios');
const response = await axios.get(
`https://api.dcycle.io/v1/wastes/${process.env.WASTE_ID}/detail`,
{
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
}
);
const w = response.data;
console.log(`LER ${w.low_code} / RD ${w.rd_code}: ${w.co2e} kg CO2e`);
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": "R03",
"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" }
Related Endpoints
List Wastes
Browse waste records
Update Waste
Modify a waste record
Was this page helpful?