Import Job

Entity description

An ImportJob entity represents an operation that imports records into the system from a specific provider (e.g., Excel file). The import job can either validate the data or execute the import process. It includes details about the job type, progress, status, and provider configuration.

Properties

NameDescriptionTypeExample
uidUnique identifier of the import jobstringjob-xyz789
provider_typeThe type of import provider (excel, import_job)stringexcel
provider_dataThe configuration data used by the provider for the importobjectSee Provider Data below
job_typeThe type of job operation (validate, execute). validate checks for errors; execute runs the importstringexecute
statusThe current status of the import job (pending, processing, done, error)stringprocessing
error_messageError message if the job failedstringnull
progressProgress of the import job, including total, done, error, and pending recordsobjectSee Progress Properties below
created_atThe creation timestamp in ISO 8601 formatstring2023-01-15T08:00:00.000Z
updated_atThe last update timestamp in ISO 8601 formatstring2023-01-15T08:30:00.000Z

Provider Data

Excel Provider Configuration

NameDescriptionTypeExample
entity_typeType of entity being importedstringproducts
original_file_nameName of the uploaded filestringimport.xlsx
fieldsArray of field names to be processedarray["name", "price", "description"]
contextAdditional context data for the importobject{ "currency": "USD" }

Existing Import Job Configuration

NameDescriptionTypeExample
source_import_job_uidThe UID of the import job used for validationstringjob-abc123

Progress Properties

NameDescriptionTypeExample
totalTotal number of records to be processednumber100
doneNumber of records successfully processednumber42
errorNumber of records that failed processingnumber3
pendingNumber of records pending processingnumber55

Example

{
  "uid": "job-xyz789",
  "provider_type": "excel",
  "provider_data": {
    "entity_type": "products",
    "original_file_name": "import.xlsx",
    "fields": [
      "name",
      "price",
      "description"
    ],
    "context": {
      "currency": "USD"
    }
  },
  "job_type": "execute",
  "status": "processing",
  "error_message": null,
  "progress": {
    "total": 100,
    "done": 42,
    "error": 3,
    "pending": 55
  },
  "created_at": "2023-01-15T08:00:00.000Z",
  "updated_at": "2023-01-15T08:30:00.000Z"
}