auto_import
Upload a CSV or Excel file to automatically map columns to a target entity and create an import, or preview the mapping with dry run before committing.
Instructions
Uploads a file and asks the server to auto-map columns to the target entity. Set dryRun=true to get the proposed mapping back without creating an import — useful for showing the user what will happen and asking 'does this look right?' before committing. Set dryRun=false (default) to auto-map and import in one call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyId | Yes | Company id from list_companies. | |
| filePath | Yes | Absolute path to a .csv, .xlsx, or .xls file. | |
| entityName | Yes | Entity to import as — must match list_entities output. | |
| dryRun | No | If true, returns proposed mapping without starting an import. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Import id (present when dryRun=false). | |
| status | No | Import status (present when dryRun=false). | |
| proposedMapping | No | Auto-resolved column→field mapping (present when dryRun=true). | |
| detectedColumns | No | Headers found in the uploaded file (present when dryRun=true). | |
| missingRequired | No | Required target fields the auto-mapper could not resolve. |