# Products API - pagination rework
Domyślny interface produktu
```
Product{
id: int; // default
name: string; // default
ean: string; // default
mesh_name: string; // default
dimension: string; // default
sub_folder: string; // default
valid_ean: string; // default
subbrand: string; // default
submacros: (w aplikacji brand) // default
category: string;
segment: string;
pack_name: string;
default_price: number;
description: string;
group: string;
producer: string;
status: string;
default_rotation: float;
default_price_promotion: float;
is_active: int;
thumbnail_id: int|null;
AvgPricePerItemAvg: float|null;
UnweightedRateOfSalesItemAvg: int|null;
channel: string;
id_repo: int|null,
thumbnail int|null;
}
```
## 1. Filtry
Paginacja będzie działać jak jest to opisane poniżej.
Pobieranie produktów
**Żądanie**
Endpoint: ```POST /products/all```
Powyższy endpoint przyjmuje w ciele żądania JSON, w który można wstawić pole `filters`.
Pole `filters` musi wyglądać jak następuje:
```
{
"filters": {
"lop": "or",
"0": {
"name": "id",
"value": 3
}
}
}
```
`lop` - logical operator, domyślnie jeśli wartość nie jest równa `or` to jest równa `and`, aby podać więcej niż jeden obiekt należy wprowadzić `or`.
`0` - de facto jest to n-ty z rzędu obiekt reprezentujący to, czego szukamy.
`name` - nazwa pola jak w intrerface `Product`
`value` - wartość: tekst, liczba całkowita, zmiennoprzecinkowa