Skip to content

Prepare or reuse a source-grounded workflow draft

POST
/workflow-assistance/generate
curl --request POST \
--url https://api.invogi.com/v1/workflow-assistance/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "input": { "task": "SUPPLIER_REPLY", "caseId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sourceText": "example", "supplierId": "example", "companyId": "example", "sourceId": "example", "proposalId": "example", "checkId": "example", "month": "example", "entityScope": "example", "currencyScope": "example", "from": "example", "to": "example", "query": "example" }, "fingerprint": "example", "consent": true }'

Signed-in dashboard Analyst, Admin or Owner only; API keys are refused. No AI output makes a financial decision. Requires Owner-enabled external processing and explicit consent to the preview. Sources must still match. 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). Current ready drafts and in-flight preparations are reused per requester and source fingerprint without another provider call. Compatibility contract for older clients: always a completed draft (201) or CONFLICT with error.details.preparation_id while the work continues (Retry-After); long price-document work is waited on for a bounded time only. New clients use POST /ai-preparations. Unapplied drafts expire after 24 hours; accepted evidence remains with the record. Model prose is advisory; authoritative financial figures remain separate server facts.

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.

Media typeapplication/json
object
input
required
One of: discriminator: task
object
task
required
string
Allowed value: SUPPLIER_REPLY
caseId
required
string format: uuid
sourceText
required
string
>= 1 characters <= 24000 characters
supplierId
string
companyId
string
sourceId
string
proposalId
string
checkId
string
month
string
entityScope
string
currencyScope
string
from
string
to
string
query
string
fingerprint
required
string
>= 64 characters <= 64 characters
consent
required
boolean

Canonical result

Media typeapplication/json
object
version
required
string
Allowed value: invogi.workflow-assistance.v1
input
required
One of: discriminator: task
object
task
required
string
Allowed value: SUPPLIER_REPLY
caseId
required
string format: uuid
sourceText
required
string
>= 1 characters <= 24000 characters
supplierId
string
companyId
string
sourceId
string
proposalId
string
checkId
string
month
string
entityScope
string
currencyScope
string
from
string
to
string
query
string
fingerprint
required
string
>= 64 characters <= 64 characters
sources
required
Array<object>
<= 80 items
object
id
required
string
text
required
string
page
required
Any of:
integer
>= 1
facts
required
Array<object>
object
id
required
string
label
required
string
value
required
string
href
required
Any of:
string
notices
required
Array<string>
processingEnabled
required
boolean
id
required
string
content
required
Any of:
null
status
required
string
Allowed values: FAILED READY SOURCE GENERATING APPLIED
stale
required
boolean
createdAt
required
string
expiresAt
required
string
resultId
required
null | string
filterInterpretation
object
href
required
null | string
unresolved
required
Array<string>
id
required
string format: uuid
content
required
One of:
object
points
required
Array<object>
<= 5 items
object
text
required
string
>= 1 characters <= 600 characters
citations
required
Array<object>
>= 1 items <= 4 items
object
sourceId
required
string
>= 1 characters <= 80 characters
quote
required
string
>= 1 characters <= 400 characters
questions
required
Array<string>
<= 5 items
draft
required
Any of:
object
subject
required
string
<= 200 characters
body
required
string
<= 3000 characters
citations
required
Array<object>
>= 1 items <= 6 items
object
sourceId
required
string
>= 1 characters <= 80 characters
quote
required
string
>= 1 characters <= 400 characters
plan
required
Any of:
object
nextAction
required
Any of:
string
<= 500 characters
promisedResponseOn
required
Any of:
string format: date
citations
required
Array<object>
>= 1 items <= 4 items
object
sourceId
required
string
>= 1 characters <= 80 characters
quote
required
string
>= 1 characters <= 400 characters
prices
Array<object>
object
currency
required
null | string
itemCode
required
null | string
variant
required
null | string
unit
required
null | string
netPrice
required
null | string
priceBaseQuantity
required
null | string
effectiveFrom
required
null | string
effectiveTo
required
null | string
citations
required
Array<object>
object
sourceId
required
string
quote
required
string
unsupportedTerms
Array<object>
object
text
required
string
citations
required
Array<object>
object
sourceId
required
string
quote
required
string
filters
object
type
required
Array<string>
status
required
Any of:
null
severity
required
Array<string>
Allowed values: INFO LOW MEDIUM HIGH CRITICAL
disposition
required
Array<string>
Allowed values: OPEN CONFIRMED FALSE_POSITIVE ACCEPTED_RISK
supplierName
required
null | string
from
required
null | string
to
required
null | string
assignee
required
Any of:
null
sla
required
Any of:
null
view
required
Any of:
null
q
required
null | string
unsupportedRequests
Array<string>
status
required
string
Allowed values: SOURCE GENERATING READY FAILED APPLIED
stale
required
boolean
createdAt
required
string format: date-time
expiresAt
required
string format: date-time
resultId
required
Any of:
string format: uuid
filterInterpretation
object
href
required
Any of:
string
unresolved
required
Array<string>
version
required
string
Allowed value: invogi.workflow-assistance.v1
input
required
Any of:
object
caseId
required
string
task
required
string
Allowed value: SUPPLIER_REPLY
sourceText
required
string
supplierId
string
companyId
string
sourceId
string
proposalId
string
checkId
string
month
string
entityScope
string
currencyScope
string
from
string
to
string
query
string
fingerprint
required
string
sources
required
Array<object>
object
id
required
string
text
required
string
page
required
null | number
facts
required
Array<object>
object
id
required
string
label
required
string
value
required
string
href
required
null | string
notices
required
Array<string>
processingEnabled
required
boolean

Example

{
"version": "invogi.workflow-assistance.v1",
"input": {
"task": "SUPPLIER_REPLY"
},
"content": {
"filters": {
"status": "open",
"severity": [
"INFO"
],
"disposition": [
"OPEN"
],
"assignee": "all",
"sla": "overdue",
"view": "recovery_candidates"
}
},
"status": "SOURCE"
}

Invalid request

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"
}
}

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"
}
}

Request-rate or customer-usage limit exceeded; inspect the stable error code

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"
}
}