I tried creating an invoice with Frappe REST API like this and got the error in the title
{
"customer": "Test",
"series": "SINV-.YY.-",
"date": "10-05-2023",
"docstatus": 1,
"update_stock": 1,
"is_pos": 1,
"pos_profile": "Prof",
"submit_on_creation": true,
"mode_of_payment": "Cash",
"items": [
{
"item_code": "1001",
"qty": 5,
"rate": 100
}
]
}