My Products
Help
thingsio
CONTRIBUTOR **

Creating Inventory issues batch JSON

by thingsio

Does anyone has a sample for updating the stock of a batch of inventory items? With below JSON I can add one adjustment but not sure how to do multiple. Do we need to increase the linenumber for example?

 

 

 

{
    "issueLines": [
        {
        "operation": "Insert",
        "tranType": {
            "value": "Issue"
        },
            "branchNumber": {
            "value": "11"
        },
        "warehouseId": {
            "value": "gro"
        },
        "lineNumber": {
            "value": 0
        },
        "inventoryNumber": {
            "value": "10001"
        },
        "quantity": {
            "value": 5
        },
        "reasonCode": {
            "value": "2"
        }
    }],
   
}
1 REPLY 1
Sandra Anté
VISMA

by Sandra Anté

Hi!

To do multiple adjustments you add as many of the "issueLines"-objects as you wish in the array of the issueLines.

{
    "issueLines": [
        {
            "operation": "Insert",
            "tranType": {
                "value": "Issue"
            },
            "branchNumber": {
                "value": "11"
            },
            "warehouseId": {
                "value": "gro"
            },
            "lineNumber": {
                "value": 1
            },
            "inventoryNumber": {
                "value": "10001"
            },
            "quantity": {
                "value": 5
            },
            "reasonCode": {
                "value": "2"
            }
        },
        {
            "operation": "Insert",
            "tranType": {
                "value": "Issue"
            },
            "branchNumber": {
                "value": "11"
            },
            "warehouseId": {
                "value": "gro"
            },
            "lineNumber": {
                "value": 2
            },
            "inventoryNumber": {
                "value": "10001"
            },
            "quantity": {
                "value": 5
            },
            "reasonCode": {
                "value": "2"
            }
        }
    ]
}

 

Hope this answered your question.

Kind regards
Sandra Anté