Preview import results without persisting data
Executes a dry-run to preview exactly what will happen when the import is executed, without making any changes to the database.
What this does: The dry-run performs a complete simulation of the import process:
- Validates all field mappings and data types
- Processes every row in the CSV file
- Attempts to find existing records using lookup fields
- Determines which entities will be created, updated, or skipped
- Identifies validation errors and data quality issues
- Returns detailed results for each entity type
- Does NOT persist any data - completely safe to run multiple times
Why use dry-run?
- Verify mappings: Ensure CSV columns are correctly mapped to entity fields
- Check data quality: Identify rows with missing required fields, invalid values, or format issues
- Estimate impact: See how many records will be created vs updated before execution
- Debug issues: Get detailed error messages explaining why certain rows will be skipped
- Validate lookup fields: Confirm that custom lookup fields correctly identify existing records
What is returned:
- Summary Statistics: Total rows, counts of entities that will be created/updated/skipped, error count
- Detailed Results: For each mapping type (Employee, Project, etc.), lists of:
toCreate: New entities that will be createdtoUpdate: Existing entities that will be updated (with old and new values)ignored: Rows that will be skipped (with reasons)
- Error Details: List of all rows with errors, including row index, data, and error message
Best Practice: Always run a dry-run after configuring mappings and before executing the import. This helps you:
- Catch mapping errors early
- Fix data quality issues in your CSV
- Understand the import impact
- Avoid accidentally creating duplicates or updating wrong records
POST
/imports-management/{importId}/dry-runAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
importIdstringrequiredUnique identifier of the import
Query parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullResponses
200Dry-run completed successfully
dryRunbooleanrequiredAlways true for dry-run operations. Indicates this is a preview simulation, not an actual execution.
errorsany[]requiredList of all rows that will be skipped due to errors, including row index, the data from that row, and the specific error message explaining why it will be skipped. Use this to identify and fix data quality issues before execution.
mappingsany[]requiredDetailed results for each entity type mapping. Each result includes lists of entities that will be created (toCreate), updated (toUpdate with old/new values), and skipped (ignored with reasons). Use this to understand exactly what will happen for each entity type.
summaryobjectrequiredSummary statistics aggregating results across all mappings. Provides quick overview of total rows, create/update/skip counts, and error count.
Show propertiesHide properties
errorsnumberrequiredNumber of rows that have validation errors. These are included in willSkip but counted separately to highlight data quality issues. Check the errors array for detailed error messages.
totalRowsnumberrequiredTotal number of rows that were processed during the dry-run or execution
willCreatenumberrequiredNumber of new entities that will be created (for dry-run) or were created (for execution). These are rows where no matching existing record was found using the lookup fields.
willSkipnumberrequiredNumber of rows that will be skipped (for dry-run) or were skipped (for execution). These rows had validation errors, missing required fields, or other issues that prevented processing.
willUpdatenumberrequiredNumber of existing entities that will be updated (for dry-run) or were updated (for execution). These are rows where a matching existing record was found using the lookup fields.
400Import has no mappings or invalid state
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Import not found
Request
curl -X POST "https://leadtime.app/api/public/imports-management/d2ee76e3-95d7-4b98-8d5d-98dc1fb79364/dry-run" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/imports-management/d2ee76e3-95d7-4b98-8d5d-98dc1fb79364/dry-run", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.post(
"https://leadtime.app/api/public/imports-management/d2ee76e3-95d7-4b98-8d5d-98dc1fb79364/dry-run",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"dryRun": true,
"errors": [
null
],
"mappings": [
null
],
"summary": {
"errors": 5,
"totalRows": 150,
"willCreate": 100,
"willSkip": 10,
"willUpdate": 40
}
}Import has no mappings or invalid state
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Import not found