Skip to main content
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_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 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

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

import_id
string
required
UUID of the import sessionExample: "11111111-1111-1111-1111-111111111111"

Response

import_id
string
UUID of the import session
status
string
Current lifecycle statusValues: created, parsed, mapped, validating, validated, submitting, submitted, failed, expired
template_id
string
Backend template identifier used for this import
file_name
string
Original filename of the uploaded file
numeric_locale
string | null
Numeric locale applied during parsing
date_locale
string | null
Date locale applied (dmy or mdy)
total_rows
integer
Total number of data rows
valid_rows
integer
Number of rows that passed validation
error_rows
integer
Number of rows with validation errors
errors_by_column
object
Error counts per column key. Example: {"weight_kg": 3, "date": 1}
mapping
object | null
Confirmed column mapping ({target_column: source_column}) or null if not yet mapped
file_id
string | null
UUID of the file created after submission
processing_job_id
string | null
UUID of the downstream processing job started after submission
source_columns
array[string]
Column headers detected in the source file
created_at
datetime
ISO 8601 timestamp when the session was created
updated_at
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}"

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

StatusMeaning
createdSession created, file not yet fully parsed
parsedFile parsed, columns detected, ready for mapping
mappedColumn mapping confirmed
validatingRow validation in progress
validatedValidation complete, ready to submit (or fix errors)
submittingSubmission in progress
submittedSubmitted for downstream processing
failedProcessing failed
expiredSession 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
{"detail": "Not Found"}

Create Session

Upload a file and start a new import

Submit Import

Submit the validated session