ver. 0.321: API produkty — obsługa custom_fields w create/update

- ProductsApiController: parsowanie custom_fields z body (name, type, is_required)
- Zaktualizowano docs/API.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 13:54:33 +01:00
parent 904b649760
commit 6cf7b46584
3 changed files with 21 additions and 2 deletions

View File

@@ -302,11 +302,15 @@ Content-Type: application/json
}
},
"categories": [1, 5],
"products_related": [10, 20]
"products_related": [10, 20],
"custom_fields": [
{"name": "Napis na koszulce", "type": "text", "is_required": 1}
]
}
```
Wymagane: `languages` (min. 1 jezyk z `name`) oraz `price_brutto`.
`custom_fields` — opcjonalne; kazdy element wymaga `name`, `type` (domyslnie `text`), `is_required` (0/1).
Odpowiedz (HTTP 201):
```json