RE: How I can approve the invoices using web-service?
I initially looked into how Power Automate is able to approve documents through a BC Workflow Approval process using a flow. I saw that it was calling WorkflowActionResponse_Approve.

That call is not available through the BC v1.0 API, but someone helpfully explained to me that it is instead available through a Code Unit web service.

The remaining challenge would be figuring out how to call that presumably undocumented web services method. And there's the question of whether it's advisable to code against that Code Unit web service.
But then I wondered about a different approach. Rather than attempting to use a workflow method to update the document, I wondered if it is possible to directly update the document status.
I don't know if this approach is advisable in BC, but I'm looking into the purchaseInvoices API to see if the "status" field can be updated with a PATCH.
However, one oddity I found is that when I view a test Purchase Invoice in BC, the Status is Open. But when I retrieve the purchase invoice data from the BC v1.0 API, the status field value is "Draft". So I'm concerned that there is something I'm not understanding about this approach.

