Get import details
Retrieves comprehensive information about a specific import, including all mappings, column metadata, and processing statistics.
What is returned:
- Import Metadata: File name, row/column counts, status, creation/completion timestamps, file size
- Current Mappings: All field mappings in AI format, showing which CSV columns map to which entity fields
- Column Metadata: Details about each CSV column (name, data type, sample values)
- Sample Rows: First 10 rows of data for preview
- Processing Statistics: Counts of created/updated/skipped entities (available after execution)
Use Cases:
- Review mappings before running a dry-run or execution
- Check import status and progress during background processing
- Inspect processing results after completion
- Debug mapping issues by examining column metadata and sample data
Import Status Values:
Uploaded: Ready for mapping configuration and executionProcessing: Currently running in the background (checkprocessedEntitiesvstotalToProcessfor progress)Completed: Finished successfully (seetotalCreatedEntities,totalUpdatedEntities,totalSkippedEntities)Failed: Encountered errors (check error message if available)
Mappings Format: Mappings are returned in AI format, where each mapping specifies:
- Entity type (e.g., “Employee”, “Project”)
- Field mappings (which CSV column UUID maps to which entity field)
- Value mappings (for enums, e.g., “Manager” → “manager”)
- Custom lookup fields (fields used to find existing records for updates)
GET
/imports-management/{importId}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:reador
AuthorizationBearer token (JWT) · headerrequiredPath parameters
importIdstringrequiredUnique identifier of the import
Responses
200Import details retrieved successfully
columnCountnumberrequiredTotal number of columns detected in the CSV file
columnsany[]requiredMetadata for each CSV column including UUID (required for mappings), name, detected data type, and sample values. Column UUIDs are used in field mappings.
createdAtstring<date-time>requiredISO 8601 timestamp when the import was created
fileNameobject | nullrequiredOriginal name of the uploaded CSV file
fileSizeobject | nullrequiredSize of the uploaded CSV file in bytes
importIdstringrequiredUnique identifier (UUID) of the import
importedAtobject | nullrequiredISO 8601 timestamp when the import finished processing. Null if import has not completed yet.
mappingsany[]requiredAll current field mappings in AI format. Each mapping specifies entity type, field mappings (CSV column UUIDs to entity fields), value mappings, and custom lookup fields. Use these mappings to understand how CSV data will be imported.
mimeTypeobject | nullrequiredMIME type of the uploaded file (typically "text/csv", "application/csv", or "text/plain")
processedEntitiesnumberrequiredNumber of entities that have been processed so far. Compare with totalToProcess to calculate progress percentage. Only meaningful when status is "Processing" or "Completed".
rowCountnumberrequiredTotal number of data rows in the CSV file (excluding header)
sampleRowsany[]requiredFirst 10 rows of data from the CSV file for preview. Useful for understanding data structure and validating that mappings are correct.
statusstringrequiredCurrent status of the import: "Uploaded" (ready), "Processing" (running), "Completed" (success), or "Failed" (error). Check processedEntities vs totalToProcess to see progress during processing.
Allowed:
UploadedProcessingCompletedFailedtotalCreatedEntitiesnumberrequiredTotal number of new entities that were created during import execution. Only available after import completes.
totalSkippedEntitiesnumberrequiredTotal number of rows that were skipped during import execution (due to validation errors, missing required fields, etc.). Only available after import completes.
totalToProcessnumberrequiredTotal number of entities that need to be processed. This is calculated based on the number of rows and mappings. Compare with processedEntities to track progress.
totalUpdatedEntitiesnumberrequiredTotal number of existing entities that were updated during import execution. Only available after import completes.
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Import not found or access denied
Request
curl -X GET "https://leadtime.app/api/public/imports-management/d2ee76e3-95d7-4b98-8d5d-98dc1fb79364" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/imports-management/d2ee76e3-95d7-4b98-8d5d-98dc1fb79364", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.get(
"https://leadtime.app/api/public/imports-management/d2ee76e3-95d7-4b98-8d5d-98dc1fb79364",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"columnCount": 12,
"columns": [
null
],
"createdAt": "2024-01-15T10:30:00Z",
"fileName": "employees.csv",
"fileSize": 52480,
"importId": "d2ee76e3-95d7-4b98-8d5d-98dc1fb79364",
"importedAt": "2024-01-15T10:35:00Z",
"mappings": [
null
],
"mimeType": "text/csv",
"processedEntities": 100,
"rowCount": 150,
"sampleRows": [
null
],
"status": "Uploaded",
"totalCreatedEntities": 80,
"totalSkippedEntities": 5,
"totalToProcess": 150,
"totalUpdatedEntities": 15
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Import not found or access denied