Info
API służy do komunikacji programów z panelem VSC. Do uwierzytelniania wykorzystuje protokuł OAUTH2 (Laravel Passport).
Example response (404):
{
"status": "error",
"message": "No query results for model [App\\Entities\\Receipt]."
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
],
"surname": [
"The surname field is required."
]
}
}
Błędne odpowiedzi
Kody błędów:
- 401: Błąd uwierzytelniania (access token wygasł, lub jest nieprawidłowy).
- 404: Nie znaleziono zasobu.
- 405: Zasób istnieje, ale dana metoda nie jest zaimplementowana.
- 422: Błąd walidacji (zwykle przy dodawaniu/modyfikowaniu zasobu).
Filtry
W wielu miejscach API umozliwia zdefiniowanie parametru filters (zwykle w endpointach pobierających listę zasobów danego typu [index]). Parametr filters zawsze jest tablicą, dozwolone wartości kluczy w tej tablicy są opisane przy każdym endpoincie (w tabelce parametrów). Niedozwolone klucze (nie zaimplementowane w API) są ignorowane.
Dokumenty sprzedaży
Metody umożliwiające zarządzanie dokumentami sprzedaży.
Pobierz jeden
Pobiera informacje o pojedyńczym dokumencie sprzedaży.
Example request:
$response = \ApiClient::get("receipt/{id}"
);
curl -X GET -G "http://local.newprolo/api/receipt/{id}"
Example response (200):
{
"data": {
"id": 28332,
"programId": "KRUK",
"number": null,
"issueDate": null,
"file": null,
"name": "Jakub",
"surname": "Rousseau",
"phoneNo": "+48 787 720 321",
"street": "Złota 22\/3",
"city": "Kraków",
"postalCode": 66555,
"businessName": null,
"nip": null,
"modifiedDate": "2019-01-18 16:46:06"
},
"status": "ok",
"class": "receipt"
}
HTTP Request
GET api/receipt/{id}
Dodaj jeden
Zapisuje nowy dokument sprzedaży.
Example request:
$response = \ApiClient::post("receipt",
[
"name" => "Jakub",
"surname" => "Rousseau",
"phoneNo" => "+48 787 720 321",
"street" => "Złota 22/3",
"city" => "Kraków",
"postalCode" => "66-555"
]
);
curl -X POST "http://local.newprolo/api/receipt" -d "name"="Jakub" \
-d "surname"="Rousseau" \
-d "phoneNo"="+48 787 720 321" \
-d "street"="Złota 22/3" \
-d "city"="Kraków" \
-d "postalCode"="66-555" \
-d "businessName"="" \
-d "nip"="0"
Example response (200):
{
"id": 28331,
"href": "\/receipt\/28331"
}
HTTP Request
POST api/receipt
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| name | string | required | Imię uczestnika (max:45). |
| surname | string | required | Nazwisko uczestnika (max:45). |
| phoneNo | string | required | Numer telefonu (regex:/^(+\d{2}\s?)?(?\d{2})?(\s?\d\s?){7}/). |
| street | string | required | Adres / Ulica (max:128). |
| city | string | required | Miejscowość (max:45). |
| postalCode | string | required | Kod pocztowy (regex:/^[0-9]{2}[.\/_-\s]?[0-9]{3}$/). |
| businessName | string | optional | Nazwa firmy (max:255). |
| nip | integer | optional | Numer NIP. |
Dodaj wiele
Tworzy dokumenty sprzedaży dla wielu zamówień.
Dane osobowe są takie same na wszystkich dokumentach (przesyłamy raz).
Example request:
$response = \ApiClient::post("receipts",
[
"name" => "Jakub",
"surname" => "Rousseau",
"phoneNo" => "+48 787 720 321",
"street" => "Złota 22/3",
"city" => "Kraków",
"postalCode" => "66-555",
"orders" => [42573,42650]
]
);
curl -X POST "http://local.newprolo/api/receipts" -d "name"="Jakub" \
-d "surname"="Rousseau" \
-d "phoneNo"="+48 787 720 321" \
-d "street"="Złota 22/3" \
-d "city"="Kraków" \
-d "postalCode"="66-555" \
-d "businessName"="" \
-d "nip"="0" \
-d "orders"="[42573,42650]"
Example response (200):
{
"42573 (id zamówienia 1)": "28332 (id dokumentu 1)",
"42650 (id zamówienia 2)": "28333 (id dokumentu 2)"
}
HTTP Request
POST api/receipts
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| name | string | required | Imię uczestnika (max:45). |
| surname | string | required | Nazwisko uczestnika (max:45). |
| phoneNo | string | required | Numer telefonu (regex:/^(+\d{2}\s?)?(?\d{2})?(\s?\d\s?){7}/). |
| street | string | required | Adres / Ulica (max:128). |
| city | string | required | Miejscowość (max:45). |
| postalCode | string | required | Kod pocztowy (regex:/^[0-9]{2}[.\/_-\s]?[0-9]{3}$/). |
| businessName | string | optional | Nazwa firmy (max:255). |
| nip | integer | optional | Numer NIP. |
| orders | array | required | Lista id zamówień, do których mają być przypisane dokumenty sprzedaży. |
Katalogi nagród
Metody umożliwiające zarządzanie katalogami nagród.
Lista katalogów
Pobranie listy katalogów przypisanych do programu.
Example request:
$response = \ApiClient::get("catalog"
);
curl -X GET -G "http://local.newprolo/api/catalog"
Example response (200):
{
"data": [
{
"id": 3,
"programId": "KRUK",
"name": "Katalog główny",
"isSeasonal": 0,
"dateFrom": "0000-00-00 00:00:00",
"dateTo": "0000-00-00 00:00:00",
"active": 1
}
],
"status": "ok",
"class": "collection:catalog"
}
HTTP Request
GET api/catalog
Pobierz katalog
Pobranie informacji o konkretnym katalogu.
Example request:
$response = \ApiClient::get("catalog/{id}"
);
curl -X GET -G "http://local.newprolo/api/catalog/{id}"
Example response (200):
{
"data": {
"id": 3,
"programId": "KRUK",
"name": "Katalog główny",
"isSeasonal": 0,
"dateFrom": "0000-00-00 00:00:00",
"dateTo": "0000-00-00 00:00:00",
"active": 1
},
"status": "ok",
"class": "catalog"
}
HTTP Request
GET api/catalog/{id}
Lista kategorii
Pobranie listy kategorii w danym programie.
Jeżeli prześlemy parametr "catalogId", ograniczymy zwrócony wynik do wybranego katalogu.
Example request:
$response = \ApiClient::get("category",
[
"catalogId" => 3
]
);
curl -X GET -G "http://local.newprolo/api/category"
Example response (200):
{
"data": [
{
"categoryId": 1,
"catalogId": 3,
"programId": "KRUK",
"name": "Czas na gotowanie",
"color": ""
},
{
"categoryId": 2,
"catalogId": 3,
"programId": "KRUK",
"name": "Kuchenne rewelacje",
"color": ""
},
{
"categoryId": 3,
"catalogId": 3,
"programId": "KRUK",
"name": "Dla domu i nie tylko",
"color": ""
},
{
"categoryId": 4,
"catalogId": 3,
"programId": "KRUK",
"name": "Dla Niej i dla Niego",
"color": ""
},
{
"categoryId": 5,
"catalogId": 3,
"programId": "KRUK",
"name": "Męska rzecz",
"color": ""
},
{
"categoryId": 6,
"catalogId": 3,
"programId": "KRUK",
"name": "Foto i wideo zabawa",
"color": ""
},
{
"categoryId": 7,
"catalogId": 3,
"programId": "KRUK",
"name": "Multimedialne gadżety",
"color": ""
},
{
"categoryId": 8,
"catalogId": 3,
"programId": "KRUK",
"name": "Wirtualny świat",
"color": ""
},
{
"categoryId": 9,
"catalogId": 3,
"programId": "KRUK",
"name": "Z myślą o dzieciach",
"color": ""
},
{
"categoryId": 10,
"catalogId": 3,
"programId": "KRUK",
"name": "W zdrowym ciele",
"color": ""
},
{
"categoryId": 11,
"catalogId": 3,
"programId": "KRUK",
"name": "Podróże z pasją",
"color": ""
},
{
"categoryId": 55,
"catalogId": 3,
"programId": "KRUK",
"name": "Świąteczne marzenia",
"color": null
},
{
"categoryId": 108,
"catalogId": 3,
"programId": "KRUK",
"name": "Strefa Marzeń",
"color": "0099ff"
},
{
"categoryId": 119,
"catalogId": 3,
"programId": "KRUK",
"name": "Jesienne marzenia",
"color": "800000"
}
],
"status": "ok",
"class": "collection:category"
}
HTTP Request
GET api/category
Query Parameters
| Parameter | Status | Description |
|---|---|---|
| catalogId | optional | ID katalogu (int). |
Lista progów
Pobranie listy progów w danym programie.
Jeżeli podamy parametr "catalogId", ograniczymy zwrócony wynik do wybranego katalogu.
Example request:
$response = \ApiClient::get("range",
[
"catalogId" => 3,
"order" => "defaultPoints",
"notEmpty" => "true"
]
);
curl -X GET -G "http://local.newprolo/api/range"
Example response (200):
{
"data": [
{
"rangeId": "JM",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "10000.00",
"defaultPoints": 0,
"defaultProvision": 8,
"color": "800000",
"range": "JM"
},
{
"rangeId": "A",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "25.00",
"defaultPoints": 420,
"defaultProvision": 8,
"color": "f1a527",
"range": "A"
},
{
"rangeId": "B",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "50.00",
"defaultPoints": 840,
"defaultProvision": 8,
"color": "e97034",
"range": "B"
},
{
"rangeId": "C",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "100.00",
"defaultPoints": 1670,
"defaultProvision": 8,
"color": "e11938",
"range": "C"
},
{
"rangeId": "D",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "150.00",
"defaultPoints": 2500,
"defaultProvision": 8,
"color": "c11d38",
"range": "D"
},
{
"rangeId": "E",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "200.00",
"defaultPoints": 3340,
"defaultProvision": 8,
"color": "622b26",
"range": "E"
},
{
"rangeId": "F",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "250.00",
"defaultPoints": 4170,
"defaultProvision": 8,
"color": "d41681",
"range": "F"
},
{
"rangeId": "G",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "300.00",
"defaultPoints": 5000,
"defaultProvision": 8,
"color": "8d4491",
"range": "G"
},
{
"rangeId": "H",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "400.00",
"defaultPoints": 6670,
"defaultProvision": 8,
"color": "5a4897",
"range": "H"
},
{
"rangeId": "I",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "500.00",
"defaultPoints": 8340,
"defaultProvision": 8,
"color": "3e317c",
"range": "I"
},
{
"rangeId": "J",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "700.00",
"defaultPoints": 11670,
"defaultProvision": 8,
"color": "205aa7",
"range": "J"
},
{
"rangeId": "K",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "900.00",
"defaultPoints": 15000,
"defaultProvision": 8,
"color": "0383b3",
"range": "K"
},
{
"rangeId": "L",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "1200.00",
"defaultPoints": 20000,
"defaultProvision": 8,
"color": "08ada4",
"range": "L"
},
{
"rangeId": "M",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "1700.00",
"defaultPoints": 28340,
"defaultProvision": 8,
"color": "04b157",
"range": "M"
},
{
"rangeId": "N",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "2200.00",
"defaultPoints": 36670,
"defaultProvision": 8,
"color": "006843",
"range": "N"
},
{
"rangeId": "O",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "3000.00",
"defaultPoints": 50000,
"defaultProvision": 8,
"color": "ababab",
"range": "O"
},
{
"rangeId": "NZ",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "4000.00",
"defaultPoints": 66670,
"defaultProvision": 8,
"color": "0099ff",
"range": "NZ"
}
],
"status": "ok",
"class": "collection:range"
}
HTTP Request
GET api/range
Query Parameters
| Parameter | Status | Description |
|---|---|---|
| catalogId | optional | ID katalogu (int). |
| order | optional | Nazwa kolumny lub wyrażenie, które posłuży do posortowania wyników (string). |
| notEmpty | optional | Czy wykluczyć z wyniku progi nie zawierające aktywnych nagród (bool). |
Lista nagród
Pobranie listy nagród w danym programie.
Jeżeli podamy parametr "catalogId", ograniczymy zwrócony wynik do wybranego katalogu. Jeżeli prześlemy parametr "pagination" (różny od 0), Wynik bedzie zawierał dodatkowo metadane paginacji oraz linki do innych porcji wyników.
Example request:
$response = \ApiClient::get("reward",
[
"catalogId" => 3,
"query" => "telewizor"
]
);
curl -X GET -G "http://local.newprolo/api/reward"
Example response (200):
{
"data": [
{
"programId": "KRUK",
"rewardId": 1802,
"catalogId": 3,
"code": "L3",
"price": "1072.70",
"points": 20000,
"provision": 8,
"range": {
"rangeId": "L",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "1200.00",
"defaultPoints": 20000,
"defaultProvision": 8,
"color": "08ada4"
},
"categoryId": 6,
"startDate": 1537367383,
"endDate": null,
"active": 1,
"isSeasonal": 0,
"modifiedDate": "2018-09-19 16:30:34",
"category": {
"categoryId": 6,
"programId": "KRUK",
"name": "Foto i wideo zabawa",
"color": ""
},
"reward": {
"id": 1802,
"nameId": 127,
"producerId": 19,
"supplierId": 9,
"categoryId": 16,
"startDate": 1537367293,
"endDate": null,
"model": "UE32N5002",
"price": "1003.0000",
"priceMargin": 5,
"logisticValue": "30.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": [
"przekątna ekranu: 32\"",
"technologia: Full HD",
"złącza HDMI i USB",
"tuner DVB-T"
],
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": "",
"purchaseUnit": "",
"pkwiu": "",
"netWeight": "0.00",
"grossWeight": "0.00",
"rewardName": "Telewizor LED 32\"",
"producer": {
"id": 19,
"name": "Samsung",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.samsung.com\/pl"
},
"variants": [
{
"id": 2080,
"rewardId": 1802,
"number": 0,
"ean": "8801643248246",
"default": 1,
"option": null
}
]
}
},
{
"programId": "KRUK",
"rewardId": 1804,
"catalogId": 3,
"code": "M3",
"price": "1605.40",
"points": 28340,
"provision": 8,
"range": {
"rangeId": "M",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "1700.00",
"defaultPoints": 28340,
"defaultProvision": 8,
"color": "04b157"
},
"categoryId": 6,
"startDate": 1537368484,
"endDate": null,
"active": 1,
"isSeasonal": 0,
"modifiedDate": "2018-09-19 16:51:51",
"category": {
"categoryId": 6,
"programId": "KRUK",
"name": "Foto i wideo zabawa",
"color": ""
},
"reward": {
"id": 1804,
"nameId": 565,
"producerId": 52,
"supplierId": 9,
"categoryId": 16,
"startDate": 1537368433,
"endDate": null,
"model": "43UK6500",
"price": "1508.0000",
"priceMargin": 10,
"logisticValue": "39.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": [
"przekątna ekranu: 43\"",
"technologia UHD 4K",
"Samsung Smart TV",
"tuner DVB-T"
],
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": "",
"purchaseUnit": "",
"pkwiu": "",
"netWeight": "0.00",
"grossWeight": "0.00",
"rewardName": "Telewizor LED 43\" 4K UHD",
"producer": {
"id": 52,
"name": "LG",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.lg.com\/pl"
},
"variants": [
{
"id": 2082,
"rewardId": 1804,
"number": 0,
"ean": "8806098142767",
"default": 1,
"option": null
}
]
}
},
{
"programId": "KRUK",
"rewardId": 1806,
"catalogId": 3,
"code": "O3",
"price": "2999.10",
"points": 50000,
"provision": 8,
"range": {
"rangeId": "O",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "3000.00",
"defaultPoints": 50000,
"defaultProvision": 8,
"color": "ababab"
},
"categoryId": 6,
"startDate": 1537369379,
"endDate": null,
"active": 1,
"isSeasonal": 0,
"modifiedDate": "2018-09-19 17:04:07",
"category": {
"categoryId": 6,
"programId": "KRUK",
"name": "Foto i wideo zabawa",
"color": ""
},
"reward": {
"id": 1806,
"nameId": 566,
"producerId": 19,
"supplierId": 9,
"categoryId": 16,
"startDate": 1537369325,
"endDate": null,
"model": "UE55NU7402",
"price": "2990.0000",
"priceMargin": 5,
"logisticValue": "35.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": [
"technologia Ultra HD (4K)",
"Samsung Smart TV",
"tuner DVB-T MPEG-4",
"złącza:USB, HDMI"
],
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": "",
"purchaseUnit": "",
"pkwiu": "",
"netWeight": "0.00",
"grossWeight": "0.00",
"rewardName": "Telewizor LED 55\" 4K UHD",
"producer": {
"id": 19,
"name": "Samsung",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.samsung.com\/pl"
},
"variants": [
{
"id": 2084,
"rewardId": 1806,
"number": 0,
"ean": "8801643182205",
"default": 1,
"option": null
}
]
}
}
],
"status": "ok",
"class": "collection:reward"
}
HTTP Request
GET api/reward
Query Parameters
| Parameter | Status | Description |
|---|---|---|
| catalogId | optional | ID katalogu (int). |
| filters | optional | Tablica filtrów. Obsługiwane wartości: range (string), categoryId (int), points (zakres, np. "120,500"), catalogId (int), isSeasonal (bool), code (string). |
| pagination | optional | Liczba rekordów w wyniku (int). |
| page | optional | Numer strony do pobrania (int). |
| grouping | optional | Po jakiej kolumnie mają być zgrupowane wyniki (string) np. "range" (dostaniemy wyniki zgrupowane po progach punktowych). |
| query | optional | Ciąg znaków, na podstawie którego będą wyszukiwane nagrody (pod uwagę są brane kolumny: "program_reward.code", "reward.model", "reward_name.name", "company.name"). |
| order | optional | Nazwa kolumny lub wyrażenie, które posłuży do posortowania wyników (string). |
Pobierz nagrodę
Pobranie informacji o pojedynczej nagrodzie.
Example request:
$response = \ApiClient::get("reward/{catalog},{id}"
);
curl -X GET -G "http://local.newprolo/api/reward/{catalog},{id}"
Example response (200):
{
"data": {
"programId": "KRUK",
"rewardId": 9,
"catalogId": 3,
"code": "A10",
"price": "24.90",
"points": 420,
"provision": 8,
"range": {
"rangeId": "A",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "25.00",
"defaultPoints": 420,
"defaultProvision": 8,
"color": "f1a527"
},
"categoryId": 9,
"startDate": 1365153475,
"endDate": null,
"active": 1,
"isSeasonal": 0,
"modifiedDate": "2018-09-17 14:32:11",
"category": {
"categoryId": 9,
"programId": "KRUK",
"name": "Z myślą o dzieciach",
"color": ""
},
"reward": {
"id": 9,
"nameId": 120,
"producerId": 24,
"supplierId": 23,
"categoryId": 19,
"startDate": 1540941608,
"endDate": null,
"model": "Piramidka",
"price": "24.0000",
"priceMargin": 0,
"logisticValue": "12.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": [
"zabawka edukacyjna dla najmłodszych",
"kształtuje zdolności manualne",
"i poznawcze dziecka",
"dla dzieci od 6 miesiąca życia"
],
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": "",
"purchaseUnit": "",
"pkwiu": "",
"netWeight": "0.00",
"grossWeight": "0.00",
"rewardName": "Zabawka edukacyjna",
"producer": {
"id": 24,
"name": "Fisher Price",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.fisher-price.com"
},
"variants": [
{
"id": 9,
"rewardId": 9,
"number": 0,
"ean": "887961520576",
"default": 1,
"option": null
}
]
}
},
"status": "ok",
"class": "reward"
}
HTTP Request
GET api/reward/{catalog},{id}
Katalogi nagród v3
Lista progów
Pobranie listy progów w danym programie.
Jeżeli podamy parametr "catalogId", ograniczymy zwrócony wynik do wybranego katalogu.
Example request:
$response = \ApiClient::get("v3/ranges",
[
"catalogId" => 3,
"notEmpty" => "true"
]
);
curl -X GET -G "https://api.badaniatk.local/api/v3/ranges"
Example response (200):
{
"data": [
{
"rangeId": "A",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "54.50",
"defaultPoints": 100,
"defaultProvision": 8,
"color": "efbf5f"
},
{
"rangeId": "B",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "207.00",
"defaultPoints": 300,
"defaultProvision": 8,
"color": "efa25a"
},
{
"rangeId": "C",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "360.00",
"defaultPoints": 500,
"defaultProvision": 8,
"color": "f49b90"
},
{
"rangeId": "D",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "500.00",
"defaultPoints": 600,
"defaultProvision": 8,
"color": "e94a54"
},
{
"rangeId": "E",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "741.00",
"defaultPoints": 1000,
"defaultProvision": 8,
"color": "af6aa9"
},
{
"rangeId": "F",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "1123.00",
"defaultPoints": 1500,
"defaultProvision": 8,
"color": "b4d6a1"
},
{
"rangeId": "G",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "1505.00",
"defaultPoints": 2000,
"defaultProvision": 8,
"color": "49b299"
},
{
"rangeId": "H",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "2268.00",
"defaultPoints": 3000,
"defaultProvision": 8,
"color": "2a9264"
},
{
"rangeId": "I",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "3032.00",
"defaultPoints": 4000,
"defaultProvision": 8,
"color": "006074"
},
{
"rangeId": "J",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "3795.00",
"defaultPoints": 5000,
"defaultProvision": 8,
"color": "31a4cb"
},
{
"rangeId": "K",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "5703.00",
"defaultPoints": 7500,
"defaultProvision": 8,
"color": "2875b7"
},
{
"rangeId": "L",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "7612.00",
"defaultPoints": 10000,
"defaultProvision": 8,
"color": "134066"
}
],
"status": "ok",
"class": "collection:ranges"
}
HTTP Request
GET api/v3/ranges
Query Parameters
| Parameter | Status | Description |
|---|---|---|
| catalogId | optional | ID katalogu (int). |
| notEmpty | optional | Czy wykluczyć z wyniku progi nie zawierające aktywnych nagród (bool). |
Lista progów wraz z nagrodami
Pobranie listy progów w danym programie wraz z nagrodami.
Jeżeli podamy parametr "catalogId", ograniczymy zwrócony wynik do wybranego katalogu.
Example request:
$response = \ApiClient::get("v3/ranges-with-rewards",
[
"catalogId" => 3,
"notEmpty" => "true"
]
);
curl -X GET -G "https://api.badaniatk.local/api/v3/ranges-with-rewards"
Example response (200):
{
"data": [
{
"rangeId": "A",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "54.50",
"defaultPoints": 100,
"defaultProvision": 8,
"color": "efbf5f",
"program_reward": [
{
"programId": "SONEP",
"rewardId": 4527,
"catalogId": 98,
"code": "A9",
"price": "44.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 270,
"startDate": 1710941497,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 270,
"programId": "SONEP",
"name": "Dla domu i nie tylko",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 4527,
"nameId": 89,
"producerId": 295,
"supplierId": 16,
"categoryId": 14,
"gtuCode": null,
"startDate": 1654078703,
"endDate": null,
"model": "632090000 Rosalia",
"price": "35.0000",
"priceMargin": 10,
"logisticValue": "23.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "moc: 1200 W|regulacja prędkości nadmuchu|ergonomiczna rękojeść|długość przewodu zasilającego: 1,6 m|składana rączka",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Suszarka",
"sensitive": 0
},
"producer": {
"id": 295,
"name": "ETA",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 5081,
"rewardId": 4527,
"number": 0,
"ean": "8590393261079",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 1,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 4612,
"catalogId": 98,
"code": "A3",
"price": "45.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 272,
"startDate": 1710937954,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 272,
"programId": "SONEP",
"name": "Męska rzecz",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 4612,
"nameId": 47,
"producerId": 12,
"supplierId": 12,
"categoryId": 24,
"gtuCode": null,
"startDate": 1660044051,
"endDate": null,
"model": "X-line 33",
"price": "34.5000",
"priceMargin": 15,
"logisticValue": "17.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "wiertła do metalu, muru i drewna|końcówki wkręcające|klucze nasadowe|uchwyt uniwersalny",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": "Chiny",
"purchaseUnit": "szt",
"pkwiu": null,
"netWeight": "0.53",
"grossWeight": "0.54",
"cnCode": null,
"name": {
"name": "Zestaw akcesoriów",
"sensitive": 0
},
"producer": {
"id": 12,
"name": "Bosch",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer,supplier",
"region": null,
"www": "www.bosch-home.pl"
},
"variant": [
{
"id": 5178,
"rewardId": 4612,
"number": 1,
"ean": "3165140379489",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5707,
"catalogId": 98,
"code": "A1",
"price": "54.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 273,
"startDate": 1710936708,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 273,
"programId": "SONEP",
"name": "Dla Niej i dla Niego",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5707,
"nameId": 360,
"producerId": 5,
"supplierId": 8,
"categoryId": 14,
"gtuCode": null,
"startDate": 1708337806,
"endDate": null,
"model": "PP1500V0",
"price": "40.0000",
"priceMargin": 20,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "wyświetlacz LCD|max. obciążenie: 160 kg|dokładność pomiaru do 100g",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Waga łazienkowa",
"sensitive": 0
},
"producer": {
"id": 5,
"name": "Tefal",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.tefal.pl"
},
"variant": [
{
"id": 6419,
"rewardId": 5707,
"number": 1,
"ean": "3121040079362",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5763,
"catalogId": 98,
"code": "A2",
"price": "54.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 270,
"startDate": 1710937393,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 270,
"programId": "SONEP",
"name": "Dla domu i nie tylko",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5763,
"nameId": 58,
"producerId": 5,
"supplierId": 8,
"categoryId": 14,
"gtuCode": null,
"startDate": 1611588356,
"endDate": null,
"model": "28 cm B5720653",
"price": "42.5600",
"priceMargin": 20,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "powłoka nieprzywierająca|do kuchenek: ceramicznych, gazowych i elektrycznych|nie nadaje się na kuchenki indukcyjne!|średnica patelni: 28 cm",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Patelnia",
"sensitive": 0
},
"producer": {
"id": 5,
"name": "Tefal",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.tefal.pl"
},
"variant": [
{
"id": 6478,
"rewardId": 5763,
"number": 0,
"ean": "3168430319240",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5792,
"catalogId": 98,
"code": "A5",
"price": "54.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 273,
"startDate": 1710938197,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 273,
"programId": "SONEP",
"name": "Dla Niej i dla Niego",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5792,
"nameId": 283,
"producerId": 604,
"supplierId": 603,
"categoryId": 18,
"gtuCode": null,
"startDate": 1710938489,
"endDate": null,
"model": "SC00232 150x130 cm",
"price": "48.0000",
"priceMargin": 15,
"logisticValue": "23.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "spód wykonany jest z wodoodpornej i zmywalnej folii Al|nie wchłania wody|wymiary: 150 x 130 cm",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Koc piknikowy",
"sensitive": 0
},
"producer": {
"id": 604,
"name": "Yate",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 6507,
"rewardId": 5792,
"number": 1,
"ean": "8595053905430",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5793,
"catalogId": 98,
"code": "A6",
"price": "54.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 271,
"startDate": 1710938565,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 271,
"programId": "SONEP",
"name": "Podróże z pasją",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5793,
"nameId": 1144,
"producerId": 604,
"supplierId": 603,
"categoryId": 23,
"gtuCode": null,
"startDate": 1710940059,
"endDate": null,
"model": "SR00007",
"price": "40.0000",
"priceMargin": 10,
"logisticValue": "23.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "wymiary ręcznika: 66 x 125 cm|kolor ciemnoniebieski|kolor kremowy",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Ręcznik podróżny",
"sensitive": 0
},
"producer": {
"id": 604,
"name": "Yate",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 6508,
"rewardId": 5793,
"number": 1,
"ean": "8595053923144",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5794,
"catalogId": 98,
"code": "A7",
"price": "54.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 273,
"startDate": 1710940172,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 273,
"programId": "SONEP",
"name": "Dla Niej i dla Niego",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5794,
"nameId": 1087,
"producerId": 604,
"supplierId": 603,
"categoryId": 14,
"gtuCode": null,
"startDate": 1710940612,
"endDate": null,
"model": "SN00234",
"price": "49.0000",
"priceMargin": 15,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "wykonany jest ze stali nierdzewnej 18\/8|pojemność użytkowa: 0,75 l|zewnętrzna nasadka służy jako kubek do picia",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Termos",
"sensitive": 0
},
"producer": {
"id": 604,
"name": "Yate",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 6509,
"rewardId": 5794,
"number": 1,
"ean": "8595053927104",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5795,
"catalogId": 98,
"code": "A8",
"price": "54.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 271,
"startDate": 1710940650,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 271,
"programId": "SONEP",
"name": "Podróże z pasją",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5795,
"nameId": 274,
"producerId": 604,
"supplierId": 603,
"categoryId": 24,
"gtuCode": null,
"startDate": 1710941409,
"endDate": null,
"model": "VEGA AKU czarna SE00048",
"price": "49.0000",
"priceMargin": 5,
"logisticValue": "17.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "akumulatorowa latarka czołowa|czas świecenia: do 50 godzin|odległość oświetlenia: 150 m",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": "0.00",
"grossWeight": "0.00",
"cnCode": null,
"name": {
"name": "Latarka czołowa",
"sensitive": 0
},
"producer": {
"id": 604,
"name": "Yate",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 6510,
"rewardId": 5795,
"number": 1,
"ean": "8595053914050",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5796,
"catalogId": 98,
"code": "A10",
"price": "49.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 269,
"startDate": 1710941746,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 269,
"programId": "SONEP",
"name": "W zdrowym ciele",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5796,
"nameId": 280,
"producerId": 604,
"supplierId": 603,
"categoryId": 18,
"gtuCode": null,
"startDate": 1710942017,
"endDate": null,
"model": "SA04718",
"price": "39.0000",
"priceMargin": 15,
"logisticValue": "23.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "mata do ćwiczeń z antypoślizgową powierzchnią|materiał PVC|rozmiar: 173 x 61 x0,4 cm",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Mata do ćwiczeń",
"sensitive": 0
},
"producer": {
"id": 604,
"name": "Yate",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 6511,
"rewardId": 5796,
"number": 1,
"ean": "8595053905263",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5940,
"catalogId": 98,
"code": "A4",
"price": "54.00",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 273,
"startDate": 1715684348,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": "2024-05-07 18:04:42",
"category": {
"categoryId": 273,
"programId": "SONEP",
"name": "Dla Niej i dla Niego",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5940,
"nameId": 208,
"producerId": 14,
"supplierId": 14,
"categoryId": 18,
"gtuCode": null,
"startDate": 1715684315,
"endDate": null,
"model": "OTARO 928597",
"price": "44.7400",
"priceMargin": 10,
"logisticValue": "23.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "wykonany w technologii rip-stop, która zapobiega rozdzieraniu i niszczeniu się materiału|posiada elementy odblaskowe|idealny na rower ,, na spacer czy do biegania|wymiary: 42 x 25 x 12 cm|pojemność: 5 l",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Plecak",
"sensitive": 0
},
"producer": {
"id": 14,
"name": "Spokey",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer,supplier",
"region": null,
"www": "http:\/\/spokey.pl"
},
"variant": [
{
"id": 6657,
"rewardId": 5940,
"number": 1,
"ean": "5902693285977",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5947,
"catalogId": 98,
"code": "A11",
"price": "54.50",
"points": 100,
"provision": 8,
"range": "A",
"categoryId": 273,
"startDate": 1716370362,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": "2024-05-22 08:10:40",
"category": {
"categoryId": 273,
"programId": "SONEP",
"name": "Dla Niej i dla Niego",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5947,
"nameId": 368,
"producerId": 180,
"supplierId": 67,
"categoryId": 25,
"gtuCode": null,
"startDate": 1716370338,
"endDate": null,
"model": "079955 01 Czarny",
"price": "36.9900",
"priceMargin": 20,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "komora główna zapinana na suwak|wewnętrzna kieszeń zapinana na zamek|wymiary: 14 x 21 x 2 cm",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Saszetka męska",
"sensitive": 0
},
"producer": {
"id": 180,
"name": "Puma",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 6664,
"rewardId": 5947,
"number": 5,
"ean": "4099683450949",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
}
]
},
{
"rangeId": "B",
"programId": "SONEP",
"catalogId": 98,
"defaultPrice": "207.00",
"defaultPoints": 300,
"defaultProvision": 8,
"color": "efa25a",
"program_reward": [
{
"programId": "SONEP",
"rewardId": 1030,
"catalogId": 98,
"code": "B7",
"price": "205.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 272,
"startDate": 1710943539,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 272,
"programId": "SONEP",
"name": "Męska rzecz",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 1030,
"nameId": 152,
"producerId": 12,
"supplierId": 12,
"categoryId": 24,
"gtuCode": null,
"startDate": 1467713951,
"endDate": null,
"model": "PST 650 06033A0720",
"price": "177.0000",
"priceMargin": 10,
"logisticValue": "23.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "głębokość cięcia: w drewnie 65 mm, w stali: 4 mm|miękka rękojeść Softgrip|moc: 500 W",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": "0.00",
"grossWeight": "0.00",
"cnCode": null,
"name": {
"name": "Wyrzynarka",
"sensitive": 0
},
"producer": {
"id": 12,
"name": "Bosch",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer,supplier",
"region": null,
"www": "www.bosch-home.pl"
},
"variant": [
{
"id": 1170,
"rewardId": 1030,
"number": 0,
"ean": "3165140653275",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 1406,
"catalogId": 98,
"code": "B3",
"price": "185.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 270,
"startDate": 1710942480,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 270,
"programId": "SONEP",
"name": "Dla domu i nie tylko",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 1406,
"nameId": 50,
"producerId": 30,
"supplierId": 30,
"categoryId": 14,
"gtuCode": null,
"startDate": 1492778116,
"endDate": 1656540033,
"model": "Ambiente 983",
"price": "144.9900",
"priceMargin": 15,
"logisticValue": "22.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "komplet 5 noży w bloku|ostrza wykonane ze stali nierdzewnej|noże: kuchenne, do chleba oraz do jarzyn\/owoców|lakierowany czarny blok z drewna bukowego",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": "Chiny",
"purchaseUnit": "szt",
"pkwiu": null,
"netWeight": "2.20",
"grossWeight": "2.50",
"cnCode": null,
"name": {
"name": "Zestaw noży",
"sensitive": 0
},
"producer": {
"id": 30,
"name": "Gerlach",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer,supplier",
"region": null,
"www": "http:\/\/www.gerlach.pl"
},
"variant": [
{
"id": 1622,
"rewardId": 1406,
"number": 0,
"ean": "5901035489448",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 2870,
"catalogId": 98,
"code": "B9",
"price": "207.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 270,
"startDate": 1710944105,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 270,
"programId": "SONEP",
"name": "Dla domu i nie tylko",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 2870,
"nameId": 16,
"producerId": 30,
"supplierId": 30,
"categoryId": 14,
"gtuCode": null,
"startDate": 1590053138,
"endDate": null,
"model": "First 10 el.",
"price": "204.3700",
"priceMargin": 15,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "do użytku na wszystkich rodzajach kuchenek|możliwość mycia w zmywarce|średnice: 16\/18\/20\/22\/24 cm",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Komplet garnków",
"sensitive": 0
},
"producer": {
"id": 30,
"name": "Gerlach",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer,supplier",
"region": null,
"www": "http:\/\/www.gerlach.pl"
},
"variant": [
{
"id": 3154,
"rewardId": 2870,
"number": 0,
"ean": "5901035502758",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 4448,
"catalogId": 98,
"code": "B4",
"price": "199.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 271,
"startDate": 1710942728,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 271,
"programId": "SONEP",
"name": "Podróże z pasją",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 4448,
"nameId": 159,
"producerId": 77,
"supplierId": 480,
"categoryId": 18,
"gtuCode": null,
"startDate": 1652878666,
"endDate": null,
"model": "PC029C 7A",
"price": "154.0000",
"priceMargin": 15,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "uchwyt wysuwany teleskopowo|wykonana z poliwęglanu|zamek szyfrowany TSA|wymiary: 55 x 39 x 20 cm|pojemność: 38,9 l|waga: 2,5 kg",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Mała walizka",
"sensitive": 0
},
"producer": {
"id": 77,
"name": "Puccini",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 4909,
"rewardId": 4448,
"number": 1,
"ean": "5902308016248",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5081,
"catalogId": 98,
"code": "B2",
"price": "180.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 270,
"startDate": 1710942352,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 270,
"programId": "SONEP",
"name": "Dla domu i nie tylko",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5081,
"nameId": 269,
"producerId": 12,
"supplierId": 12,
"categoryId": 14,
"gtuCode": null,
"startDate": 1677763061,
"endDate": 1656540020,
"model": "06008B7200 GlassVAC Solo+",
"price": "165.0000",
"priceMargin": 5,
"logisticValue": "23.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "idealna do mycia okien, witryn lub kabin prysznicowych|czas ładowania baterii: 130 min|zasilana akumulatorem|czas pracy: 30 min",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Myjka do szyb",
"sensitive": 0
},
"producer": {
"id": 12,
"name": "Bosch",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer,supplier",
"region": null,
"www": "www.bosch-home.pl"
},
"variant": [
{
"id": 5727,
"rewardId": 5081,
"number": 1,
"ean": "3165140976374",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5301,
"catalogId": 98,
"code": "B5",
"price": "204.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 270,
"startDate": 1710942854,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 270,
"programId": "SONEP",
"name": "Dla domu i nie tylko",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5301,
"nameId": 634,
"producerId": 30,
"supplierId": 30,
"categoryId": 14,
"gtuCode": null,
"startDate": 1689852982,
"endDate": null,
"model": "20\/24\/28 cm Smart Steel",
"price": "179.0000",
"priceMargin": 10,
"logisticValue": "24.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "wykonane ze stali nierdzewnej|odłączana rączka|do użytku na wszystkich rodzajach kuchenek|rozmiary patelni: 20, 24 i 28 cm",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Zestaw patelni",
"sensitive": 0
},
"producer": {
"id": 30,
"name": "Gerlach",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer,supplier",
"region": null,
"www": "http:\/\/www.gerlach.pl"
},
"variant": [
{
"id": 5962,
"rewardId": 5301,
"number": 1,
"ean": "5901035506145",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5773,
"catalogId": 98,
"code": "B1",
"price": "207.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 270,
"startDate": 1710942212,
"endDate": null,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 270,
"programId": "SONEP",
"name": "Dla domu i nie tylko",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5773,
"nameId": 117,
"producerId": 5,
"supplierId": 8,
"categoryId": 14,
"gtuCode": null,
"startDate": 1710246221,
"endDate": null,
"model": "HB944138",
"price": "189.0000",
"priceMargin": 10,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "wielofunkcyjny blender kuchenny|szatkuje, blenduje, ubija i miksuje|nóż ze stali szlachetnej|moc: 1000 W",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Blender",
"sensitive": 0
},
"producer": {
"id": 5,
"name": "Tefal",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.tefal.pl"
},
"variant": [
{
"id": 6488,
"rewardId": 5773,
"number": 1,
"ean": "3016667242438",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5797,
"catalogId": 98,
"code": "B6",
"price": "189.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 269,
"startDate": 1710943198,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 269,
"programId": "SONEP",
"name": "W zdrowym ciele",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5797,
"nameId": 135,
"producerId": 604,
"supplierId": 603,
"categoryId": 18,
"gtuCode": null,
"startDate": 1710943467,
"endDate": null,
"model": "EAGLE SH00022",
"price": "164.0000",
"priceMargin": 15,
"logisticValue": "23.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "regulowana wysokość w zakresie: 110-135 cm|kijki są składane|uchwyt: pianka EVA",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Kije trekkingowe",
"sensitive": 0
},
"producer": {
"id": 604,
"name": "Yate",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 6512,
"rewardId": 5797,
"number": 1,
"ean": "8595053906154",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5798,
"catalogId": 98,
"code": "B8",
"price": "207.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 270,
"startDate": 1710943752,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 270,
"programId": "SONEP",
"name": "Dla domu i nie tylko",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5798,
"nameId": 6,
"producerId": 5,
"supplierId": 8,
"categoryId": 14,
"gtuCode": null,
"startDate": 1710944051,
"endDate": null,
"model": "KI831E",
"price": "189.0000",
"priceMargin": 15,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "moc: 1500-1800 W|wyjmowany filtr|pojemność: 1,7 l",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Czajnik",
"sensitive": 0
},
"producer": {
"id": 5,
"name": "Tefal",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.tefal.pl"
},
"variant": [
{
"id": 6513,
"rewardId": 5798,
"number": 1,
"ean": "3045387245955",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5799,
"catalogId": 98,
"code": "B10",
"price": "201.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 273,
"startDate": 1710944229,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 273,
"programId": "SONEP",
"name": "Dla Niej i dla Niego",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5799,
"nameId": 294,
"producerId": 605,
"supplierId": 603,
"categoryId": 18,
"gtuCode": null,
"startDate": 1710944400,
"endDate": null,
"model": "SS00589",
"price": "182.0000",
"priceMargin": 20,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "wytrzymała i trwała konstrukcja z tkaniny plandekowej 600D|regulowane szelki|świetna wodoodporność|wymiary: 45cm x 27cm x 27cm",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Torba sportowa",
"sensitive": 0
},
"producer": {
"id": 605,
"name": "Highlander",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": ""
},
"variant": [
{
"id": 6514,
"rewardId": 5799,
"number": 1,
"ean": "5034358866013",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
},
{
"programId": "SONEP",
"rewardId": 5800,
"catalogId": 98,
"code": "B11",
"price": "207.00",
"points": 300,
"provision": 8,
"range": "B",
"categoryId": 272,
"startDate": 1710944500,
"endDate": 0,
"active": 1,
"available": 1,
"isSeasonal": 0,
"modifiedDate": null,
"category": {
"categoryId": 272,
"programId": "SONEP",
"name": "Męska rzecz",
"color": "",
"isActive": 1,
"endDate": null
},
"reward": {
"id": 5800,
"nameId": 1145,
"producerId": 12,
"supplierId": 603,
"categoryId": 18,
"gtuCode": null,
"startDate": 1710944844,
"endDate": null,
"model": "1600A003BK",
"price": "188.4600",
"priceMargin": 20,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": "torba narzędziowa o nośności do 25 kg|kieszenie: 3 zewnętrzne i 5 wewnętrznych|wymiary: 55 x 35 x 35 cm",
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": null,
"grossWeight": null,
"cnCode": null,
"name": {
"name": "Torba narzędziowa",
"sensitive": 0
},
"producer": {
"id": 12,
"name": "Bosch",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer,supplier",
"region": null,
"www": "www.bosch-home.pl"
},
"variant": [
{
"id": 6515,
"rewardId": 5800,
"number": 1,
"ean": "3165140799720",
"default": 1,
"limitedByNumber": 0,
"available": 1,
"sendExpiration": 0,
"option": null
}
]
}
}
]
}
],
"status": "ok",
"class": "collection:rangesWithRewards"
}
HTTP Request
GET api/v3/ranges-with-rewards
Query Parameters
| Parameter | Status | Description |
|---|---|---|
| catalogId | optional | ID katalogu (int). |
| notEmpty | optional | Czy wykluczyć z wyniku progi nie zawierające aktywnych nagród (bool). |
Uczestnicy
Metody umożliwiające zarządzanie uczestnikami.
Pobierz listę
Pobranie listy uczestników w programie.
Example request:
$response = \ApiClient::get("participant"
);
curl -X GET -G "http://local.newprolo/api/participant"
Example response (200):
{
"data": [
{
"userId": 3818756,
"programId": "KRUK",
"name": "Bogdan Dąbkowski",
"surname": null,
"street": "os. Cegielskiego 21\/15",
"buildNo": null,
"flatNo": null,
"location": "Swarzędz",
"postalCode": 62020,
"phoneNumber": "669156090",
"email": "bogdandabkowski@o2.pl",
"extra": null,
"bankAccount": null,
"bankName": null,
"nip": 8851123965,
"pesel": "60080600875",
"poczta": "Swarzędz",
"wojewodztwo": "wielkopolskie",
"powiat": "poznański",
"gmina": "Swarzędz",
"usId": "3071",
"usName": "Pierwszy Wielkopolski Urząd Skarbowy w Poznan",
"usStreet": null,
"usPostalCode": 0,
"usLocation": null,
"kraj": "Polska",
"role": "participant",
"birthDate": "1960-08-06"
},
{
"userId": 13635499,
"programId": "KRUK",
"name": "Bogdan Kałuża",
"surname": null,
"street": "Różana 2\/5",
"buildNo": null,
"flatNo": null,
"location": "Jaworzno",
"postalCode": 43600,
"phoneNumber": "516612062",
"email": null,
"extra": null,
"bankAccount": null,
"bankName": null,
"nip": null,
"pesel": "57071004073",
"poczta": "Jaworzno",
"wojewodztwo": "śląskie",
"powiat": "Jaworzno",
"gmina": "Jaworzno",
"usId": "2415",
"usName": "Urząd Skarbowy w Jaworznie",
"usStreet": null,
"usPostalCode": 0,
"usLocation": null,
"kraj": "Polska",
"role": "participant",
"birthDate": "1957-07-10"
}
],
"status": "ok",
"class": "collection:participant"
}
HTTP Request
GET api/participant
Pobierz uczestnika
Pobiera informacje o pojedyńczym uczestniku.
Example request:
$response = \ApiClient::get("participant/{id}"
);
curl -X GET -G "http://local.newprolo/api/participant/{id}"
Example response (200):
{
"data": {
"userId": 5,
"programId": "KRUK",
"name": "Marta Luks-Kamieniak",
"surname": null,
"street": "ul. Wołowska 8",
"buildNo": "",
"flatNo": null,
"location": "Wrocław",
"postalCode": 51116,
"phoneNumber": "609314304",
"email": "m.luks@secretclient.com",
"extra": null,
"bankAccount": null,
"bankName": null,
"nip": null,
"pesel": "81011239506",
"poczta": "Jasło",
"wojewodztwo": "dolnośląskie",
"powiat": "Wrocław",
"gmina": "Wrocław",
"usId": "1805",
"usName": "Urząd Skarbowy w Jaśle",
"usStreet": null,
"usPostalCode": 0,
"usLocation": null,
"kraj": "Polska",
"role": "callCenterKruk",
"birthDate": "1981-01-12"
},
"status": "ok",
"class": "participant"
}
HTTP Request
GET api/participant/{id}
Aktualizacja uczestnika
Aktualizuje dane wskazanego uczestnika.
Example request:
$response = \ApiClient::put("participant/{id}",
[
"name" => "Jakub",
"surname" => "Rousseau",
"street" => "PQYXCPtBiw6rrbeJ",
"buildNo" => "sJJpS3VQK4BcM8A3",
"flatNo" => "zL2bG1gTA1Mf2EdZ",
"location" => "iXCuoT96GjiKKHfB",
"postalCode" => 20,
"phoneNumber" => "lHc2BeggrnhYjbMt",
"email" => "wgiNFSfrqN4Xl5MU",
"extra" => "I7jlKnOF19YNB0EV",
"bankAccount" => 18,
"bankName" => "0yDdEtuh6fS5C19O",
"nip" => 14,
"pesel" => 12,
"poczta" => "WNXMiZoH30Muw40O",
"kraj" => "8X3XIG7fU9YxweeA",
"wojewodztwo" => "TGPOS9VYDwD77vor",
"powiat" => "ysYGNH5qR2lfQ6VD",
"gmina" => "22eLkQ05R8ZXtdMi",
"usId" => "8Ni7SD3jwmYAIJ3g",
"usName" => "qMr1u4AUvgMesK9Q",
"usStreet" => "YT1SqVWlEA83kJUE",
"usPostalCode" => 4,
"usLocation" => "kHT6apNOr6nXIkie",
"role" => "FJqymDzGR2BDNW6j",
"birthDate" => "Y34IaBDwglNBmB3i"
]
);
curl -X PUT "http://local.newprolo/api/participant/{id}" -d "name"="Jakub" \
-d "surname"="Rousseau" \
-d "street"="PQYXCPtBiw6rrbeJ" \
-d "buildNo"="sJJpS3VQK4BcM8A3" \
-d "flatNo"="zL2bG1gTA1Mf2EdZ" \
-d "location"="iXCuoT96GjiKKHfB" \
-d "postalCode"="20" \
-d "phoneNumber"="lHc2BeggrnhYjbMt" \
-d "email"="wgiNFSfrqN4Xl5MU" \
-d "extra"="I7jlKnOF19YNB0EV" \
-d "bankAccount"="18" \
-d "bankName"="0yDdEtuh6fS5C19O" \
-d "nip"="14" \
-d "pesel"="12" \
-d "poczta"="WNXMiZoH30Muw40O" \
-d "kraj"="8X3XIG7fU9YxweeA" \
-d "wojewodztwo"="TGPOS9VYDwD77vor" \
-d "powiat"="ysYGNH5qR2lfQ6VD" \
-d "gmina"="22eLkQ05R8ZXtdMi" \
-d "usId"="8Ni7SD3jwmYAIJ3g" \
-d "usName"="qMr1u4AUvgMesK9Q" \
-d "usStreet"="YT1SqVWlEA83kJUE" \
-d "usPostalCode"="4" \
-d "usLocation"="kHT6apNOr6nXIkie" \
-d "role"="FJqymDzGR2BDNW6j" \
-d "birthDate"="Y34IaBDwglNBmB3i"
Example response (200):
{
"id": 2,
"href": "\/participant\/2"
}
HTTP Request
PUT api/participant/{id}
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| name | string | optional | Imię uczestnika. |
| surname | string | optional | Nazwisko uczestnika. |
| street | string | optional | Adres / ulica. |
| buildNo | string | optional | Adres / numer budynku. |
| flatNo | string | optional | Adres / numer mieszkania. |
| location | string | optional | Adres / miejscowość. |
| postalCode | integer | optional | Adres / kod pocztowy. |
| phoneNumber | string | optional | Numer telefonu. |
| string | optional | Adres e-mail. | |
| extra | string | optional | Dodatkowe informacje. |
| bankAccount | integer | optional | Numer rachunku bankowego. |
| bankName | string | optional | Nazwa banku. |
| nip | integer | optional | Numer NIP. |
| pesel | integer | optional | Numer PESEL. |
| poczta | string | optional | Poczta. |
| kraj | string | optional | Kraj. |
| wojewodztwo | string | optional | Województwo. |
| powiat | string | optional | Powiat. |
| gmina | string | optional | Gmina. |
| usId | string | optional | ID urzędu skarbowego. |
| usName | string | optional | Nazwa urzędu skarbowego. |
| usStreet | string | optional | Adres urzędu skarbowego / ulica. |
| usPostalCode | integer | optional | Adres urzędu skarbowego / kod pocztowy. |
| usLocation | string | optional | Adres urzędu skarbowego / miejscowość. |
| role | string | optional | Rola uczestnika. |
| birthDate | string | optional | Data urodzenia. |
Urzędy skarbowe
Metody umożliwiające dodawanie i pobieranie listy urzędów skarbowych
Lista urzędów
Pobranie listy urzędów skarbowych.
Jeżeli prześlemy parametr "pagination" (różny od 0), Wynik bedzie zawierał dodatkowo metadane paginacji oraz linki do innych porcji wyników.
Example request:
$response = \ApiClient::get("us",
[
"pagination" => 2,
"page" => 2
]
);
curl -X GET -G "http://local.newprolo/api/us"
Example response (200):
{
"data": [
{
"id": "0204",
"typ": "US",
"wojewodztwo": "dolnośląskie",
"nazwa": "Urząd Skarbowy w Dzierżoniowie",
"kod_pocztowy": "58-200",
"miasto": "Dzierżoniów",
"ulica": "Pocztowa",
"nr_budynku": "14",
"poczta": "Dzierżoniów"
},
{
"id": "0205",
"typ": "US",
"wojewodztwo": "dolnośląskie",
"nazwa": "Urząd Skarbowy w Głogowie",
"kod_pocztowy": "67-200",
"miasto": "Głogów",
"ulica": "Adama Mickiewicza",
"nr_budynku": "53",
"poczta": "Głogów"
}
],
"links": {
"first": "http:\/\/localhost\/api\/us?page=1",
"last": "http:\/\/localhost\/api\/us?page=201",
"prev": "http:\/\/localhost\/api\/us?page=1",
"next": "http:\/\/localhost\/api\/us?page=3"
},
"meta": {
"current_page": 2,
"from": 3,
"last_page": 201,
"path": "http:\/\/localhost\/api\/us",
"per_page": 2,
"to": 4,
"total": 401
},
"status": "ok",
"class": "collection:us"
}
HTTP Request
GET api/us
Query Parameters
| Parameter | Status | Description |
|---|---|---|
| filters | optional | Tablica filtrów. Obsługiwane wartości: województwo (string), miasto (string). |
| pagination | optional | Liczba rekordów w wyniku (int). |
| page | optional | Numer strony do pobrania (int). |
Dodanie urzędu
Dodanie rekordu do listy urzędów skarbowych.
Example request:
$response = \ApiClient::post("us",
[
"id" => "cPfbmee0pZR6b312",
"typ" => "wggVnWacz30WIg4T",
"wojewodztwo" => "85t0fIxTTcnKukhc",
"nazwa" => "V8SmNcouqcW9Pdt2",
"kod_pocztowy" => "vUzXzxVnqqYYwjcT",
"miasto" => "NBSFiADIQ82On8AD",
"ulica" => "BqBFa2EHHfui5fbN",
"nr_budynku" => "NPFrrD9S5TUKwbhu",
"poczta" => "N87asYIHcNUfOJdK"
]
);
curl -X POST "http://local.newprolo/api/us" -d "id"="cPfbmee0pZR6b312" \
-d "typ"="wggVnWacz30WIg4T" \
-d "wojewodztwo"="85t0fIxTTcnKukhc" \
-d "nazwa"="V8SmNcouqcW9Pdt2" \
-d "kod_pocztowy"="vUzXzxVnqqYYwjcT" \
-d "miasto"="NBSFiADIQ82On8AD" \
-d "ulica"="BqBFa2EHHfui5fbN" \
-d "nr_budynku"="NPFrrD9S5TUKwbhu" \
-d "poczta"="N87asYIHcNUfOJdK"
Example response (200):
{
"status": "created",
"message": "Utworzono nowy rekord",
"data": {
"id": "999999",
"typ": "XXX",
"wojewodztwo": "dolnośląskie",
"nazwa": "Urząd Skarbowy w XXX",
"kod_pocztowy": "55-666",
"miasto": "Rabka",
"ulica": "Mickiewicza",
"nr_budynku": "12",
"poczta": "Nowy Targ"
}
}
HTTP Request
POST api/us
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| id | string | required | Identyfikator Urzędu skarbowego |
| typ | string | required | Oznaczenie typu urzędu skarbowego |
| wojewodztwo | string | required | Nazwa województwa |
| nazwa | string | required | Nazwa urzędu skarbowego |
| kod_pocztowy | string | required | Kod pocztowy w formacie XX-XXX |
| miasto | string | required | Nazwa miejscowości |
| ulica | string | required | Nazwa ulicy |
| nr_budynku | string | required | Numer budynku |
| poczta | string | required | Poczta |
Zamówienia
Metody umożliwiające zarządzanie zamówieniami.
Zapisz zamówienie
Dodanie nowego zamówienia lub zamówień (dla każdej nagrody przekazanej w parametrze rewards tworzone jest osobne zamówienie).
W odpowiedzi otrzymujemy tablicę w formacie [{"id" => idZamowienia, "points" => suma_punktow},...]. Należy zwrócić uwagę, że suma_punktow uwzględnia liczbe sztuk danego towaru (jeżeli zamówili 2 nagrody po 100 pkt każda, otrzymamy w tym polu wartość 200).
Example request:
$response = \ApiClient::post("order",
[
"userId" => 5,
"rewards" => [["rewardId" => 138, "variantId" => 141, "quantity" => 2, "catalogId" => 3]],
"isBusiness" => "1",
"streetAddress" => "ul. Grunwaldzka 33/1a",
"postalCode" => "55-678",
"location" => "Sobótka",
"phoneNumber" => "123-456-789",
"addressType" => 1,
"addresseeName" => "Adam Nowak",
"ordererId" => 5,
"ordererRole" => "participant",
"businessName" => "Firma Adam Nowak",
"businessId" => "FAN"
]
);
curl -X POST "http://local.newprolo/api/order" -d "requestId"="0" \
-d "receiptId"="0" \
-d "userId"="5" \
-d "rewards"="[["rewardId" => 138, "variantId" => 141, "quantity" => 2, "catalogId" => 3]]" \
-d "isBusiness"="1" \
-d "streetAddress"="ul. Grunwaldzka 33/1a" \
-d "postalCode"="55-678" \
-d "location"="Sobótka" \
-d "phoneNumber"="123-456-789" \
-d "addressType"="1" \
-d "addresseeName"="Adam Nowak" \
-d "ordererId"="5" \
-d "ordererRole"="participant" \
-d "businessName"="Firma Adam Nowak" \
-d "businessId"="FAN"
Example response (200):
[
{
"id": 58446,
"points": 3340
},
{
"id": 58447,
"points": 420
}
]
HTTP Request
POST api/order
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| requestId | integer | optional | ID requestu (min:1). |
| receiptId | integer | optional | ID dokumentu sprzedaży (min: 1). |
| userId | integer | required | ID uczestnika (min: 1). |
| rewards | array | required | Tablica nagród (koszyk). Musi zawierać pola (klucze): rewardId(int), variantId(int), quantity(int), catalogId(int). |
| isBusiness | boolean | required | Czy zamówiono na firmę? |
| streetAddress | string | required | Adres dostawy / ulica z numerem. |
| postalCode | string | required | Adres dostawy / kod pocztowy (regex:/^[0-9]{2}[.\/_-\s]?[0-9]{3}$/). |
| location | string | required | Adres dostawy / miejscowość. |
| phoneNumber | string | required | Telefon kontaktowy (alpha_dash). |
| addressType | integer | required | Typ adresu dostawy (between:0,9). |
| addresseeName | string | required | Nazwa odbiorcy (imię i nazwisko lub nazwa firmy). |
| ordererId | integer | required | ID osoby, która złożyła zamówienie w imieniu uczestnika lub jeżeli uczestnik sam zamówił - ID uczestnika (min:1). |
| ordererRole | string | required | Rola osoby składajacej zamówienie. |
| businessName | string | optional | Nazwa firmy. |
| businessId | string | optional | Id firmy. |
Aktualizacja zamówienia
Modyfikacja istniejącego zamówienia.
Parametr {ids} może zawierać ID zamówienia lub listę ID rozdzielonych przecinkami. W odpowiedzi dostajemy tablicę w formacie: {idZamowienia => status operacji, ...}
Example request:
$response = \ApiClient::patch("order/{ids}",
[
"streetAddress" => "ul. Grunwaldzka 33/1a",
"postalCode" => "55-432",
"location" => "Sobótka",
"phoneNumber" => "123-456-789",
"addressType" => 2,
"addresseeName" => "Adam Nowak",
"status" => 9
]
);
curl -X PATCH "http://local.newprolo/api/order/{ids}" -d "userId"="0" \
-d "isBusiness"="false" \
-d "streetAddress"="ul. Grunwaldzka 33/1a" \
-d "postalCode"="55-432" \
-d "location"="Sobótka" \
-d "phoneNumber"="123-456-789" \
-d "addressType"="2" \
-d "addresseeName"="Adam Nowak" \
-d "ordererId"="0" \
-d "ordererRole'"="" \
-d "status"="9"
Example response (200):
{
"42573(order_id_1)": "ok",
"42650(order_id_2)": "ok"
}
HTTP Request
PATCH api/order/{ids}
Body Parameters
| Parameter | Type | Status | Description |
|---|---|---|---|
| userId | integer | optional | ID uczestnika (min:1). |
| isBusiness | boolean | optional | Czy zamówiono na frimę? |
| streetAddress | string | optional | Adres dostawy / ulica z numerem. |
| postalCode | string | optional | Adres dostawy / kod pocztowy (regex:/^[0-9]{2}[.\/_-\s]?[0-9]{3}$/). |
| location | string | optional | Adres dostawy / miejscowość. |
| phoneNumber | string | optional | Telefon kontaktowy. (alpha_dash). |
| addressType | integer | optional | Typ adresu dostawy. (between:0,9). |
| addresseeName | string | optional | Nazwa odbiorcy (imię i nazwisko lub nazwa firmy). |
| ordererId | integer | optional | ID osoby, która złożyła zamówienie w imieniu uczestnika lub jeżeli uczestnik sam zamówił - ID uczestnika (min:1). |
| ordererRole' | string | optional | Rola osoby składajacej zamówienie. |
| status | integer | optional | Aktualny status zamówienia. |
Lista zamówień
Pobranie listy zamówień złożonych przez uczestników programu.
Example request:
$response = \ApiClient::get("order",
[
"pagination" => 2,
"page" => 2
]
);
curl -X GET -G "http://local.newprolo/api/order"
Example response (200):
{
"data": [
{
"id": 168,
"programId": "KRUK",
"catalogId": 3,
"requestId": null,
"receiptId": null,
"deliveryOrderId": null,
"invoiceId": null,
"rewardId": 9,
"courierId": null,
"variantId": 9,
"userId": 8422144,
"quantity": 1,
"isBusiness": 0,
"streetAddress": "TOMASZÓW BOLESŁAWIECKI 143H\/1\/1",
"postalCode": 59720,
"location": "RACIBOROWICE",
"status": {
"id": 9,
"name": "anulowane",
"vars": null,
"description": "Zmienne są niezdefiniowane"
},
"orderDate": 1386243548,
"confirmationId": null,
"subConfirmationId": null,
"customWorkflow": 0,
"participantRemark": "",
"businessName": null,
"points": 420,
"phoneNumber": "511979687",
"addressType": 0,
"addresseeName": "WĄTOREK ANDRZEJ",
"ordererId": 8422144,
"ordererRole": "participant",
"isPrepaid": 0,
"prepaidCardNumber": "0",
"suiteName": null,
"complaintId": null,
"statusDate": 1386246551,
"bounceCount": 0,
"backPoints": 0,
"actualCost": null,
"waybillId": null,
"attention": null,
"communicationToSend": 0,
"indexDBO": null,
"SapDBONumber": null,
"COKNumber": null,
"newEAN": null,
"inStock": 0,
"dboInvoiceNumber": null,
"dboInvoiceCreateDate": null,
"dboInvoicePath": null,
"vscInvoiceNumber": null,
"vscInvoiceCreateDate": null,
"vscInvoicePath": null,
"participant": {
"userId": 8422144,
"programId": "KRUK",
"name": "WĄTOREK ANDRZEJ",
"surname": null,
"street": "Kościelna 88",
"buildNo": null,
"flatNo": "",
"location": "RACIBOROWICE",
"postalCode": 22630,
"phoneNumber": "511979687",
"email": null,
"extra": "",
"bankAccount": null,
"bankName": "",
"nip": null,
"pesel": "84053005335",
"poczta": "Tyszowce",
"wojewodztwo": "Lubelskie",
"powiat": "Tomaszowski",
"gmina": "Tyszowce",
"usId": null,
"usName": "US w Tomaszowie Lubelskim",
"usStreet": "Rolnicza 17",
"usPostalCode": 22600,
"usLocation": "Tomaszów Lubelski",
"kraj": "Polska",
"role": "participant",
"birthDate": "1984-05-30"
},
"reward": {
"programId": "KRUK",
"rewardId": 9,
"catalogId": 3,
"code": "A10",
"price": "24.90",
"points": 420,
"provision": 8,
"range": {
"rangeId": "A",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "25.00",
"defaultPoints": 420,
"defaultProvision": 8,
"color": "f1a527"
},
"categoryId": 9,
"startDate": 1365153475,
"endDate": null,
"active": 1,
"isSeasonal": 0,
"modifiedDate": "2018-09-17 14:32:11",
"reward": {
"id": 9,
"nameId": 120,
"producerId": 24,
"supplierId": 23,
"categoryId": 19,
"startDate": 1540941608,
"endDate": null,
"model": "Piramidka",
"price": "24.0000",
"priceMargin": 0,
"logisticValue": "12.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": [
"zabawka edukacyjna dla najmłodszych",
"kształtuje zdolności manualne",
"i poznawcze dziecka",
"dla dzieci od 6 miesiąca życia"
],
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": "",
"purchaseUnit": "",
"pkwiu": "",
"netWeight": "0.00",
"grossWeight": "0.00",
"rewardName": "Zabawka edukacyjna",
"producer": {
"id": 24,
"name": "Fisher Price",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.fisher-price.com"
},
"variants": [
{
"id": 9,
"rewardId": 9,
"number": 0,
"ean": "887961520576",
"default": 1,
"option": null
}
]
},
"category": {
"categoryId": 9,
"programId": "KRUK",
"name": "Z myślą o dzieciach",
"color": ""
}
},
"history": [
{
"id": 8062,
"orderId": 168,
"programId": "KRUK",
"date": 1386243548,
"status": 1,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
},
{
"id": 8077,
"orderId": 168,
"programId": "KRUK",
"date": 1386246551,
"status": 9,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
}
],
"receipt": null,
"delivery_order": null,
"invoice": null
},
{
"id": 291,
"programId": "KRUK",
"catalogId": 3,
"requestId": null,
"receiptId": null,
"deliveryOrderId": null,
"invoiceId": null,
"rewardId": 140,
"courierId": null,
"variantId": 140,
"userId": 100001281,
"quantity": 1,
"isBusiness": 1,
"streetAddress": "Poleska 39\/70",
"postalCode": 51354,
"location": "Wrocław",
"status": {
"id": 10,
"name": "wycofane",
"vars": null,
"description": "Zmienne są niezdefiniowane"
},
"orderDate": 1389717927,
"confirmationId": null,
"subConfirmationId": null,
"customWorkflow": 0,
"participantRemark": "",
"businessName": null,
"points": 4170,
"phoneNumber": null,
"addressType": 1,
"addresseeName": "Urban Marcin",
"ordererId": 100001281,
"ordererRole": "supplier",
"isPrepaid": 0,
"prepaidCardNumber": "0",
"suiteName": null,
"complaintId": null,
"statusDate": 1390570912,
"bounceCount": 0,
"backPoints": 0,
"actualCost": null,
"waybillId": null,
"attention": null,
"communicationToSend": 0,
"indexDBO": null,
"SapDBONumber": null,
"COKNumber": null,
"newEAN": null,
"inStock": 0,
"dboInvoiceNumber": null,
"dboInvoiceCreateDate": null,
"dboInvoicePath": null,
"vscInvoiceNumber": null,
"vscInvoiceCreateDate": null,
"vscInvoicePath": null,
"participant": {
"userId": 100001281,
"programId": "KRUK",
"name": "Urban Marcin",
"surname": null,
"street": "ul. Wołowska 8",
"buildNo": "",
"flatNo": null,
"location": "Wrocław",
"postalCode": 51116,
"phoneNumber": null,
"email": "marcin.urban@kruksa.pl",
"extra": null,
"bankAccount": null,
"bankName": null,
"nip": null,
"pesel": null,
"poczta": null,
"wojewodztwo": null,
"powiat": null,
"gmina": null,
"usId": null,
"usName": null,
"usStreet": null,
"usPostalCode": null,
"usLocation": null,
"kraj": null,
"role": "supplier",
"birthDate": null
},
"reward": {
"programId": "KRUK",
"rewardId": 140,
"catalogId": 3,
"code": "F6",
"price": "250.00",
"points": 4170,
"provision": 8,
"range": {
"rangeId": "F",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "250.00",
"defaultPoints": 4170,
"defaultProvision": 8,
"color": "d41681"
},
"categoryId": 5,
"startDate": 1365155547,
"endDate": 1400069342,
"active": 0,
"isSeasonal": 0,
"modifiedDate": null,
"reward": {
"id": 140,
"nameId": 46,
"producerId": 48,
"supplierId": 47,
"categoryId": 20,
"startDate": 1365071363,
"endDate": null,
"model": "K2.15",
"price": "239.4000",
"priceMargin": 5,
"logisticValue": "25.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": [
"ciśnienie: 100 bar",
"wydajność tłoczenia: 340 l\/h",
"dysza rotacyjna"
],
"isBundle": 0,
"bundleName": null,
"status": "paused",
"isSpecial": 0,
"isPrepaid": 0,
"country": null,
"purchaseUnit": null,
"pkwiu": null,
"netWeight": "0.00",
"grossWeight": "0.00",
"rewardName": "Myjka ciśnieniowa",
"producer": {
"id": 48,
"name": "Karcher",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.karcher.pl"
},
"variants": [
{
"id": 140,
"rewardId": 140,
"number": 0,
"ean": "",
"default": 1,
"option": null
}
]
},
"category": {
"categoryId": 5,
"programId": "KRUK",
"name": "Męska rzecz",
"color": ""
}
},
"history": [
{
"id": 13696,
"orderId": 291,
"programId": "KRUK",
"date": 1389717927,
"status": 1,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2014-01-14 17:45:27"
},
{
"id": 17708,
"orderId": 291,
"programId": "KRUK",
"date": 1390570912,
"status": 10,
"courierId": null,
"waybillId": null,
"annotation": "Decyzja Kruk - mail z 24.01.2014 Marta L.-K.",
"timestamp": "2014-01-24 14:41:52"
}
],
"receipt": null,
"delivery_order": null,
"invoice": null
}
],
"links": {
"first": "http:\/\/localhost\/api\/order?page=1",
"last": "http:\/\/localhost\/api\/order?page=29221",
"prev": "http:\/\/localhost\/api\/order?page=1",
"next": "http:\/\/localhost\/api\/order?page=3"
},
"meta": {
"current_page": 2,
"from": 3,
"last_page": 29221,
"path": "http:\/\/localhost\/api\/order",
"per_page": 2,
"to": 4,
"total": 58442
},
"status": "ok",
"class": "collection:order"
}
HTTP Request
GET api/order
Query Parameters
| Parameter | Status | Description |
|---|---|---|
| filters | optional | Tablica filtrów. Obsługiwane wartości: userId (int), backPoints (bool), orderDate (zakres, np. "1514761200,1517439600", daty w formacie UNIX Timestamp). |
| pagination | optional | Liczba rekordów w wyniku (int). |
| page | optional | Numer strony do pobrania (int). |
| order | optional | Nazwa kolumny lub wyrażenie, które posłuży do posortowania wyników (string). |
Pobierz zamówienie
Pobranie szczegółowych informacji o konkretnym zamówieniu.
Example request:
$response = \ApiClient::get("order/{id}"
);
curl -X GET -G "http://local.newprolo/api/order/{id}"
Example response (200):
{
"data": {
"id": 3,
"programId": "KRUK",
"catalogId": 3,
"requestId": null,
"receiptId": null,
"deliveryOrderId": 59722,
"invoiceId": null,
"rewardId": 9,
"courierId": 1,
"variantId": 9,
"userId": 8666231,
"quantity": 1,
"isBusiness": 0,
"streetAddress": "Marynin 146",
"postalCode": 21030,
"location": "Motycz",
"status": {
"id": 7,
"name": "dostarczono",
"vars": null,
"description": "Zmienne są niezdefiniowane"
},
"orderDate": 1373374294,
"confirmationId": 3,
"subConfirmationId": null,
"customWorkflow": 0,
"participantRemark": null,
"businessName": null,
"points": 420,
"phoneNumber": "815031323",
"addressType": 1,
"addresseeName": "Piotr Stachyra",
"ordererId": 8666231,
"ordererRole": "participant",
"isPrepaid": 0,
"prepaidCardNumber": null,
"suiteName": null,
"complaintId": null,
"statusDate": 1375740000,
"bounceCount": 0,
"backPoints": 0,
"actualCost": "25.00",
"waybillId": "0000004164427W",
"attention": null,
"communicationToSend": 0,
"indexDBO": null,
"SapDBONumber": null,
"COKNumber": null,
"newEAN": null,
"inStock": 0,
"dboInvoiceNumber": null,
"dboInvoiceCreateDate": null,
"dboInvoicePath": null,
"vscInvoiceNumber": null,
"vscInvoiceCreateDate": null,
"vscInvoicePath": null,
"participant": {
"userId": 8666231,
"programId": "KRUK",
"name": "STACHYRA PIOTR",
"surname": "",
"street": "Marynin 146",
"buildNo": null,
"flatNo": "",
"location": "Rozalin",
"postalCode": 21030,
"phoneNumber": "609564685",
"email": "stachyrapeter@gmail.com",
"extra": "participant",
"bankAccount": null,
"bankName": "",
"nip": 0,
"pesel": "81050402530",
"poczta": "Motycz",
"wojewodztwo": "lubelskie",
"powiat": "lubelski",
"gmina": "Konopnica",
"usId": null,
"usName": "Drugi Urząd Skarbowy Lublin",
"usStreet": "Szeligowskiego 24",
"usPostalCode": 20883,
"usLocation": "Lublin",
"kraj": "Polska",
"role": "participant",
"birthDate": "1981-05-04"
},
"reward": {
"programId": "KRUK",
"rewardId": 9,
"catalogId": 3,
"code": "A10",
"price": "24.90",
"points": 420,
"provision": 8,
"range": {
"rangeId": "A",
"programId": "KRUK",
"catalogId": 3,
"defaultPrice": "25.00",
"defaultPoints": 420,
"defaultProvision": 8,
"color": "f1a527"
},
"categoryId": 9,
"startDate": 1365153475,
"endDate": null,
"active": 1,
"isSeasonal": 0,
"modifiedDate": "2018-09-17 14:32:11",
"reward": {
"id": 9,
"nameId": 120,
"producerId": 24,
"supplierId": 23,
"categoryId": 19,
"startDate": 1540941608,
"endDate": null,
"model": "Piramidka",
"price": "24.0000",
"priceMargin": 0,
"logisticValue": "12.00",
"invoiceType": 0,
"vatValue": "23",
"photo": 1,
"description": [
"zabawka edukacyjna dla najmłodszych",
"kształtuje zdolności manualne",
"i poznawcze dziecka",
"dla dzieci od 6 miesiąca życia"
],
"isBundle": 0,
"bundleName": null,
"status": "active",
"isSpecial": 0,
"isPrepaid": 0,
"country": "",
"purchaseUnit": "",
"pkwiu": "",
"netWeight": "0.00",
"grossWeight": "0.00",
"rewardName": "Zabawka edukacyjna",
"producer": {
"id": 24,
"name": "Fisher Price",
"nip": null,
"location": "",
"street": "",
"number": "",
"postalcode": null,
"role": "producer",
"region": null,
"www": "http:\/\/www.fisher-price.com"
},
"variants": [
{
"id": 9,
"rewardId": 9,
"number": 0,
"ean": "887961520576",
"default": 1,
"option": null
}
]
},
"category": {
"categoryId": 9,
"programId": "KRUK",
"name": "Z myślą o dzieciach",
"color": ""
}
},
"history": [
{
"id": 17,
"orderId": 3,
"programId": "KRUK",
"date": 1375653600,
"status": 6,
"courierId": 1,
"waybillId": "0000004164427W",
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
},
{
"id": 18,
"orderId": 3,
"programId": "KRUK",
"date": 1375782000,
"status": 7,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
},
{
"id": 19,
"orderId": 3,
"programId": "KRUK",
"date": 1375653600,
"status": 5,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
},
{
"id": 20,
"orderId": 3,
"programId": "KRUK",
"date": 1373883615,
"status": 4,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
},
{
"id": 21,
"orderId": 3,
"programId": "KRUK",
"date": 1373880015,
"status": 2,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
},
{
"id": 22,
"orderId": 3,
"programId": "KRUK",
"date": 1373374294,
"status": 1,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
},
{
"id": 1993,
"orderId": 3,
"programId": "KRUK",
"date": 1375782000,
"status": 7,
"courierId": null,
"waybillId": null,
"annotation": null,
"timestamp": "2013-12-23 11:19:29"
}
],
"receipt": null,
"delivery_order": {
"id": 59722,
"number": 5,
"programId": "KRUK",
"feedbackFile": null,
"deliveryFile": null,
"isFeedback": 0,
"isPaid": 0,
"createDate": "2018-12-06 17:00:26"
},
"invoice": null
},
"status": "ok",
"class": "order"
}
HTTP Request
GET api/order/{id}