GET /v1/documents/?state={state}

List of documents


Parameters

+ state (enum[number], optional) - filter documents with given state only
+ Members
+ 0 - closed
+ 1 - imported
+ 2 - being processed (acquired by someone)
+ 3 - batch exists

Request

application/json
TS-Apikey: api_key
{}

Response

application/json
HTTP 200
{
    "list":[
        {
            "batch_settings":{
                "allowed_directions":[
                    "I",
                    "O"
                ],
                "allowed_types":[
                    "R",
                    "V"
                ]
            },
            "description":"Doklad moj pekny",
            "document_number":"DOC001",
            "expiration_limit":0.5,
            "expiration_limit_date":"2019-01-25",
            "id_warehouse": 4,
            "document_items":[
                {
                    "amount_delivered":0.55,
                    "amount_ordered":15.0,
                    "direction":"I",
                    "document_item_id":5,
                    "document_number":"DOC001",
                    "lot":"55",
                    "product_code":"corbru",
                    "user_visible_document_item_id":1,
                    "wplace":[
                        "a1",
                        "b5"
                    ]
                },
                {
                    "amount_delivered":0.0,
                    "amount_ordered":3000.0,
                    "direction":"I",
                    "document_item_id":6,
                    "document_number":"DOC001",
                    "lot":"",
                    "product_code":"corbru",
                    "user_visible_document_item_id":2,
                    "wplace":[
                        "a1",
                        "b5"
                    ]
                },
                {
                    "amount_delivered":8.0,
                    "amount_ordered":8.0,
                    "direction":"O",
                    "document_item_id":7,
                    "document_number":"DOC001",
                    "lot":"",
                    "product_code":"corbru",
                    "user_visible_document_item_id":3,
                    "wplace":[
                        "a1",
                        "b5"
                    ]
                }
            ]
        },
        {
            "batch_settings":{
                "allowed_directions":[
                    "I",
                    "O"
                ],
                "allowed_types":[
                    "R",
                    "V"
                ]
            },






                {
                    "amount_delivered":0.55,
                    "amount_ordered":15.0,
                    "direction":"I",
                    "document_item_id":2,
                    "document_number":"DOC01",
                    "lot":"55",
                    "product_code":"corbru",
                    "user_visible_document_item_id":1,
                    "wplace":[
                        "a1",
                        "b5"
                    ]
                },
                {
                    "amount_delivered":0.0,
                    "amount_ordered":3000.0,
                    "direction":"I",
                    "document_item_id":3,
                    "document_number":"DOC01",
                    "lot":"",
                    "product_code":"corbru",
                    "user_visible_document_item_id":2,
                    "wplace":[
                        "a1",
                        "b5"
                    ]
                },
                {
                    "amount_delivered":8.0,
                    "amount_ordered":8.0,
                    "direction":"O",
                    "document_item_id":4,
                    "document_number":"DOC01",
                    "lot":"",
                    "product_code":"corbru",
                    "user_visible_document_item_id":3,
                    "wplace":[
                        "a1",
                        "b5"
                    ]
                }