Trying to call a whitelisted method

Hi,
I’ve whitelisted a method in anapp installed within ERPNext. I am having a hard time determing what the dotted path to the method should be. The physical path to the file is frappe-bench/apps/am_mws/am_mws/am_mws/doctype/mws_integration_settings/amazon_methods.py
When called from Postman, i get varous “not found” errors, based on what permutation of the dotted path I am trying.

am_mws.am_mws.doctype.mws_integration_settings.amazon_methods.function_name

If you’re calling from Postman then it’d be mysite.com/api/method/am_mws.am_mws.doctype.mws_integration_settings.amazon_methods.function_name

Replace function_name with the name of the function and Bob’s your uncle.

3 Likes

Hi @Mike_Z,

Frappe / ERPNext API on the Postman Public API Network

Another reference: Postman

Thank You!

2 Likes

Thank you! So it’s really the full path, from the apps/appname/ directory. Got it

Correct. It’s basically app_name.directory1.directory2.file_name.function_name

With as many directories as it takes to get to your python file, of course.