List Ingest Job Items
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v2/ingest-jobs/{job_id}/items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v2/ingest-jobs/{job_id}/items"
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/v2/ingest-jobs/{job_id}/items \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"items": {
"source_row_index": 123,
"client_row_id": {},
"chunk_index": {},
"stage": "<string>",
"status": "<string>",
"entity_id": {},
"error_code": {},
"error_params": {},
"attempt_count": 123
},
"total": 123,
"page": 123,
"size": 123
}List Ingest Job Items
Per-record outcomes of a bulk ingest job, in submission order
GET
/
v2
/
ingest-jobs
/
{job_id}
/
items
List Ingest Job Items
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v2/ingest-jobs/{job_id}/items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v2/ingest-jobs/{job_id}/items"
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/v2/ingest-jobs/{job_id}/items \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"items": {
"source_row_index": 123,
"client_row_id": {},
"chunk_index": {},
"stage": "<string>",
"status": "<string>",
"entity_id": {},
"error_code": {},
"error_params": {},
"attempt_count": 123
},
"total": 123,
"page": 123,
"size": 123
}← Create Wastes (v2)
One item per submitted record, in the order the records were sent. Use it to find which records failed to
calculate and why, and to map each record (by
source_row_index or your client_row_id) to the entity that was
created (entity_id).
Beta. Part of the bulk ingest API, currently in beta. The contract may still change before general
availability.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
UUID of the organization that created the job, or of one of its parent organizations.Example:
a8315ef3-dd50-43f8-b7ce-d839e68d51faPath Parameters
uuid
required
The job
id.Example: 2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aaQuery Parameters
string
Only items with this outcome.Available values:
pending, succeeded, failed (skipped is reserved: no item ends in it today)Example: failedstring
Only items at this stage.Available values:
persist, calculate, deleteExample: calculateinteger
default:"1"
Page number, starting at 1.
integer
default:"10"
Items per page, between 1 and 500.
Response
array[object]
Show item fields
Show item fields
integer
Position of the record in the submitted
records array, starting at 0.string | null
The
client_row_id you sent with the record.integer | null
Calculation chunk the record belongs to.
string
Where the record is, or where it failed. Available values:
persist (stored, nothing to calculate),
calculate (stored, emissions calculated or being calculated), delete (a
delete job: deleted or being deleted).string
Available values:
pending (waiting for its chunk), succeeded, failed. skipped is reserved and not
returned today.uuid | null
Id of the entity created from the record, e.g. the waste id. For a record split across facilities, the id of the
first waste of the group (the group shares it as
source_waste_id).string | null
What failed, when
status is failed. CALCULATION_FAILED: the entity was stored but its emissions could
not be calculated. DELETE_FAILED: in a delete job, the waste was already
gone when its chunk ran.object | null
Values that explain the error, when available.
CALCULATION_FAILED does not carry the reason yet (null): see
Why a record failed to calculate.integer
How many times the record’s calculation ran.
integer
Number of items matching the filters.
integer
Current page.
integer
Page size.
Example
curl "https://api.dcycle.io/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa/items?status=failed&size=500" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
url = "https://api.dcycle.io/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa/items"
headers = {
"x-api-key": os.environ["DCYCLE_API_KEY"],
"x-organization-id": os.environ["DCYCLE_ORG_ID"],
}
page = 1
while True:
body = requests.get(url, headers=headers, params={"status": "failed", "size": 500, "page": page}, timeout=30).json()
for item in body["items"]:
print(item["source_row_index"], item["client_row_id"], item["entity_id"], item["error_code"])
if page * body["size"] >= body["total"]:
break
page += 1
const axios = require('axios');
const { data } = await axios.get(
'https://api.dcycle.io/v2/ingest-jobs/2d4b90c1-7c1e-4b6f-9a55-3f2b8e61d0aa/items',
{
params: { status: 'failed', size: 500 },
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
},
);
data.items.forEach(item => console.log(item.client_row_id, item.error_code));
Successful Response
{
"items": [
{
"source_row_index": 88,
"client_row_id": "ALB-2026-09-0089",
"chunk_index": 0,
"stage": "calculate",
"status": "failed",
"entity_id": "6a0c1f3e-2b7d-4c8e-9f10-4d5e6a7b8c9d",
"error_code": "CALCULATION_FAILED",
"error_params": null,
"attempt_count": 1
}
],
"total": 1,
"page": 1,
"size": 500
}
A failed item of a create job still has an
entity_id: the waste was stored, it just has no emissions. Read it
with Get Waste: status: "error" when no factor covers its LER/R/D codes or it has no
unit, status: "review" when its description matched no factor.Common Errors
401 Unauthorized
Missing or invalid API key.404 Not Found
The job does not exist, or it belongs to an organization outside the one inx-organization-id.
422 Validation Error
An unknownstatus or stage value, or size outside 1 to 500.
Related Endpoints
Get Ingest Job
Status and progress of the job
Create Wastes (v2)
Create one or up to 5,000 wastes in one request
Was this page helpful?