Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

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 execution
  • Processing: Currently running in the background (check processedEntities vs totalToProcess for progress)
  • Completed: Finished successfully (see totalCreatedEntities, 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 · headerrequired
Scopes:api:read
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
importIdstringrequired

Unique identifier of the import

Responses
200

Import details retrieved successfully

columnCountnumberrequired

Total number of columns detected in the CSV file

columnsany[]required

Metadata 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>required

ISO 8601 timestamp when the import was created

fileNameobject | nullrequired

Original name of the uploaded CSV file

fileSizeobject | nullrequired

Size of the uploaded CSV file in bytes

importIdstringrequired

Unique identifier (UUID) of the import

importedAtobject | nullrequired

ISO 8601 timestamp when the import finished processing. Null if import has not completed yet.

mappingsany[]required

All 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 | nullrequired

MIME type of the uploaded file (typically "text/csv", "application/csv", or "text/plain")

processedEntitiesnumberrequired

Number of entities that have been processed so far. Compare with totalToProcess to calculate progress percentage. Only meaningful when status is "Processing" or "Completed".

rowCountnumberrequired

Total number of data rows in the CSV file (excluding header)

sampleRowsany[]required

First 10 rows of data from the CSV file for preview. Useful for understanding data structure and validating that mappings are correct.

statusstringrequired

Current status of the import: "Uploaded" (ready), "Processing" (running), "Completed" (success), or "Failed" (error). Check processedEntities vs totalToProcess to see progress during processing.

Allowed:UploadedProcessingCompletedFailed
totalCreatedEntitiesnumberrequired

Total number of new entities that were created during import execution. Only available after import completes.

totalSkippedEntitiesnumberrequired

Total number of rows that were skipped during import execution (due to validation errors, missing required fields, etc.). Only available after import completes.

totalToProcessnumberrequired

Total 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.

totalUpdatedEntitiesnumberrequired

Total number of existing entities that were updated during import execution. Only available after import completes.

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

404

Import not found or access denied

Try it
Server
Authorization
Parameters
Request
curl -X GET "https://leadtime.app/api/public/imports-management/d2ee76e3-95d7-4b98-8d5d-98dc1fb79364" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "columnCount": 12,
  "columns": [],
  "createdAt": "2024-01-15T10:30:00Z",
  "fileName": "employees.csv",
  "fileSize": 52480,
  "importId": "d2ee76e3-95d7-4b98-8d5d-98dc1fb79364",
  "importedAt": "2024-01-15T10:35:00Z",
  "mappings": [],
  "mimeType": "text/csv",
  "processedEntities": 100,
  "rowCount": 150,
  "sampleRows": [],
  "status": "Uploaded",
  "totalCreatedEntities": 80,
  "totalSkippedEntities": 5,
  "totalToProcess": 150,
  "totalUpdatedEntities": 15
}