10.2.200.40 - REST API V1 - Post APInvDtls - Packing Slip references invalid value

We are trying to set up a REST API v1 Post for APInvDtls. We can get all information to post except when we add in the PackSlip and PackLine values. Then, it gives us the error mentioned in the subject of “Packing Slip references invalid value”.

Here is the format we are testing with:

{
  "Company": "75777",
  "VendorNum": 512,
  "InvoiceNum": "23688266-J",
  "InvoiceLine": 0,
  "LineType": "R",
  "DocUnitCost": "7.87",
  "PartNum": "32678112",
  "PONum": 208862,
  "POLine": 7,
  "PORelNum": 1,
  "Description": "TEST Line Part Description",
  "PackSlip": "208862",
  "PackLine": 8,
  "PUM": "EA",
  "OurQty": "4.0",
  "DocExtCost": "31.48",
  "MatchFiscalYear": 2022,
  "MatchFiscalPeriod": 9,
  "ScrDocExtCost": "31.48"
}

This is the detailed error:

{   "HttpStatus": 400,   "ReasonPhrase": "REST API Exception",   "ErrorMessage": "Packing Slip references invalid value.",   "ErrorType": "Ice.Common.BusinessObjectException",   "ErrorDetails": [     {       "Message": "Packing Slip references invalid value.",       "Type": "Error",       "Table": "APInvDtl",       "Program": "Epicor.RESTApi.dll",       "Method": "ThrowUpdateExtRESTApiException",       "ColumnNumber": 17,       "LineNumber": 184     }   ] }

I believe there was another post about a bug being in a specific version of Epicor with the Rest API service. I’m hoping that is not the same case here. If anyone needs any additional details, please feel free to ask. I will provide whatever you need to help solve this. @josecgomez was the one who figured out on the other post that it was a bug after he used postman and the API help to test it. Hoping he can help out on this one as well.

Thanks in advance!

Have you tried this in the V2 version of the API? V2 is where Epicor is continuing development.

I don’t believe that 10.2.200 works with V2.

1 Like

We figured out the issue in case anyone else is looking for an answer. We needed to pull the SysRowID from the RcvDtlsSearches (Receipts) for the specific PackSlip and PackLine and then it allowed us to Post the APInvDtls record through the API.