Importer Model

ActionMethodResourceDescription
CreatePOST/importersCreate importers
DeleteDELETE/importers/:importer_idDelete the importer
Create importer jobPOST/importers/:importer_id/jobs Create importer jobs
Create importer jobPOST/importers/:importer_slug/jobscreate jobs for importer slug

The Importer model is composed of the following attributes:

attributetyperequireddescription
namestringYesName of importer
slugstringYescode to run importer from this
typestringYessync_products
sync_categories
sync_businesses
mappingjsonYesJson with mapping data.

this object allows you to configure the imports of csv files

{
"product_id": INTEGER, (Required without external_product_id)(CSV position from 0)

(this field is used to identify the product id in the ordering database)


"external_product_id: INTEGER, (Required without product_id)(CSV position from 0)

(This field is used to indicate the position of the external product id in the csv file.)
"external_product_key": "name_of_the_metafield",
"category_id": INTEGER, (Required without external_category_id)(CSV position from 0)
"external_category_id: INTEGER, (Required without category_id)(CSV position from 0)
"external_category_key": "name_of_the_metafield",
"business_id": INTEGER, (Required without external_business_id)(CSV position from 0)
"external_business_id: INTEGER, (Required without business_id)(CSV position from 0)
"external_business_key": "name_of_the_metafield",
"fields": { (Fields to update)
"model_product_name": INTEGER, (CSV position from 0)
}
}

The importer model job is composed of the following atributes:

attributetyperequireddescription
fileCSV Fileyes
import_optionsjsonNo{
"separator": "CSV separator", (Optional)(DEFAULT ;)
"enclosure": "CSV enclosure", (Optional)(DEFAULT ")
"escape": "CSV escape", (Optional)(DEFAULT )
"start_line": "Start from x line" (Optional)(DEFAULT 1)
}