Material Transfer via a REST API

Hello,

I’m very new to Frappe and ERPNext. I have a great interest in implementing ERPNext but I know how to make a simple stock transfer from via an API call from an external application.

I was able to access and run some APIs using Postman, but my requirement is I just need to do a Material Transfer of a stock item named “ABC” from warehouse “W1” to warehouse W2 with a specific quantity. I could access the different doctypes but couldn’t find out the available methods/functions for each so I can make a stock transfer. I believe the doctype I need here is “Stock Entry”

I tried to browse the various topics and documentation here but I didn’t find anything that explains the flow I should go through in order to perform this action. I could see that many people were able to do it, but they always have other issues they asked about, they never explained how it’s done. In my mind, a stock transfer would be done in one of the following ways:

  1. Consume a single API that is dedicated to Material Transfer, providing all the necessary parameters and done.
  2. Consume various APIs that simulate the Material Transfer function on the UI. I’m really hoping it’s not this option here.

Would anyone kindly help me with this? First knowing which of the above ways I have to use, and second the actual flow of APIs I need to consume. Please bear in mind that I’m still new to Frappe and ERPNext so the more detailed the answer and the less terminology, the better.

Thank you all in advance!

Fouad

Hello,

REST API is new to the Frappe but has been around for a while now. From my experience, I don’t use the standard REST APIs provided by the Frappe. You can create API using frappe.whitelist() in order to simplify the process; then use FrappeClient for any authentication purposes.

Resources:
https://frappe.io/docs/user/en/guides/basics/frappe_ajax_call

It is a longer process if you wish to follow standard REST APIs; it is putting up required parameters as per DocType implementations.

Regards,

Ivan