ReST API Changes v4 to v5

Hi, I had been successfully using the Version 4 ERPNext API from a Java application to make stock entries. It no longer works since the update to Version 5. I get HTTP error code 500 returned.

The HTTP POST data is

{“from_warehouse”:“”,“to_warehouse”:“Georges Quay - Epi”,“docstatus”:1,“naming_series”:“STE”,“purpose”:“Material Receipt”,“mtn_details”:[{“qty”:1,“conversion_factor”:1,“stock_uom”:“Unit”,“incoming_rate”:10,“serial_no”:“1234567812345678\n”,“item_code”:“TES-21-w1.5”,“expense_account”:“Stock Adjustment - Epi”}]}

I am wondering if Material Receipt has been renamed or some of the fields e,g, mtn_details.
Maybe someone could point me to relevant documentation since I inherited the java code.

Thanks in advance.

Yes, for example mtn_details has been renamed to items


for the mapping

Were you able to make the POST request successfully?

Yes, that works perfectly now. Thank you.

1 Like