Preview import

POST /api/v1/inventory/import/preview

After reviewing the AI analysis, confirm column mappings and sheet selections. Returns a full preview of locations, products, and inventory levels to be created.

Operation ID: preview_import_api_v1_inventory_import_preview_post · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

file_id string required
selected_sheets array · string required
sheet_mappings array · SheetMappingConfirmation requiredSheetMappingConfirmation
4 fields
sheet_name string required
mapping object required

Map of standard field name → 0-based column index.

data_start_row integer
exclude_rows array · integer
location_decisions array · LocationDecision LocationDecision
5 fields
detected_name string required
action string

One of: create, match, skip

existing_location_id string
location_name string
location_type string

Responses

201 Successful Response

file_id string required
to_create PreviewToCreate PreviewToCreate
2 fields
locations array · PreviewLocation PreviewLocation
products array · PreviewProduct PreviewProduct
to_update PreviewToUpdate PreviewToUpdate
1 field
inventory_levels array · PreviewInventoryLevel PreviewInventoryLevel
summary PreviewSummary PreviewSummary
6 fields
locations_to_create integer
products_to_create integer
variants_to_create integer
levels_to_set integer
existing_matched integer
skipped_rows integer

400 Bad Request - Invalid input

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

422 Validation Error - Invalid data format