Release not being created when Line is POSTed via REST

Normally on order entry, if you create a new line for your order then the first release is automatically created. But when I use the REST API to add lines to an order, there is no release automatically created, and trying to add them manually gives an “Object reference is not set to an instance of an object”, both in Epicor and over the API. I got it to work exactly one time by adding

"RelJob":true,
"EnableRelJob":true

to the body of the JSON in the POST request. But every attempt at replicating it or recreating it has failed exactly the same as before.

Any help on this would be appreciated, thank you!

Usually when trying to replicate something using REST we recommend enabling Trace on the desktop client and see what calls the ERP makes and then try to copy them with REST.

Are you posting to the Update endpoint?
It should be simply sending the dataset with a new OrderDtl record with RowMod A and to call Update.

We would need to see what you are doing (calls and JSON) to create the Order. I have helped many clients use REST to generate Orders, and I have not had that issue.

Very embarrassingly, I think I discovered the problem: I was going off of someone else’s documentation, and so the API request was going to the Erp.Bo.SalesOrdHedDtlSvc endpoint instead of the Erp.Bo.SalesOrderSvc endpoint. Once I fixed the url to goto SalesOrderSvc in postman it worked again. Thanks for your help!