List HOCs
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/logistics/hocs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/logistics/hocs"
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/logistics/hocs \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "<string>",
"category": "<string>",
"iv": 123,
"status": "<string>",
"created_at": {},
"updated_at": {}
}List HOCs
List all active logistics HOCs (Handling and Other Costs)
GET
/
v1
/
logistics
/
hocs
List HOCs
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/logistics/hocs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/logistics/hocs"
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/logistics/hocs \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "<string>",
"category": "<string>",
"iv": 123,
"status": "<string>",
"created_at": {},
"updated_at": {}
}← Logistics API
Retrieve all active logistics HOCs (Handling and Other Costs). HOCs represent additional logistics operations — like warehousing, loading, or customs handling — that contribute to the overall emission footprint.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faResponse
Returns an array of HOC objects with HTTP 200. Each item contains:string
HOC UUID
string
HOC category (e.g.
warehousing, loading, customs)number
Emission intensity value (kgCO2e per tonne)
string
Record status:
active or deleteddatetime
Creation timestamp (ISO 8601)
string | null
Last update timestamp (ISO 8601)
Example
curl "https://api.dcycle.io/v1/logistics/hocs" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import requests
import os
response = requests.get(
"https://api.dcycle.io/v1/logistics/hocs",
headers={
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
},
)
hocs = response.json()
for hoc in hocs:
print(hoc)
const axios = require('axios');
const response = await axios.get('https://api.dcycle.io/v1/logistics/hocs', {
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
});
console.log('HOCs:', response.data);
Successful Response
[
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"category": "transshipment_ambient",
"iv": 0.0052,
"status": "active",
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"category": "transshipment_mixed",
"iv": 0.0078,
"status": "active",
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
]
string
HOC UUID.
string
HOC category describing the type of handling operation (e.g.
transshipment_ambient, transshipment_mixed).number
Emission intensity value in kg CO2e per tonne.
Common Errors
401 Unauthorized
Cause: Missing or invalid API key{"detail": "Invalid API key for organization", "code": "INVALID_API_KEY"}
403 Forbidden
Cause: The authenticated user is not a member of the organization{"detail": "Logged User is not Member of Organization", "code": "LOGGED_USER_NOT_MEMBER"}
Related Endpoints
List TOCs
List transport operation categories
Logistics Overview
Module overview
Was this page helpful?