How to change the Work Flow State from REST APIs? (Python Client is also fine)

Hi all,
I’m trying to change the status of a Material Receipt from
{
“status”: “Draft”
}

to
{
“status”: “Pending”
}

using REST APIs?

frappe/frappe-client has been discontinued and folded into the main frappe framework. If anyone else is looking for a python client, you can use frappe/frappectl like described here: Introducing "frappectl" - #5 by meichthys

you should be able to use frappectl doc update or via python like described in the above link.

Don’t PATCH “status” directly it’s usually a derived/read-only field. To move Draft → Pending, submit the doc instead:

PUT /api/resource/Material Receipt/{name}
{ "docstatus": 1 }

If that fails, the doctype likely has a Workflow attached, in which case you need:

PUT /api/method/frappe.model.workflow.apply_workflow
{ "doc": "<docname>", "action": "<workflow action name>" }

Workflow for that doctype to confirm which path applies.