Try ERPNext Buy Support Partners Foundation

REST API Methods with Body

I’m trying to use a REST API to check if a specific document exists. This is what I have, but I get Invalid Method in Postman.

GET https://faliam.erpnext.com/api/method/frappe.db.exists
args {“doctype”:“Supplier”, “docname”:“Faliam API Test”}

Thanks for the help

Just use GET /api/resource/Supplier/Faliam%20API%20Test and if the response has status 404 it doesn’t exist, if the status is 200 it does.

In general you cannot use just any method over the API. Only the ones that are annotated with @frappe.whitelist() in the code are allowed.

3 Likes