Create a final invoice
Create the final invoice of a completed task.
POST https://cotlet.dev/api/v1/aroflo/tasks/{task_id}/invoice-from-tasks
write Confirm
Does what Create Final Invoice does at the bottom of the worksheet and returns the invoice_id and its status. For an unquoted job AroFlo adds the labour and material from the job sheet. The task must be Completed; any other status fails with an error. The invoice is not approved or sent. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| task_id string required | string | Task ID from list_tasks. |
Request
curl -X POST https://cotlet.dev/api/v1/aroflo/tasks/task_8c41d2/invoice-from-tasks \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("aroflo", "create_invoice_from_task", {"task_id":"task_8c41d2"}) const result = await cotlet.call('aroflo', 'create_invoice_from_task', {"task_id":"task_8c41d2"}); cotlet call aroflo create_invoice_from_task --data '{"task_id":"task_8c41d2"}' Example response
{
"invoice_id": "inv_2041",
"invoice_no": "2041",
"task_id": "task_8790",
"job_number": "J1170",
"status": "In Progress",
"total": 840
}