Catalog
Products, reindex, attributes.
8 نقاط وصول. أسماء نقاط الوصول وأوصافها مأخوذة من ملف OpenAPI، لذلك تظهر بالإنجليزية.
POST /v1/products/batchGET /v1/productsGET /v1/products/{product_id}DELETE /v1/products/{product_id}POST /v1/reindexGET /v1/attributesGET /v1/attributes/mappingPUT /v1/attributes/mapping
POST
/v1/products/batchUpsert and delete products (max 1,000 per call, idempotent)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
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 ProductBatchRequest
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
upsert | ProductIn-Input[] | لا | |
delete | string[] | لا | Product ids to delete. |
replace_all | boolean | لا | Full sync: after this batch (with sync_id complete), delete products not sent.default false |
sync_id | string | null | لا | Groups batches of one full sync.max length 64 |
sync_complete | boolean | لا | default false |
الردود
- 200Successful Response
ProductBatchResult
GET
/v1/productsList products
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
cursor | query | string | null | لا | max length 200 |
limit | query | integer | لا | default 50 · min 1 · max 200 |
q | query | string | null | لا | max length 200 |
الردود
- 200Successful Response
Page_ProductOut_
GET
/v1/products/{product_id}Get one product
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
product_id | path | string | نعم |
الردود
- 200Successful Response
ProductOut
DELETE
/v1/products/{product_id}Delete one product
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
product_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}$ |
الردود
- 200Successful Response
Deleted
POST
/v1/reindexRebuild the search index from stored products (zero downtime)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
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 ReindexRequest
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
mode | "full" | "settings_only" | لا | default "full" |
reason | string | null | لا | max length 200 |
الردود
- 202Successful Response
Accepted
GET
/v1/attributesAttributes found in the catalog
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
الردود
- 200Successful Response
AttributeInfo[]
GET
/v1/attributes/mappingAttribute normalization mapping
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
الردود
- 200Successful Response
AttributeMapping
PUT
/v1/attributes/mappingReplace the attribute mapping (triggers a reindex)
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
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 AttributeMappingUpdate
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
items | AttributeMappingItem[] | نعم |
الردود
- 200Successful Response
AttributeMapping
أشكال البيانات في هذه الصفحة
ProductBatchRequest
Upsert and delete in one call. Max 1,000 items in total. Same body again = no change (idempotent).
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
upsert | ProductIn-Input[] | لا | |
delete | string[] | لا | Product ids to delete. |
replace_all | boolean | لا | Full sync: after this batch (with sync_id complete), delete products not sent.default false |
sync_id | string | null | لا | Groups batches of one full sync.max length 64 |
sync_complete | boolean | لا | default false |
ProductIn-Input
One product, as sent to POST /v1/products:batch (upsert).
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | The store's own product id.min length 1 · max length 128 |
name | object | نعم | |
description | object | لا | |
brand | string | null | لا | max length 200 |
model | string | null | لا | max length 200 |
sku | string | null | لا | max length 200 |
gtin | string | null | لا | max length 50 |
url | string | null | لا | max length 2048 |
image_url | string | null | لا | max length 2048 |
price | number | string | نعم | min 0 |
sale_price | number | string | null | لا | min 0 |
currency | string | نعم | ISO 4217, e.g. USD, SAR, AED.pattern ^[A-Z]{3}$ |
in_stock | boolean | لا | default true |
stock_qty | integer | null | لا | min 0 |
categories | CategoryRef[] | لا | |
attributes | map<string, string | integer | number | boolean | string[]> | لا | Raw attributes as the store has them, e.g. {'Size': 'M', 'Color': 'Black'}. |
tags | string[] | لا | |
popularity | number | null | لا | Business signal, opt-in.min 0 |
margin | number | null | لا | Business signal, opt-in. Never shown. |
visible | boolean | لا | default true |
updated_at | string (date-time) | null | لا | |
extra | object | لا | Opaque. Returned as is. |
CategoryRef
One category the product belongs to, with its full path from the root.
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | min length 1 · max length 128 |
path | object[] | نعم | Root first. Each level is {lang: name}. |
ProductBatchResult
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
upserted | integer | نعم | |
unchanged | integer | نعم | |
deleted | integer | نعم | |
errors | ItemError[] | لا | |
visible_within_s | number | لا | Upserts are searchable within this time.default 5 |
ItemError
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | null | لا | |
index | integer | نعم | |
code | string | نعم | |
message | string | نعم |
Page_ProductOut_
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
data | ProductOut[] | نعم | |
next_cursor | string | null | لا | |
total | integer | null | لا | Present when cheap to count. |
ProductOut
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | |
product | ProductIn-Output | نعم | |
content_hash | string | نعم | |
created_at | string (date-time) | نعم | |
updated_at | string (date-time) | نعم | |
indexed_at | string (date-time) | null | لا |
ProductIn-Output
One product, as sent to POST /v1/products:batch (upsert).
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
id | string | نعم | The store's own product id.min length 1 · max length 128 |
name | object | نعم | |
description | object | لا | |
brand | string | null | لا | max length 200 |
model | string | null | لا | max length 200 |
sku | string | null | لا | max length 200 |
gtin | string | null | لا | max length 50 |
url | string | null | لا | max length 2048 |
image_url | string | null | لا | max length 2048 |
price | string | نعم | |
sale_price | string | null | لا | |
currency | string | نعم | ISO 4217, e.g. USD, SAR, AED.pattern ^[A-Z]{3}$ |
in_stock | boolean | لا | default true |
stock_qty | integer | null | لا | min 0 |
categories | CategoryRef[] | لا | |
attributes | map<string, string | integer | number | boolean | string[]> | لا | Raw attributes as the store has them, e.g. {'Size': 'M', 'Color': 'Black'}. |
tags | string[] | لا | |
popularity | number | null | لا | Business signal, opt-in.min 0 |
margin | number | null | لا | Business signal, opt-in. Never shown. |
visible | boolean | لا | default true |
updated_at | string (date-time) | null | لا | |
extra | object | لا | Opaque. Returned as is. |
Deleted
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
deleted | boolean | لا | default true |
id | string | نعم |
ReindexRequest
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
mode | "full" | "settings_only" | لا | default "full" |
reason | string | null | لا | max length 200 |
Accepted
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
accepted | boolean | لا | default true |
job | Job | null | لا |
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 | لا |
AttributeInfo
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
raw_name | string | نعم | |
canonical_name | string | null | لا | |
products | integer | نعم | How many products have it. |
sample_values | string[] | لا | |
facet | boolean | لا | default false |
unit | string | null | لا |
AttributeMapping
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
items | AttributeMappingItem[] | نعم | |
updated_at | string (date-time) | null | لا |
AttributeMappingItem
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
raw_name | string | نعم | max length 200 |
canonical_name | string | نعم | max length 100 |
unit | string | null | لا | max length 20 |
value_map | map<string, string> | لا | e.g. {"Med": "M", "Navy Blue": "Navy"} |
facet | boolean | لا | default true |
AttributeMappingUpdate
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
items | AttributeMappingItem[] | نعم |