Reprocess Corrected Rows
const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'x-partner': '<x-partner>'
}
};
fetch('https://api.dcycle.io/v2/imports/{import_id}/reprocess', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v2/imports/{import_id}/reprocess"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"x-partner": "<x-partner>"
}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://api.dcycle.io/v2/imports/{import_id}/reprocess \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--header 'x-partner: <x-partner>'{
"import_id": "<string>",
"processing_job_id": {},
"rows_submitted": 123
}Reprocess Corrected Rows
Save again the rows of a submitted import corrected since it did not save them
POST
/
v2
/
imports
/
{import_id}
/
reprocess
Reprocess Corrected Rows
const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'x-partner': '<x-partner>'
}
};
fetch('https://api.dcycle.io/v2/imports/{import_id}/reprocess', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v2/imports/{import_id}/reprocess"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"x-partner": "<x-partner>"
}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://api.dcycle.io/v2/imports/{import_id}/reprocess \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--header 'x-partner: <x-partner>'{
"import_id": "<string>",
"processing_job_id": {},
"rows_submitted": 123
}← Imports
A submitted import may not save some rows: rows left out at validation (
Cause: No corrected row is ready: none was corrected, or the corrected ones still have errors.
ignore_errors: true), rows the import could
not save, or rows saved whose calculation failed. Get rows marks them
(stage: processing), and correctable: true says a row can still be fixed. Correct its cells with
Correct rows, as before the submit; the row reads reprocess: "pending". This
endpoint then saves the corrected rows with no errors left, without uploading the file again.
The rows go as an import of their own, which keeps their row numbers: Get rows of
the original import follows them (reprocess: "running", then saved or marked with their new reason). A row that left
a record saved with an error (a purchase whose calculation failed) has that record replaced, so it is saved once; if
that record is no longer in error (recalculated since), the row is saved already and is not sent again.
Calling it twice sends the rows once: the second call answers 400 IMPORT_NOTHING_TO_REPROCESS. If the rows could not
be sent, they wait again (reprocess: "pending") and a new call sends them.
Request
Headers
Path Parameters
Response
Example
cURL
curl -X POST "https://api.dcycle.io/v2/imports/11111111-1111-1111-1111-111111111111/reprocess" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}" \
-H "x-partner: dcycle"
{
"import_id": "44444444-4444-4444-4444-444444444444",
"processing_job_id": "55555555-5555-5555-5555-555555555555",
"rows_submitted": 3
}
Common Errors
400 Bad Request
Cause: The import was not submitted.{"code": "IMPORT_NOT_SUBMITTED", "detail": "Only a submitted import's corrected rows are reprocessed"}
{"code": "IMPORT_NOTHING_TO_REPROCESS", "detail": "No corrected row is ready to be saved again"}
404 Not Found
Cause: The import session does not exist or belongs to another organization.409 Conflict
Cause: A row left a record in error the template cannot replace.{"code": "IMPORT_ROW_NOT_CORRECTABLE", "detail": "The template cannot replace the records these rows left in error"}
Was this page helpful?