Yes, you can pass a list,
For example, if the table field name is accounts, you can send a PUT request like
data = {“accounts”: [{“account”: “Debtors - WP”,“company”: “Wind Power LLC”}]}
sending this to /api/resource/Customer/Customer_Name (in v5) would create a child record for party account and attach it to the customer.
I am trying to do as you said but i get this error:
Traceback (innermost last): File "/home/frappe/press/benches/1606030840/apps/frappe/frappe/app.py", line 60, in application response = frappe.api.handle() File "/home/frappe/press/benches/1606030840/apps/frappe/frappe/api.py", line 116, in handle "data": frappe.get_doc(data).insert().as_dict() File "/home/frappe/press/benches/1606030840/apps/frappe/frappe/model/base_document.py", line 241, in as_dict doc[df.fieldname] = [d.as_dict(no_nulls=no_nulls) for d in children] AttributeError: 'unicode' object has no attribute 'as_dict'