REST LaborSvc POST LaborDtl

I am having some issues with creating a labor dtl with REST.

I am confident the issue is I am not giving it all the required parameters but:

  1. All parameters show as optional in SWAGGER (which is obviously wrong)
  2. Error message returned just says {“HttpStatus”:500,“ReasonPhrase”:“REST Api Exception”,“ErrorMessage”:“Employee ID\r\n”,“ErrorType”:“Epicor.RESTApi.ErrorHandling.ApiException”}

I started with many passed parameters but I kept whittling them away trying to make the error go away with no success.
I am currently sending only this:
{
“Company”: “EPIC06”,
“EmployeeNum”: “100”,
“Shift” : 1
}

All of those parameters are valid. Note there is no Employee ID which is what the REST complains about.
Any thoughts?

What’s in Server Log?

(Or turn off custom errors in web.config to see
<system.web>
< customErrors mode=“Off”/>
</system.web>
)

PS - The ‘required / optional’ fields are from the system point of view, not the module biz logic point of view. That’s a major module code ‘ease of use’ item we need to tackle. Unfortunately it’s not any better than what you see in a UBaq or customization where you want to update something in a ad-hoc way.

Hahah I always get a laugh when people suggest I make changes on the server. Don’t you know I am 86’d lol!

No server access for this guy.

I spoke with @josecgomez and he suggested using an updatable baq via REST in lieu of the LaborSvc so I think I’ve got a workaround. I would like to revisit this someday. I imagine looking at the BO req’s may give me a clue as to what it’s lacking.

1 Like