POST /v1/batches/filter?headers={headers}

Filter batches on server


Parameters

None.


Request

application/json
TS-Apikey: api_key
{
    "data":{
        "doc_direction":"O",
        "id_warehouses":[
            1
        ],
        "level":-1,
        "date_from":"2018-11-15",
        "date_to":"2018-11-16",
        "document_number":"DOC02"
    }

Response

application/json
HTTP 200
{
    "list":[
        {
            "batch_settings":{
                "batch_number":1,
                "direction":"I",
                "type":"R",
                "id_warehouse":1,
                "truck":1,
                "name":"davka 1",
                "app_version":"2.0.0",
                "date":"2018-01-20",
                "created_date": "2018-01-20"
            },
            "batch_extras":[
                {
                    "key":"test",
                    "value":"data"
                }
            ],
            "batch_items":[
                {
                    "batch_number":1,
                    "id_batch_item":1,
                    "user_visible_batch_item_id":1,
                    "doc_number":1801000002,
                    "doc_item_number":1,
                    "product_code":"MUT",
                    "lot":"123",
                    "timestamp_client":"2018-06-14T10:25:54.503+0200",
                    "date_exp":"2018-11-08",
                    "barcode":"164397826",
                    "name":"Müsli sypané - ovocné",
                    "wplace":"jh675",
                    "palette":1,
                    "status":1,
                    "amount_base_unit":3.65
                },
                {
                    "batch_number":1,
                    "id_batch_item":2,
                    "user_visible_batch_item_id":2,
                    "doc_number":1801000002,
                    "doc_item_number":2,
                    "product_code":"MUT",
                    "lot":"456",
                    "timestamp_client":"2018-06-14T10:25:54.503+0200",
                    "date_exp":"2018-11-08",
                    "barcode":"155496531",
                    "name":"Müsli sypané - ovocné",
                    "wplace":"jh675",
                    "palette":1,
                    "status":1,
                    "amount_base_unit":3.65,
                }
            ]
        },
        {
            "batch_settings":{
                "batch_number": 2,
                "direction": "I",
                "type": "R",
                "id_warehouse": 1,
                "truck": 3,
                "name": "modified",
                "app_version": "2.0.0",
                "date": "2018-01-20",
                "created_date": "2018-01-20"
            },

                {
                    "key":"edited",
                    "value":"new"
                }


                {
                    "batch_number":2,
                    "id_batch_item":3,
                    "user_visible_batch_item_id":1,
                    "doc_number":1801000003,
                    "doc_item_number":1,
                    "product_code":"MUT",
                    "lot":"123",
                    "timestamp_client":"2018-06-14T10:25:54.503+0200",
                    "date_exp":"2018-11-08",
                    "barcode":"164397826",
                    "name":"Müsli sypané - ovocné",
                    "wplace":"jh675",
                    "palette":1,
                    "status":1,
                    "amount_base_unit":3.65
                }