This commit is contained in:
sdarbinyan
2026-02-20 01:46:14 +04:00
parent 070e254a5c
commit 083b270c74
23 changed files with 878 additions and 109 deletions

3
API.md
View File

@@ -230,6 +230,7 @@ Response 200:
"currency": "USD",
"imgs": ["https://...", "https://..."],
"tags": ["new", "featured"],
"badges": ["new", "exclusive"],
"simpleDescription": "Latest iPhone...",
"description": [
{ "key": "Color", "value": "Black" },
@@ -275,6 +276,7 @@ Body:
"currency": "USD", // USD | EUR | RUB | GBP | UAH
"imgs": ["https://..."],
"tags": ["new"],
"badges": ["new", "exclusive"], // optional - predefined or custom badge labels
"simpleDescription": "Short description",
"description": [
{ "key": "Size", "value": "Large" }
@@ -364,6 +366,7 @@ Response 201:
- Use `PATCH` for partial updates - send only the fields you want to change.
- `priority`: lower number = appears first in the list.
- `currency` supported values: `USD`, `EUR`, `RUB`, `GBP`, `UAH`.
- `badges`: optional string array. Predefined values with UI colors: `new`, `sale`, `exclusive`, `hot`, `limited`, `bestseller`, `featured`. Custom strings are also allowed.
- `imgs`: always send the **complete** array on update, not individual images.
- `description`: array of `{ key, value }` pairs - free-form attributes per item.
- Auto-save from the backoffice fires `PATCH` with a single field every ~500 ms.