API: products_get_all - lista wszystkich produktow klienta (bulk CL1)
This commit is contained in:
@@ -644,6 +644,63 @@ Bledy specyficzne:
|
||||
- Podano oba identyfikatory jednoczesnie: `422` z `"Provide only one identifier: client_id or google_ads_id"`
|
||||
- Klient nie znaleziony: `404` z `"Client not found"`
|
||||
|
||||
### 4.9 Lista wszystkich produktow klienta
|
||||
|
||||
- `action=products_get_all`
|
||||
- Cel: zwraca wszystkie produkty danego klienta (bez filtra), uzywane do bulk klasyfikacji custom_label_1 / przegladu pelnego asortymentu.
|
||||
|
||||
Parametry:
|
||||
- `api_key` (string, wymagany)
|
||||
- `client_id` (int, wymagany)
|
||||
|
||||
Uwagi:
|
||||
- Brak paginacji - zwraca komplet rekordow z tabeli `products` dla danego `client_id`, sortowane po `offer_id`.
|
||||
- Pola zwracane sa identyczne jak w `products_get_by_cl1` / `products_get_by_cl4`.
|
||||
|
||||
Przyklad:
|
||||
|
||||
```bash
|
||||
curl -X POST "https://example.com/api.php" \
|
||||
-d "action=products_get_all" \
|
||||
-d "api_key=YOUR_API_KEY" \
|
||||
-d "client_id=12"
|
||||
```
|
||||
|
||||
Przyklad odpowiedzi:
|
||||
|
||||
```json
|
||||
{
|
||||
"result": "ok",
|
||||
"client_id": 12,
|
||||
"count": 2,
|
||||
"products": [
|
||||
{
|
||||
"offer_id": "SKU-123",
|
||||
"title": "Lampa sufitowa boho 40cm",
|
||||
"default_name": "Lampa sufitowa boho 40cm",
|
||||
"custom_title": null,
|
||||
"google_product_category": "Home & Garden > Lighting > Light Fixtures",
|
||||
"custom_label_1": "lampy",
|
||||
"custom_label_3": "",
|
||||
"custom_label_4": ""
|
||||
},
|
||||
{
|
||||
"offer_id": "SKU-456",
|
||||
"title": "Tasma LED 5m RGB",
|
||||
"default_name": "Tasma LED 5m",
|
||||
"custom_title": "Tasma LED 5m RGB",
|
||||
"google_product_category": "Home & Garden > Lighting > Light Bulbs",
|
||||
"custom_label_1": "tasmy_led",
|
||||
"custom_label_3": "",
|
||||
"custom_label_4": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Bledy specyficzne:
|
||||
- Brak `client_id`: `422` z `"Missing required param: client_id"`
|
||||
|
||||
## 5. Walidacja i bledy
|
||||
|
||||
### 5.1 Brak wymaganych parametrow
|
||||
|
||||
Reference in New Issue
Block a user