---
title: "Create an import"
method: POST
path: "/settings/data-transfer/imports"
tags: ["Admin Settings: Data Transfer"]
---

# Create an import

`POST /settings/data-transfer/imports`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/settings/data-transfer/imports`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/settings/data-transfer/imports/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new import. Send as multipart/form-data with the binary `file` part plus type / action / validation_strategy / allowed_errors / field_separator. Binary upload is REST-only. Permission: settings.data_transfer.imports.create.

## Request body `multipart/form-data`

- object
  - `type` string, required
  - `action` 'append' | 'delete', required
  - `validation_strategy` 'stop-on-errors' | 'skip-errors', required
  - `allowed_errors` integer, required
  - `field_separator` string, required
  - `process_in_queue` boolean
  - `images_directory_path` string
  - `image_source` 'url' | 'upload' | 'directory'
  - `upload_images` string, binary: ZIP of images, required when image_source is upload.
  - `file` string, binary, required

## Response `201`

Import created.

- AdminSettingsDataTransferImport: Admin Settings → Data Transfer Imports (Block B Wave 3). REST: GET /api/admin/settings/data-transfer/imports — listing GET /api/admin/settings/data-transfer/imports/{id} — detail DELETE /api/admin/settings/data-transfer/imports/{id} — delete (DB row + file) GraphQL: adminSettingsDataTransferImports — cursor listing adminSettingsDataTransferImport(id:) — detail deleteAdminSettingsDataTransferImport — delete Cancel action lives on the sibling resource AdminSettingsDataTransferImportCancel (POST /api/admin/settings/data-transfer/imports/{id}/cancel + cancel mutation). Create endpoint deferred — file upload + async queue dispatch will land in a follow-up. Use the Bagisto admin panel for now. Mirrors the deferral pattern documented for Phase 5.11 product images and the AdminSettingsChannel logo. Mirrors Webkul\Admin\Http\Controllers\Settings\DataTransfer\ImportController for listing, detail, cancel and delete actions.
  - `id` integer, nullable
  - `code` string, nullable
  - `action` string, nullable
  - `state` string, nullable
  - `processInQueue` boolean, nullable
  - `validationStrategy` string, nullable
  - `allowedErrors` integer, nullable
  - `processedRowsCount` integer, nullable
  - `invalidRowsCount` integer, nullable
  - `errorsCount` integer, nullable
  - `errors` unknown[], nullable
    - unknown
  - `fieldSeparator` string, nullable
  - `filePath` string, nullable
  - `imagesDirectoryPath` string, nullable
  - `imageSource` string, nullable: Where a product import reads its images from: url, upload or directory.
  - `imagesArchiveName` string, nullable: Name of the images archive uploaded for this import, when its images came from an upload.
  - `errorFilePath` string, nullable
  - `summary` object, nullable
  - `startedAt` string, nullable
  - `completedAt` string, nullable
  - `createdAt` string, nullable
  - `updatedAt` string, nullable
  - `success` boolean, nullable
  - `isValid` boolean, nullable
  - `stats` object, nullable
  - `message` string, nullable

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid admin token.
- `403`: Admin role lacks settings.data_transfer.imports.create.
- `422`: Validation failure (missing file, invalid type/action/strategy).

## Changes

- **2026-08-27** `3c859f92343f`: 6 info
  - added the new optional request property `image_source`
  - added the new optional request property `upload_images`
  - added the optional property `imageSource` to the response with the `201` status (media type: application/json)
  - added the optional property `imageSource` to the response with the `201` status (media type: text/html)
  - …2 more

[Operation history](https://skmtc.dev/bagisto/apis/bagisto-admin-api/changes/settings/data-transfer/imports/post.md)

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
