URL
GET
/api/v1/stocks/list
Parameters
Name |
Type |
Method |
Required |
Default |
Description |
page |
int |
GET |
no |
1 |
Stránkovanie. |
Response
HTTP 200 - OK
Host: example.org
Content-Type: application/vnd.shoptec.v1.0+json; charset=utf-8
{
"page": 1,
"pages": 1,
"itemsCount": 2,
"itemsPerPage": 10,
"warehouses": [
{
"id": 1,
"name": "Hlavny sklad",
"street": null,
"postcode": null,
"city": null,
"country": null,
"order_deadline": null,
"pickup_time": null,
"heureka_depotid": 1111
},
{
"id": 2,
"name": "Velkoobchodny sklad",
"street": null,
"postcode": null,
"city": null,
"country": null,
"order_deadline": "13:00",
"pickup_time": 20,
"heureka_depotid": 9999
}
]
}
URL
GET
/api/v1/stocks/logs
Parameters
Name |
Type |
Method |
Required |
Default |
Description |
product_variant_id |
int |
GET |
yes |
|
ID produkt variantu. |
page |
int |
GET |
no |
1 |
Stránka. |
Response
HTTP 200 - OK
Host: example.org
Content-Type: application/vnd.shoptec.v1.0+json; charset=utf-8
{
"page": 1,
"pages": 1,
"logs": {
"id": 99,
"quantity_moved": 1,
"quantity_balance": 1,
"note": null,
"created": "2017-01-06 01:27:54",
"unit": null,
"order": null,
"invoice": null,
"credit_note": null
}
}
URL
POST
/api/v1/stocks/move
Parameters
Name |
Type |
Method |
Required |
Default |
Description |
product_variant_id |
int |
POST |
yes if supplier_code is not defined |
|
ID produkt variantu. |
supplier_id |
int |
POST |
yes if product_variant_id is not defined |
|
ID dodávateľa. |
supplier_code |
int |
POST |
yes if product_variant_id is not defined |
|
Kód dodávateľa. |
warehouse_id |
int |
POST |
yes |
|
ID skladu. |
quantity |
int |
POST |
yes |
|
Počet merných jednotiek, ktoré sa majú pričítať/odčítať zo skladu. Nesmie byť rovné 0, ak je quantity_abs=0. |
quantity_abs |
int |
POST |
no |
0 |
Príznak, či ide o absolútne nastavenie hodnoty alebo len pripočítanie/odpočítanie od aktuálneho stavu. |
Response
HTTP 200 - OK
Host: example.org
Content-Type: application/vnd.shoptec.v1.0+json; charset=utf-8
{
"stock": {
"id": 704
}
}
URL
POST
/api/v1/stocks/move
Parameters
Name |
Type |
Method |
Required |
Default |
Description |
product_variant_id[] |
int |
POST |
yes if supplier_code is not defined |
|
ID produkt variantu. |
supplier_id[] |
int |
POST |
yes if product_variant_id is not defined |
|
ID dodávateľa. |
supplier_code[] |
int |
POST |
yes if product_variant_id is not defined |
|
Kód dodávateľa. |
warehouse_id[] |
int |
POST |
yes |
|
ID skladu. |
quantity[] |
int |
POST |
yes |
|
Počet merných jednotiek, ktoré sa majú pričítať / odčítať zo skladu. Nesmie byť rovné 0, ak je quantity_abs=0. |
quantity_abs |
int |
POST |
no |
0 |
Príznak, či ide o absolútne nastavenie hodnoty alebo len pripočítanie / odpočítanie od aktuálneho stavu. |
Response
HTTP 200 - OK
Host: example.org
Content-Type: application/vnd.shoptec.v1.0+json; charset=utf-8
{
"stock": [
{
"id": 704
},
{
"id": 705
}
]
}
URL
GET
/api/v1/stocks/count
Response
HTTP 200 - OK
Host: example.org
Content-Type: application/vnd.shoptec.v1.0+json; charset=utf-8
{
"count": 4
}