Good Day
I am new to erpnext and would like to do some api calls to erpnext in separate python app, could anyone guide me?
I saw this: http://frappe.local:8000/api/resource/Person/ and tried with this:
http://192.168.2.1:8000/api/resource/Person/, but did not give me anything.
Thank You
Albertus Geyser
rmehta
2
instead of [Person] try a standard DocType like Customer
This library will be useful for python
Good Day
Thank You for quick response.
I tried the following:
from frappeclient import FrappeClient
client = FrappeClient(“http://192.168.2.14”, “user”, “password”)
customer_name = client.get_value(“Customer”,“name”,{“website”: “piet@skiet.co.za”})
customer = client.get_doc(“Customer”, customer_name[‘name’])
print customer
I get the following response:
TypeError: ‘NoneType’ object has no attribute ‘getitem’
Sorry this my first call and still need to learn.
Thank You
Albertus Geyser
Good Day
I found my mistake i used wrong field.
Thank You
Albertus Geyser
1 Like
Watch this video to implement API calls to your custom apps: ERPNext/Frappe: Making API Calls - YouTube
2 Likes