Action | Method | Resource | Description |
---|---|---|---|
Create | POST | /importers | Create importers |
Delete | DELETE | /importers/:importer_id | Delete the importer |
Create importer job | POST | /importers/:importer_id/jobs | Create importer jobs |
Create importer job | POST | /importers/:importer_slug/jobs | create jobs for importer slug |
The Importer model is composed of the following attributes:
attribute | type | required | description |
---|---|---|---|
name | string | Yes | Name of importer |
slug | string | Yes | code to run importer from this |
type | string | Yes | sync_products sync_categories sync_businesses |
mapping | json | Yes | Json 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:
attribute | type | required | description |
---|---|---|---|
file | CSV File | yes | |
import_options | json | No | { "separator": "CSV separator", (Optional)(DEFAULT ;) "enclosure": "CSV enclosure", (Optional)(DEFAULT ") "escape": "CSV escape", (Optional)(DEFAULT ) "start_line": "Start from x line" (Optional)(DEFAULT 1) } |