Export Detailed Report
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/logistics/report/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/logistics/report/export"
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/report/export \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"processing_job_id": "<string>",
"message": "<string>"
}Export Detailed Report
Queue an async, line-level (row-per-leg) logistics export emailed as a download link
GET
/
v1
/
logistics
/
report
/
export
Export Detailed Report
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/logistics/report/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/logistics/report/export"
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/report/export \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"processing_job_id": "<string>",
"message": "<string>"
}← Logistics API
Queue an asynchronous logistics export with two datasets. Unlike
Solution: Pass
GET /report, which returns an aggregated ISO 14083 summary inline, this endpoint streams the full detail and is built to scale to organizations with millions of requests. It returns 202 immediately; a background worker generates the file and emails a download link (valid 7 days) when ready.
- requests: one row per request leg — company name, movement/leg/package IDs, origin/destination, distance, load, tkm, toc, applied rate and kgCO2e. Subcontracted legs use the TOC’s
wtw; own-fleet legs use a rate derived from the org’s actual fuel recharges for the same toc/year. Each row also carriesdata_status/data_status_detail, flagging legs the basis can’t cover yet (no recharges uploaded, unresolved TOC, electric TOC). - recharges: the own-fleet fuel burn that rate is allocated from, with the co2e split into TTW (scope 1), WTT (scope 3) and WTW (total).
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faQuery Parameters
string
required
Period start date as a Unix timestamp (seconds)Example:
1735689600string
required
Period end date as a Unix timestamp (seconds). Must be after
start_date. Multi-year ranges are allowed.Example: 1767139200string[]
Client name(s) to include in the requests dataset. Omit to export the whole organization (all clients). Recharges have no client and are always included in full.
boolean
default:"false"
If
true, generate one requests file per client (selected, or all), plus one shared recharges file, all bundled into a single ZIP.string
default:"csv"
Output file format:
excel, csv, or json. csv always arrives inside a .zip (one member per dataset); json is a single {"requests": [...], "recharges": [...]} object, zipped above ~1M rows; excel is one workbook (data_N + recharges sheets), refused above ~5M request rows — use csv for very large windows.string
default:"es"
Language for the column headers:
es or en.uuid
Filter the export by project UUID
Response
Returns202 Accepted with the export job reference.
string
UUID of the processing job for tracking progress
string
Confirmation message
Example
curl -X GET "https://api.dcycle.io/v1/logistics/report/export?start_date=1735689600&end_date=1767139200&output_format=csv&lang=en" \
-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/report/export",
headers={
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
},
params={
"start_date": "1735689600",
"end_date": "1767139200",
"output_format": "csv",
"lang": "en",
},
)
result = response.json()
print(f"Export queued — job ID: {result['processing_job_id']}")
const axios = require('axios');
const response = await axios.get(
'https://api.dcycle.io/v1/logistics/report/export',
{
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
params: {
start_date: '1735689600',
end_date: '1767139200',
output_format: 'csv',
lang: 'en',
},
}
);
console.log(`Export queued — job ID: ${response.data.processing_job_id}`);
Successful Response
{
"processing_job_id": "job-uuid",
"message": "Logistics report export queued. You will receive an email with the download link when it is ready."
}
Common Errors
401 Unauthorized
Cause: Missing or invalid API key{"detail": "Invalid API key", "code": "INVALID_API_KEY"}
404 Not Found
Cause: Organization not found{"code": "ORGANIZATION_NOT_FOUND", "detail": "Organization with id=UUID('...') not found"}
422 Unprocessable Entity
Cause: Invalid or inverted date range{"code": "INVALID_DATE_RANGE", "detail": "start_date and end_date must be Unix timestamps (seconds)."}
start_date/end_date as Unix timestamps in seconds, with end_date after start_date.
Related Endpoints
Generate Report
Get the aggregated ISO 14083 summary inline
List Clients
Get available clients for filtering
Was this page helpful?