Record what happened to the money behind a confirmed finding's invoice (ANALYST+, dashboard user)
const url = 'https://api.invogi.com/v1/findings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/outcome';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"PREVENTED","note":"Removed from the 14 Oct payment run."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.invogi.com/v1/findings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/outcome \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "kind": "PREVENTED", "note": "Removed from the 14 Oct payment run." }'Records that the invoice’s payment was permanently stopped
(PREVENTED: cancelled, voided, corrected or removed from a payment
run — a hold alone is not enough). RECOVERED is refused with 409:
recovered money is recorded on a recovery case (POST /recoveries),
as cash received or credit applied. A prevented outcome is refused
while the invoice is part of a recovery case. Prevented outcomes are
part of the benefit totalled in the overview’s impact. One
outcome per invoice: recording again, from this or another finding on
the same invoice, replaces it. Only a CONFIRMED finding on an
invoice can justify one (409 otherwise), and amount may not exceed
the invoice’s gross amount (it defaults to it). API keys cannot record
outcomes (403): like a review, it must be attributable to a person.
See docs/31_FINANCIAL_IMPACT.md.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Decimal string in the invoice’s currency; defaults to its gross amount
What happened and how it was verified
Example
{ "kind": "PREVENTED", "note": "Removed from the 14 Oct payment run."}Responses
Section titled “Responses”The invoice’s outcome
object
Decimal string in the invoice’s currency
The confirmed finding that recorded it
object
False when no finding on its invoice is CONFIRMED any more; kept
Example
{ "kind": "PREVENTED"}Invalid request
object
object
Example
{ "error": { "code": "NOT_FOUND" }}Missing or invalid API key
object
object
Example
{ "error": { "code": "NOT_FOUND" }}API key lacks required scope/role
object
object
Example
{ "error": { "code": "NOT_FOUND" }}Resource not found
object
object
Example
{ "error": { "code": "NOT_FOUND" }}The finding is not confirmed or has no invoice, kind is RECOVERED, or the invoice is under recovery