Get Import Status
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v2/imports/{import_id}/status', 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}/status"
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/imports/{import_id}/status \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"import_id": "<string>",
"status": "<string>",
"template_id": "<string>",
"file_name": "<string>",
"numeric_locale": {},
"date_locale": {},
"total_rows": 123,
"valid_rows": 123,
"error_rows": 123,
"errors_by_column": {},
"mapping": {},
"file_id": {},
"processing_job_id": {},
"source_columns": {},
"created_at": {},
"updated_at": {}
}Get Import Status
Retrieve the current status and validation summary of an import session
GET
/
v2
/
imports
/
{import_id}
/
status
Get Import Status
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v2/imports/{import_id}/status', 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}/status"
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/imports/{import_id}/status \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"import_id": "<string>",
"status": "<string>",
"template_id": "<string>",
"file_name": "<string>",
"numeric_locale": {},
"date_locale": {},
"total_rows": 123,
"valid_rows": 123,
"error_rows": 123,
"errors_by_column": {},
"mapping": {},
"file_id": {},
"processing_job_id": {},
"source_columns": {},
"created_at": {},
"updated_at": {}
}← Imports
Retrieve the current lifecycle status and validation summary of an import session. Use this to check whether a session is ready to submit, or to monitor progress after submission.
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 import sessionExample:
"11111111-1111-1111-1111-111111111111"Response
string
UUID of the import session
string
Current lifecycle statusValues:
created, parsed, mapped, validating, validated, submitting, submitted, failed, expiredstring
Backend template identifier used for this import
string
Original filename of the uploaded file
string | null
Numeric locale applied during parsing
string | null
Date locale applied (
dmy or mdy)integer
Total number of data rows
integer
Number of rows that passed validation
integer
Number of rows with validation errors
object
Error counts per column key. Example:
{"weight_kg": 3, "date": 1}object | null
Confirmed column mapping (
{target_column: source_column}) or null if not yet mappedstring | null
UUID of the file created after submission
string | null
UUID of the downstream processing job started after submission
array[string]
Column headers detected in the source file
datetime
ISO 8601 timestamp when the session was created
string | null
ISO 8601 timestamp of the last update
Example
curl -X GET "https://api.dcycle.io/v2/imports/11111111-1111-1111-1111-111111111111/status" \
-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"),
}
import_id = "11111111-1111-1111-1111-111111111111"
response = requests.get(
f"https://api.dcycle.io/v2/imports/{import_id}/status",
headers=headers,
)
status = response.json()
print(f"Status: {status['status']}")
print(f"Rows: {status['valid_rows']}/{status['total_rows']} valid")
if status["error_rows"]:
print(f"Errors: {status['errors_by_column']}")
const axios = require('axios');
const headers = {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
};
const importId = '11111111-1111-1111-1111-111111111111';
axios.get(`https://api.dcycle.io/v2/imports/${importId}/status`, { headers })
.then(response => {
const { status, valid_rows, total_rows, error_rows } = response.data;
console.log(`Status: ${status}, ${valid_rows}/${total_rows} valid`);
if (error_rows) console.log(`Errors by column:`, response.data.errors_by_column);
});
Successful Response
{
"import_id": "11111111-1111-1111-1111-111111111111",
"status": "validated",
"template_id": "logistics_requests",
"file_name": "logistics-data.csv",
"numeric_locale": "es_ES",
"date_locale": null,
"language_locale": null,
"total_rows": 240,
"valid_rows": 237,
"error_rows": 3,
"errors_by_column": {
"weight_kg": 2,
"date": 1
},
"mapping": {
"origin": "origin",
"destination": "destination",
"weight": "weight_kg",
"date": "date",
"vehicle_type": "vehicle_type"
},
"file_id": null,
"processing_job_id": null,
"source_columns": ["origin", "destination", "weight_kg", "date", "vehicle_type"],
"sample_rows": [
["Madrid", "Barcelona", "1500", "15/03/2024", "truck"]
],
"created_at": "2024-11-24T10:30:00Z",
"updated_at": "2024-11-24T10:35:00Z"
}
Session Status Lifecycle
| Status | Meaning |
|---|---|
created | Session created, file not yet fully parsed |
parsed | File parsed, columns detected, ready for mapping |
mapped | Column mapping confirmed |
validating | Row validation in progress |
validated | Validation complete, ready to submit (or fix errors) |
submitting | Submission in progress |
submitted | Submitted for downstream processing |
failed | Processing failed |
expired | Session expired (not submitted within TTL) |
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"}
404 Not Found
Cause: The import session does not exist or belongs to another organization. Both cases return the same response, so a session id from another organization is indistinguishable from one that does not exist.{"code": "NOT_FOUND", "detail": "ImportSessionModel with id='1b2c3d4e-5f60-7182-93a4-b5c6d7e8f901' not found"}
Related Endpoints
Create Session
Upload a file and start a new import
Submit Import
Submit the validated session
Was this page helpful?