API GetOrderingCatalog
Request
- tenant - (mandatory) - to which tenant/system to connect, e.g. "zegoal"
- catalog_position_id - (optional)
- catalog_position_code - (optional)
- catalog_position_ext_code - (optional)
- catalog_position_name - (optional)
- category - (optional)
- type - (optional)
- is_actual - (optional; default true)
Интерфейс для получения данных из каталога. Если в запросе не указаны параметры (кроме tenant) то будет возвращаем весь каталог. Если указан конкретный сatalog_position_id, catalog_position_code, catalog_position_ext_code, то остальные атрибуты для фильтрации будут проигнорированы и в ответ попадет конкретная найденная запись.
Examples
Request
{
"tenant": "order0"
}
CODE
Response
{
"processing_result": {
"text": "Catalog is received.",
"status": "ok",
"ctx_id": "96mpT6fh:0-H2",
"code": 0
},
"processing_date": "2020-05-27 19:24:37",
"GetOrderingCatalog": {
"response": {
"tenant": "order0",
"is_actual": true,
"catalog": [
{
"type": "Goods",
"position_id": 1,
"name": "position #485",
"is_actual": true,
"external_code": "485",
"description": "Goods",
"default_parameters": {
"unit": "шт",
"price": 23.1,
"default_quantity": 3
},
"code": "485",
"category": "Goods"
},
{
"type": "Goods",
"position_id": 14,
"name": "position #3984",
"is_actual": true,
"external_code": "3984",
"description": "Goods",
"default_parameters": {
"unit": "шт",
"price": 50,
"default_quantity": 3
},
"code": "3984",
"category": "Goods"
},
{
"type": "Goods",
"position_id": 15,
"name": "position #30469",
"is_actual": true,
"external_code": "473",
"description": "Goods",
"default_parameters": {
"unit": "шт",
"price": 30,
"default_quantity": 3
},
"code": "473",
"category": "Goods"
},
{
"type": "Goods",
"position_id": 24,
"name": "position #1111",
"is_actual": true,
"external_code": "180",
"description": "Goods",
"default_parameters": {
"unit": "шт",
"price": 23.1,
"default_quantity": 3
},
"code": "179",
"category": "Serv"
}
],
"TZ": "Europe/Minsk"
},
"request": {"tenant": "order0"},
"extra_logic": "",
"enriched_request": {
"tenant": "order0",
"is_actual": true
}
}
}
CODE
Request 2
{
"tenant": "order0",
"catalog_position_ext_code": "485"
}
CODE
Response 2
{
"processing_result": {
"text": "Catalog is received.",
"status": "ok",
"ctx_id": "Nr77fML3:0-8P",
"code": 0
},
"processing_date": "2020-05-27 19:27:39",
"GetOrderingCatalog": {
"response": {
"tenant": "order0",
"is_actual": true,
"catalog_position_ext_code": "485",
"catalog": {
"type": "Goods",
"position_id": 1,
"name": "position #485",
"is_actual": true,
"external_code": "485",
"description": "Goods",
"default_parameters": {
"unit": "шт",
"price": 23.1,
"default_quantity": 3
},
"code": "485",
"category": "Goods"
},
"TZ": "Europe/Minsk"
},
"request": {
"tenant": "order0",
"catalog_position_ext_code": "485"
},
"extra_logic": "",
"enriched_request": {
"tenant": "order0",
"is_actual": true,
"catalog_position_ext_code": "485"
}
}
}
CODE