Try ERPNext Buy Support Partners Foundation

How to determine minimum fields to submit for api resource insert

I am currently trying to create a new ERPNext user through the Rest API. I have tried sending various fields including id, email, first_name and new_password. As well as just id. From what I came across on the forum, the minimum set of fields that need to be sent to the API are the required fields found in the data import feature for the doctype. In the case of a user, this is ID. When I post my data to the API I receive the following error each time, no matter if I include the email field or not. Or how I capitalize it:

[ERROR] 2020-09-17 21:09:53,926 | /home/frappe/frappe-bench/apps/frappe/frappe/app.py:
Site: site1.local
Form Dict: {
“ID”: “name@domain.com
}
Request Error
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 64, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 130, in handle
“data”: frappe.get_doc(data).insert().as_dict()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 225, in insert
self.set_new_name()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 393, in set_new_name
set_new_name(self)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 39, in set_new_name
doc.run_method(“autoname”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 797, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1073, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1056, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 791, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py”, line 38, in autoname
self.email = self.email.strip().lower()
AttributeError: ‘NoneType’ object has no attribute ‘strip’

So my question is: How do I determine which fields are necessary to send to create a given doc-type and how do I format those field names… Are they the actual database field names… or something else?