POST /v1/batches/

Add a new batch


Parameters

None.


Request

application/json
TS-Apikey: api_key
{
    "data": {
        "batch_extras": [
            {
                "key": "kluc",
                "value": "hodnota"
            },
            {
                "key": "kluc2",
                "value": "hodnota2"
            }
        ],
        "batch_items": [
            {
                "amount": "3.65",
                "amount_base_unit": "3.65",
                "barcode": "164397826",
                "date_exp": "2018-11-28",
                "lot": "123",
                "name": "Müsli sypané - ovocné",
                "palette": 1,
                "product_code": "MUT",
                "status": 1,
                "timestamp_client": "2018-06-14T10:25:54.503+0200",
                "unit": "pack",
                "wplace": "jh675"
            },
            {
                "amount": "3.65",
                "amount_base_unit": "3.65",
                "barcode": "155496531",
                "date_exp": "2018-11-28",
                "lot": "456",
                "name": "Müsli sypané - ovocné",
                "palette": 1,
                "product_code": "MUT",
                "status": 1,
                "timestamp_client": "2018-06-14T10:25:54.503+0200",
                "unit": "multipack",
                "wplace": "jh675"
            }
        ],
        "batch_settings": {
            "app_version": "2.0.0",
            "batch_number": "1",
            "direction": "I",
            "document_number":"DOC01",
            "id_warehouse": "1",
            "name": "davka 1",
            "truck": 4,
            "type": "R"
        }


Response

application/json
HTTP 201
{
}