Make Inventory Qty Adjustment using Rest Services

I’m getting an error when trying to make an inventory adjustment using REST.

What am I missing here? I tried to follow all the methods from the Epicor trace log and this is the one that I can’t get to work.

POST /SetInventoryQtyAd

//Input

{
“ds”: {
“InventoryQtyAdj”: [
{
“Company”: “29558”,
“PartNum”: “EM200DR”,
“WareHseCode”: “MQ”,
“OnHandQty”: “365”,
“BinNum”: “6101A1”,
“AdjustQuantity”: “-1”,
“ReasonCode”: “IVCNT”,

    "Reference": "TEST 5",
    "UnitOfMeasure": "EA"
    
  }
]

}
}

//Response Code

{
“HttpStatus”: 400,
“ReasonPhrase”: “REST API Exception”,
“ErrorMessage”: “ttInventoryQtyAdj record not found.”,
“ErrorType”: “Ice.BLException”,
“ErrorDetails”: [
{
“Message”: “ttInventoryQtyAdj record not found.”,
“Type”: “Error”,
“Table”: “ttInventoryQtyAdj”,
“Field”: “RowMod”,
“Program”: “Erp.Services.BO.InventoryQtyAdj.dll”,
“Method”: “SetInventoryQtyAdj”,
“ColumnNumber”: 17,
“LineNumber”: 1523
}
]
}

//Response Code

400

Perhaps add “RowMod”: “A” to the passed record

Should the Qty be surrounded by quotes?

The return response shows number fields w/o quotes

“Method”: “SetInventoryQtyAdj”,
“ColumnNumber”: 17,
“LineNumber”: 1523

Also, should you be passing both the OnHandQty and the AdjustQuantity? If so, is the OHQ before or after the adj?

Technically this won’t matter. @Chris_Conn is right RowMod is missing with a “U”. I am 99.9% sure it requires TransDate as well. Yes - the qty should have double quotes as well.

1 Like