An error occurs when creating purchase receipts without a link to specific purchases, and the same inventory number occurs multiple times after each other, and in addition allocations are specified. Endpoint: POST to /controller/api/v1/PurchaseReceipt This error occurs even though the quantities are specified: "message": "VismaId: 7523eff7-f821-4666-a1da-7e4644487f0c. Error creating purchase receipt. Purchase order error: The quantity must be above 0." If the inventory numbers are not straight after each other , but separated by another number inbetween everything goes well. Example, method 1, this creates an error: Product 1, allocation A Product 1, allocation B Product 2, allocation C But this goes well, method 2, Product 1, allocation A Product 2, allocation C Product 1, allocation B Please see the JSON examples OK and NotOk below. The data is coming from a WMS system , so we don't have control over the order the products are received. For other reasons, the products need to be stated on two different lines in Visma.net, so we can't merge them into one line with two allocations. Please advise on what we should change to get method 1 to work as intended. Not OK, method 1: {
"receiptType": {
"value": "PoReceipt"
},
"hold": {
"value": false
},
"date": {
"value": "2021-06-24T10:11:28.000Z"
},
"warehouseId": {
"value": "AA"
},
"supplierId": {
"value": "50069"
},
"locationId": {
"value": "HOVED"
},
"createBill": {
"value": false
},
"lines": [
{
"allocations": [
{
"operation": "Insert",
"lineNbr": {
"value": 1
},
"location": {
"value": "Stuv"
},
"lotSerialNumber": {
"value": "170x170"
},
"quantity": {
"value": 2.8
},
"uom": {
"value": "M2"
}
}
],
"operation": "Insert",
"lineNbr": {
"value": 0
},
"lineType": {
"value": "GoodsForInventory"
},
"inventoryId": {
"value": "117768"
},
"warehouseId": {
"value": "AA"
},
"locationId": {
"value": "Stuv"
},
"uom": {
"value": "M2"
}
},
{
"allocations": [
{
"operation": "Insert",
"lineNbr": {
"value": 1
},
"location": {
"value": "Stuv"
},
"lotSerialNumber": {
"value": "400x92"
},
"quantity": {
"value": 3.6
},
"uom": {
"value": "M2"
}
}
],
"operation": "Insert",
"lineNbr": {
"value": 0
},
"lineType": {
"value": "GoodsForInventory"
},
"inventoryId": {
"value": "117768"
},
"warehouseId": {
"value": "AA"
},
"locationId": {
"value": "Stuv"
},
"uom": {
"value": "M2"
}
},
{
"allocations": [
{
"operation": "Insert",
"lineNbr": {
"value": 1
},
"location": {
"value": "Stuv"
},
"lotSerialNumber": {
"value": "133x490"
},
"quantity": {
"value": 6.5
},
"uom": {
"value": "M2"
}
}
],
"operation": "Insert",
"lineNbr": {
"value": 0
},
"lineType": {
"value": "GoodsForInventory"
},
"inventoryId": {
"value": "113728"
},
"warehouseId": {
"value": "AA"
},
"locationId": {
"value": "Stuv"
},
"uom": {
"value": "M2"
}
}
]
} OK, method 2: {
"receiptType": {
"value": "PoReceipt"
},
"hold": {
"value": false
},
"date": {
"value": "2021-06-24T10:11:28.000Z"
},
"warehouseId": {
"value": "AA"
},
"supplierId": {
"value": "50069"
},
"locationId": {
"value": "HOVED"
},
"createBill": {
"value": false
},
"lines": [
{
"allocations": [
{
"operation": "Insert",
"lineNbr": {
"value": 1
},
"location": {
"value": "Stuv"
},
"lotSerialNumber": {
"value": "170x170"
},
"quantity": {
"value": 2.8
},
"uom": {
"value": "M2"
}
}
],
"operation": "Insert",
"lineNbr": {
"value": 0
},
"lineType": {
"value": "GoodsForInventory"
},
"inventoryId": {
"value": "117768"
},
"warehouseId": {
"value": "AA"
},
"locationId": {
"value": "Stuv"
},
"uom": {
"value": "M2"
}
},
{
"allocations": [
{
"operation": "Insert",
"lineNbr": {
"value": 1
},
"location": {
"value": "Stuv"
},
"lotSerialNumber": {
"value": "133x490"
},
"quantity": {
"value": 6.5
},
"uom": {
"value": "M2"
}
}
],
"operation": "Insert",
"lineNbr": {
"value": 0
},
"lineType": {
"value": "GoodsForInventory"
},
"inventoryId": {
"value": "113728"
},
"warehouseId": {
"value": "AA"
},
"locationId": {
"value": "Stuv"
},
"uom": {
"value": "M2"
}
},
{
"allocations": [
{
"operation": "Insert",
"lineNbr": {
"value": 1
},
"location": {
"value": "Stuv"
},
"lotSerialNumber": {
"value": "400x92"
},
"quantity": {
"value": 3.6
},
"uom": {
"value": "M2"
}
}
],
"operation": "Insert",
"lineNbr": {
"value": 0
},
"lineType": {
"value": "GoodsForInventory"
},
"inventoryId": {
"value": "117768"
},
"warehouseId": {
"value": "AA"
},
"locationId": {
"value": "Stuv"
},
"uom": {
"value": "M2"
}
}
]
}
... View more