I have spent quite some time trying to POST time entries to Epicor via their REST API.
I keep getting the error:
“HttpStatus”: 400,
“ReasonPhrase”: “REST API Exception”,
“ErrorMessage”: “A valid Employee ID is required”,
But I know for a fact that the Employee ID exists in the company being referenced. I am also able to GET entries I submitted with no problems.
Is there a good resource to read up on what services are required for certain entries? I have been attempting to use Erp.BO.LaborSvc/LaborDtls with the same data I was passing through DMT but am running into issues.
I do not know if I have to first create an entry using Erp.BO.LaborSvc/Labors and then submit details? There is not much documentation and the required fields are not labelled either so it is hard to figure out what is missing here.
I see the system using Erp.Proxy.BO.LaborImpl to run a CheckWarning method and then Erp.Proxy.BO.LaborImpl uses the Update method with the parameters from the time entry screen.
Seems like other than a few methods to validate the data the system is just sending a the parameters to update the db. I think the validation would be handled when the API call is submitted to the server?
The services in the API do not necessarily match the objects I am seeing in the trace log so it is hard to figure out whats is missing.
No, I got it figured out.
I had to submit the LaborHed and LaborDtl together and include the company in both records. Everything seems to be hitting the system correctly now.