Skip to content

Prepare an evidence-grounded resolution brief (ANALYST+, dashboard user)

POST
/findings/{findingId}/resolution-assistance
curl --request POST \
--url https://api.invogi.com/v1/findings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/resolution-assistance \
--header 'Authorization: Bearer <token>'

Uses the workspace’s consented AI processing to prepare a cached brief, verification checklist, and—only for document requests or recovery—a supplier draft. It cannot review the finding, change PASS/REVIEW/BLOCK, write invoice data, or send a message. Provider input is minimized and bank/contact identifiers are redacted. API keys and findings that are no longer open are refused. AGREED_PRICE_VARIANCE uses COMPARE_RECORDS: only the stored canonical price comparison is sent, without invoice gross amounts or raw attachments. The headline and net calculation stay authoritative; field-level price citations support additional checks. These findings never return a supplier draft. Corrected source lines or changed invoice date/currency require rerunning the audit. Generated and cached briefs are rechecked against current finding/invoice inputs and consent before publication; concurrent changes return CONFLICT. Shared AI policy (ai-assistance-policy@1): generation requires the workspace’s effective AI mode, task rollout and Owner processing setting (see GET /organizations/current/ai-assistance); one successful, nonempty result uses one unit of the shared allowance, while empty, failed or stale output does not. A shared guard allows 30 requests per workspace per hour and two concurrent preparations. Refusals carry error.details.reason (for example ROLLOUT_OFF, NOT_ENROLLED, TASK_PAUSED, ALLOWANCE_EXHAUSTED with resets_at, SERVICE_LIMIT). Cached briefs are tenant-visible and free to read; a teammate’s in-flight preparation of the same brief returns CONFLICT instead of a second provider call. The one Scout→Llama fallback is part of the same preparation and unit.

findingId
required
string format: uuid
X-Invogi-Organization
string format: uuid

For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.

Cached current brief

Media typeapplication/json
object
id
required
string format: uuid
action_kind
required
string
Allowed values: COMPARE_RECORDS CORRECT_DATA REQUEST_DOCUMENT VERIFY_SUPPLIER RECOVER_VALUE REVIEW_EVIDENCE
model
required

Model provenance; never a decision-engine version

string
prompt_version
required
string
generated_at
required
string format: date-time
cached
required
boolean
helpful
required

The current authenticated reviewer’s feedback; null when they have not voted

boolean | null
content
required
object
brief
required
string
<= 500 characters
briefCitations
required
Array<string>
<= 6 items
checks
required
Array<object>
<= 5 items
object
instruction
required
string
<= 500 characters
citations
required
Array<string>
<= 6 items
draft
required
object
subject
string
<= 200 characters
body
string
<= 4000 characters
citations
Array<string>
<= 6 items

Example

{
"action_kind": "COMPARE_RECORDS"
}

Newly generated brief

Media typeapplication/json
object
id
required
string format: uuid
action_kind
required
string
Allowed values: COMPARE_RECORDS CORRECT_DATA REQUEST_DOCUMENT VERIFY_SUPPLIER RECOVER_VALUE REVIEW_EVIDENCE
model
required

Model provenance; never a decision-engine version

string
prompt_version
required
string
generated_at
required
string format: date-time
cached
required
boolean
helpful
required

The current authenticated reviewer’s feedback; null when they have not voted

boolean | null
content
required
object
brief
required
string
<= 500 characters
briefCitations
required
Array<string>
<= 6 items
checks
required
Array<object>
<= 5 items
object
instruction
required
string
<= 500 characters
citations
required
Array<string>
<= 6 items
draft
required
object
subject
string
<= 200 characters
body
string
<= 4000 characters
citations
Array<string>
<= 6 items

Example

{
"action_kind": "COMPARE_RECORDS"
}

Missing or invalid API key

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

API key lacks required scope/role

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

Resource not found

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

Conflicting idempotency key or resource processing state

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}