Submit a workflow preparation (explicit asynchronous contract)
const url = 'https://api.invogi.com/v1/ai-preparations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.invogi.com/v1/ai-preparations \ --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. Same preview, consent, entitlement and accounting as /workflow-assistance/generate, without waiting: 200 returns a current ready draft (no new unit), 201 a completed short preparation, 202 a queued or already running job to poll. Re-submitting the same input returns the same job. Long price-document work runs in the background; it is refused in production without a queue, before any charge. Stopping polling does not cancel a running provider call.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
object
Responses
Section titled “Responses”Current ready draft reused
object
object
Deterministic nonempty-result test; only usable results use a unit
True when this preparation used one allowance unit
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Example
{ "preparation": { "task": "DATA_PROFILE_MAPPING", "state": "QUEUED" }, "draft": { "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" }}Completed (short tasks)
object
object
Deterministic nonempty-result test; only usable results use a unit
True when this preparation used one allowance unit
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Example
{ "preparation": { "task": "DATA_PROFILE_MAPPING", "state": "QUEUED" }, "draft": { "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" }}Queued or already running; poll GET /ai-preparations/{preparationId}
object
object
Deterministic nonempty-result test; only usable results use a unit
True when this preparation used one allowance unit
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Example
{ "preparation": { "id": "5b0c3d7e-6f15-4c55-9d3a-3c2f9f0a1b11", "task": "PRICE_SCHEDULE", "state": "QUEUED", "usable": null, "resultRef": "0f6b2f0e-8a8f-4c1e-9d55-2a9b7c3e4d10", "errorCode": null, "message": "Waiting to start. You can leave this page; the result will be kept.", "createdAt": "2026-11-30T12:00:00.000Z", "startedAt": null, "completedAt": null, "deadlineAt": "2026-11-30T12:15:00.000Z", "charged": false }, "draft": null}Invalid request
Missing or invalid API key
API key lacks required scope/role
Resource not found
Conflicting idempotency key or resource processing state
Request-rate or customer-usage limit exceeded; inspect the stable error code