Hello everyone,
I have simple question about How to get sales orders item from Frappe API ?. I have got response from sales order except Sales order items.
with using this request :
http://206.189.54.106/api/resource/Sales%20Order?filters={"customer_name":"Baran Karaboga"}&fields=["naming_series","customer_name","order_type","address_display","total","net_total","delivery_date","delivery_status","billing_status"]&limit_page_length=20&
i got this response :
{
"data": [
{
"billing_status": "Not Billed",
"delivery_date": "2099-01-01",
"delivery_status": "Not Delivered",
"net_total": 100,
"customer_name": "Baran Karaboga",
"naming_series": "SAL-ORD-.YYYY.-",
"order_type": "Sales",
"address_display": "asda<br>asdas<br>asdasd<br>\nasdasd<br>48200<br>Turkey<br>\nPhone: 05555598<br>Fax: 055555313498<br>Email: test@barankaraboga.com<br>",
"total": 100
},
{
"billing_status": "Not Billed",
"delivery_date": "2099-01-01",
"delivery_status": "Not Delivered",
"net_total": 100,
"customer_name": "Baran Karaboga",
"naming_series": "SAL-ORD-.YYYY.-",
"order_type": "Sales",
"address_display": "asda<br>asdas<br>asdasd<br>\nasdasd<br>48200<br>Turkey<br>\nPhone: 5555553498<br>Fax: 05555598<br>Email: test@barankaraboga.com<br>",
"total": 100
}
]
}
this request works fine but i want to show items field. I have tried to add items in my query but i had always error like :
File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/pymysql/protocol.py", line 220, in check_error\n err.raise_mysql_exception(self._data)\n File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/pymysql/err.py", line 109, in raise_mysql_exception\n raise errorclass(errno, errval)\npymysql.err.InternalError: (1054, "Unknown column āitemsā in āfield listā")