Does anyone know of a way to use a single Rest API PUT request to both, create an SO, and allocate serialized items to the lines?
I have a call structured like this:
{
"CustomerID": {"value": "C000517"},
"Date": {"value": "2022-08-28T00:00:00"},
"Description": {"value": "Postman Test"},
"Details": [
{
"DiscountAmount": {"value": 10.00},
"ExtendedPrice": {"value": 2000.00},
"FreeItem": {"value": false},
"InventoryID": {"value": "TestItem"},
"OrderQty": {"value": 1.00},
"UnitPrice": {"value": 2000.00},
"UOM": {"value": "EA"},
"WarehouseID": {"value": "MAIN"},
"Allocations": [
{
"SplitLineNbr": {"value": "2"},
"Allocated": {
"value": true
},
"AllocWarehouseID": {
"value": "MAIN"
},
"InventoryID": {
"value": "TestItem"
},
"LotSerialNbr": {
"value": "116046"
},
"Qty": {
"value": 1.000000
}
}
]
}
],
"Hold": {"value": true},
"LocationID": {"value": "MAIN"},
"OrderType": {"value": "SO"},
"OrderNbr": {"value": "POSTM001"},
"RequestedOn": {"value": "2022-08-31T00:00:00"}
}
When I run this code, I get an SO with one detail line and 2 allocations: one without a serial number, and another with a serial number.
I tried using
"SplitLineNbr": {"value": 2}
or
"SplitLineNbr": 2
But still get the same result.
Any ideas how to achieve this without a second call to UPDATE the SOOrder?
Thank you!