Get Waste Water Treatment by ID
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/waste-water-treatments/{wwt_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/waste-water-treatments/{wwt_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/waste-water-treatments/{wwt_id}/detail \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "<string>",
"type": "<string>",
"status": "<string>",
"invoice_id": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"facility_id": {},
"quantity": 123,
"base_quantity": 123,
"m3_water_out": 123,
"kg_sludge": 123,
"percentage": 123,
"co2e": {},
"co2e_biomass": 123,
"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": {}
},
"uploaded_by": {},
"source_invoice_id": "<string>",
"file_url": {},
"linked_projects": {},
"facility_percentages": {},
"created_at": {}
}Get Waste Water Treatment by ID
Retrieve a single waste water treatment record by its UUID with enriched data
GET
/
v1
/
waste-water-treatments
/
{wwt_id}
/
detail
Get Waste Water Treatment by ID
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/waste-water-treatments/{wwt_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/waste-water-treatments/{wwt_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/waste-water-treatments/{wwt_id}/detail \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "<string>",
"type": "<string>",
"status": "<string>",
"invoice_id": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"facility_id": {},
"quantity": 123,
"base_quantity": 123,
"m3_water_out": 123,
"kg_sludge": 123,
"percentage": 123,
"co2e": {},
"co2e_biomass": 123,
"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": {}
},
"uploaded_by": {},
"source_invoice_id": "<string>",
"file_url": {},
"linked_projects": {},
"facility_percentages": {},
"created_at": {}
}Retrieve a single waste water treatment (WWT) record with enriched data: CO2e emissions, the user who uploaded it, and any linked projects. Useful to inspect a specific record before deleting or auditing it.
Solution: Verify your API key is valid and active.
Solution: Verify the
Solution: Check the
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 water treatment recordExample:
550e8400-e29b-41d4-a716-446655440000Response
string
Unique identifier (UUID) for the WWT record. Use this as
waste_water_treatment_id in DELETE /api/v1/waste_water_treatments/{id}.string
Always
"waste_water_treatment"string
Processing status:
uploaded, active, loading, or errorstring
Identification name or invoice number of the WWT record
date
Start date of the treatment period
date
End date of the treatment period
string | null
UUID of the facility this WWT belongs to
number
Volume of water entering treatment, in m³
number
Volume of water exiting treatment, in m³
number
Same as
base_quantity — water output volume in m³number
Mass of sludge produced, in kg
number
Percentage factor (always
1 for WWT records)number | null
CO2 equivalent emissions in kg CO2e. Populated asynchronously after record activation.
number
Biogenic CO2 emissions in kg CO2e
object
object | null
string | null
UUID of the user who created the record
string
Internal source record UUID (matches
id for WWT records)string | null
Download URL for any linked import file
array[object]
Projects this WWT record is linked to
array[object]
Facility distribution breakdown (always empty for WWT records)
datetime
Timestamp when the record was created
Example
curl -X GET "https://api.dcycle.io/v1/waste-water-treatments/550e8400-e29b-41d4-a716-446655440000/detail" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import requests
import os
headers = {
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
}
wwt_id = "550e8400-e29b-41d4-a716-446655440000"
response = requests.get(
f"https://api.dcycle.io/v1/waste-water-treatments/{wwt_id}/detail",
headers=headers,
)
wwt = response.json()
print(f"{wwt['invoice_id']}: {wwt['co2e']} kg CO2e")
const axios = require('axios');
const headers = {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
};
const wwtId = '550e8400-e29b-41d4-a716-446655440000';
axios.get(`https://api.dcycle.io/v1/waste-water-treatments/${wwtId}/detail`, { headers })
.then(response => {
const wwt = response.data;
console.log(`${wwt.invoice_id}: ${wwt.co2e} kg CO2e`);
});
Successful Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "waste_water_treatment",
"status": "active",
"invoice_id": "WWT-2025-001",
"start_date": "2025-01-01",
"end_date": "2025-01-31",
"facility_id": "660e8400-e29b-41d4-a716-446655440000",
"quantity": 12500.0,
"base_quantity": 12000.0,
"m3_water_out": 12000.0,
"kg_sludge": 850.0,
"percentage": 1,
"co2e": 4521.3,
"co2e_biomass": 0.0,
"unit": {
"id": "987190d0-8ed9-4234-bceb-ab683761a7fe",
"name": "cubic_metre_(m3)_total",
"type": "waste_water_treatments_flow_total"
},
"user": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"first_name": "Ana",
"last_name": "García",
"email": "ana.garcia@company.com",
"prefix": null,
"phone_number": null,
"onboarding_done": true,
"profile_img_url": null
},
"uploaded_by": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"source_invoice_id": "550e8400-e29b-41d4-a716-446655440000",
"file_url": null,
"linked_projects": [],
"facility_percentages": [],
"created_at": "2025-02-01T10:30:00Z"
}
Common Errors
401 Unauthorized
Cause: Missing or invalid API key{
"detail": "Invalid API key",
"code": "INVALID_API_KEY"
}
403 Forbidden
Cause: The WWT record belongs to a different organization{
"detail": "Waste water treatment does not belong to this organization",
"code": "WWT_ACCESS_DENIED"
}
wwt_id belongs to the organization indicated in x-organization-id.
404 Not Found
Cause: No WWT record exists with that UUID{
"detail": "Waste water treatment not found",
"code": "WWT_NOT_FOUND"
}
wwt_id. You can list all WWT records for a facility using the list endpoint.
Related Endpoints
List Waste Water Treatments
Retrieve all WWT records for a facility
Delete Waste Water Treatment
Delete a single WWT record by ID
Was this page helpful?