Imports
CSV / Excel / Google Sheets / feed imports.
5 نقاط وصول. أسماء نقاط الوصول وأوصافها مأخوذة من ملف OpenAPI، لذلك تظهر بالإنجليزية.
GET /v1/importsPOST /v1/importsPOST /v1/imports/uploadGET /v1/imports/{import_id}PATCH /v1/imports/{import_id}
GET
/v1/importsList imports
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
cursor | query | string | null | لا | max length 200 |
limit | query | integer | لا | default 20 · min 1 · max 200 |
الردود
- 200Successful Response
Page_ImportOut_
POST
/v1/importsStart an import from a URL (Google Sheets, Google Merchant feed)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
Idempotency-Key | header | string | null | لا | Unique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$ |
جسم الطلب application/json ImportCreate
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
source | "csv" | "xlsx" | "gsheet" | "feed_google" | نعم | |
url | string | null | لا | Google Sheets or feed URL.max length 2048 |
mapping | map<string, string> | لا | Column -> product field, e.g. {"Product name": "name.ar", "Price": "price", "Colour": "attributes.Color", "Notes": "ignore"}. Columns without a mapping are matched by name. |
dry_run | boolean | لا | default false |
locale | string | null | لا | Language of untagged text (a plain `name` column, feed titles). Default: the store's default language.pattern ^[a-z]{2}$ |
repeat | "hourly" | "daily" | null | لا | URL imports only: run the same import again every hour or every day. |
الردود
- 202Successful Response
ImportOut
POST
/v1/imports/uploadStart an import from a CSV or Excel file
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
Idempotency-Key | header | string | null | لا | Unique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$ |
جسم الطلب multipart/form-data Body_imports_upload
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
file | string | نعم | |
source | "csv" | "xlsx" | "gsheet" | "feed_google" | نعم | |
dry_run | boolean | لا | default false |
mapping | string | null | لا | JSON object, column -> product field (see ImportCreate).max length 20000 |
locale | string | null | لا | pattern ^[a-z]{2}$ |
الردود
- 202Successful Response
ImportOut
GET
/v1/imports/{import_id}Get one import
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
import_id | path | string | نعم |
الردود
- 200Successful Response
ImportOut
PATCH
/v1/imports/{import_id}Change or stop a repeating URL import
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
import_id | path | string | نعم | |
Idempotency-Key | header | string | null | لا | Unique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$ |
جسم الطلب application/json ImportUpdate
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
repeat | "hourly" | "daily" | null | لا |
الردود
- 200Successful Response
ImportOut
أشكال البيانات في هذه الصفحة
Page_ImportOut_
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
data | ImportOut[] | نعم | |
next_cursor | string | null | لا | |
total | integer | null | لا | Present when cheap to count. |
ImportOut
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | |
source | "csv" | "xlsx" | "gsheet" | "feed_google" | "connector" | "api" | نعم | |
status | "queued" | "running" | "succeeded" | "failed" | "canceled" | نعم | |
stats | map<string, integer> | لا | |
errors | ItemError[] | لا | |
created_at | string (date-time) | نعم | |
finished_at | string (date-time) | null | لا | |
job | Job | null | لا | |
source_url | string | null | لا | |
filename | string | null | لا | |
locale | string | null | لا | |
dry_run | boolean | لا | default false |
repeat | "hourly" | "daily" | null | لا | |
next_run_at | string (date-time) | null | لا | |
parent_id | string | null | لا | The repeating import that started this run. |
started_at | string (date-time) | null | لا |
ItemError
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | null | لا | |
index | integer | نعم | |
code | string | نعم | |
message | string | نعم |
Job
A row of the shared `jobs` table. Poll GET /v1/jobs/{id} until status is terminal.
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | |
kind | "reindex" | "import" | "sync" | "translate_backfill" | "translate_writeback" | "export" | "data_export" | "data_delete" | "embed" | "synonym_mining" | نعم | |
status | "queued" | "running" | "succeeded" | "failed" | "canceled" | نعم | |
progress | number | لا | default 0 · min 0 · max 1 |
created_at | string (date-time) | نعم | |
started_at | string (date-time) | null | لا | |
finished_at | string (date-time) | null | لا | |
result | object | null | لا | |
error | string | null | لا |
ImportCreate
For file imports send multipart/form-data with `file` + `source`; for URLs send this JSON.
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
source | "csv" | "xlsx" | "gsheet" | "feed_google" | نعم | |
url | string | null | لا | Google Sheets or feed URL.max length 2048 |
mapping | map<string, string> | لا | Column -> product field, e.g. {"Product name": "name.ar", "Price": "price", "Colour": "attributes.Color", "Notes": "ignore"}. Columns without a mapping are matched by name. |
dry_run | boolean | لا | default false |
locale | string | null | لا | Language of untagged text (a plain `name` column, feed titles). Default: the store's default language.pattern ^[a-z]{2}$ |
repeat | "hourly" | "daily" | null | لا | URL imports only: run the same import again every hour or every day. |
Body_imports_upload
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
file | string | نعم | |
source | "csv" | "xlsx" | "gsheet" | "feed_google" | نعم | |
dry_run | boolean | لا | default false |
mapping | string | null | لا | JSON object, column -> product field (see ImportCreate).max length 20000 |
locale | string | null | لا | pattern ^[a-z]{2}$ |
ImportUpdate
Change a repeating URL import. `repeat: null` stops it.
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
repeat | "hourly" | "daily" | null | لا |