Mark an accountant task as done
PUT/accountant-tasks/:code/done
Transition an accountant task to the DONE status. For an invoice_without_po task, send resolution_reason (resolved_externally, not_an_invoice, duplicate) to record the resolution path on the task. Omit it for a plain completion. assigned_to_po is not accepted: the match flow closes the task server-side and records that path itself. Restricted to the legal entities the caller reaches through their organizational units: a task belonging to any other entity, and a task belonging to none, answers 404 exactly like an unknown code. ADMIN is unrestricted. Two rules gate an active task on top of that scope: the four-eyes rule refuses the requester or buyer of the purchase, and a task assigned to somebody else must be claimed before it can be completed. Neither applies to a task already in a terminal status, so completing an already-DONE task stays an idempotent no-op.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 429
- 500
Successfully completed task
Bad request
Unauthorized
Caller is the requester or buyer of this purchase (four-eyes rule)
Task not found, or outside the caller's legal-entity scope
Task is assigned to another user, is in a terminal status, or its FI transfer is owned by the export
Too many requests - rate limited by the API firewall; wait out the Retry-After delay before retrying
Response Headers
Delay in seconds a client must wait before retrying the request
Internal server error