Skip to main content

Workflow

7 operations in the Tolvi API, version 1. Paths are relative to https://api.tolvi.co.uk. Every amount is integer pence.

Sign a section off at its current stage

POST/api/v1/engagements/{id}/sections/{code}/sign

Scopes
engagements:write and engagements:read

Preparer sign-off, or a review stage’s (which also needs review:write). Records the content fingerprint. Not available through MCP. Part of the working_papers product: the firm must have it and you must have access to it.

Parameters

Parameters for POST /api/v1/engagements/{id}/sections/{code}/sign
NameInTypeDescription
idrequiredpathstring (uuid)

Engagement id.

coderequiredpathstring

Section code (W/P ref), e.g. C.

One of: A, B, C, D, E, F, G, H, I, J, K, L, M, T, X, Z

Responses

200 OK, application/json

Body: object (SectionDetail).

200 OK response for POST /api/v1/engagements/{id}/sections/{code}/sign
FieldTypeDescription
coderequiredstring

example "C"

namerequiredstring
kindrequiredstring (SectionKind)

One of: plan, tb, lead, jnl, fs

statusrequiredstring (SectionStatus)

One of: todo, progress, prepared, reviewed, changed

issueCountrequiredinteger

at least 0

openReviewPointsrequiredinteger

at least 0

signOffsrequiredarray of SignOff
signOffs[].​stageIdrequiredstring
signOffs[].​stageNamerequiredstring
signOffs[].​signAsrequiredstring (SignOffRole)

Who signs at this stage, for labels such as "Sign as reviewer".

One of: preparer, reviewer, manager, partner

signOffs[].​userIdrequiredstring (uuid)nullable
signOffs[].​atrequiredstring (date-time)nullable
signOffs[].​currentrequiredboolean

Signed against the content as it is now.

currentStageIdrequiredstringnullable

Stage the section is at.

checklistrequiredarray of ChecklistItem
checklist[].​idrequiredstring (uuid)
checklist[].​positionrequiredinteger
checklist[].​textrequiredstring
checklist[].​originrequiredstring (ChecklistOrigin)

One of: builtin, firm, client

checklist[].​statusrequiredstring (ChecklistStatus)

"" is not yet done.

One of: , done, na

checklist[].​autorequiredboolean

Ticked by Tolvi from the data (a person’s own tick always wins).

checklist[].​noterequiredstring
checklist[].​doneByrequiredstring (uuid)nullable
checklist[].​doneAtrequiredstring (date-time)nullable
checklist[].​evidencerequiredarray of Evidence
checklist[].​evidence[].​idrequiredstring (uuid)
checklist[].​evidence[].​sectionCoderequiredstringnullable
checklist[].​evidence[].​checklistItemIdrequiredstring (uuid)nullable
checklist[].​evidence[].​reviewPointIdrequiredstring (uuid)nullable
checklist[].​evidence[].​reviewPointMessageIdrequiredstring (uuid)nullable
checklist[].​evidence[].​fileNamerequiredstring
checklist[].​evidence[].​contentTyperequiredstring
checklist[].​evidence[].​sizeBytesrequiredinteger

at least 0

checklist[].​evidence[].​statusrequiredstring (EvidenceStatus)

pending_upload until POST …/evidence/{evidenceId}/confirm checks the stored file; then pending_scan (malware scan) and available. Only available files can be downloaded or read by Tolvi AI. rejected: the file failed the checks or the scan found malware (see rejectedReason); it can never be downloaded.

One of: pending_upload, pending_scan, available, rejected

checklist[].​evidence[].​rejectedReasonrequiredstringnullable

Why a rejected file was rejected, e.g. "malware detected"; null otherwise.

checklist[].​evidence[].​uploadedByrequiredstring (uuid)nullable
checklist[].​evidence[].​createdAtrequiredstring (date-time)
issuesrequiredarray of Issue
issues[].​messagerequiredstring
issues[].​actionrequiredstring (IssueAction)

One of: import, map, journal, explain, reconcile, post_tax, post_deferred_tax, open_tax, fixed_assets, post_fixed_assets, checklist

issues[].​labelrequiredstring
issues[].​targetrequiredstringnullable
signOffrequiredobject (SectionSignOffPanel)
signOff.​stagesrequiredarray of SignOff

Every stage that applies to sections, with its live sign-off.

signOff.​stages[].​stageIdrequiredstring
signOff.​stages[].​stageNamerequiredstring
signOff.​stages[].​signAsrequiredstring (SignOffRole)

Who signs at this stage, for labels such as "Sign as reviewer".

One of: preparer, reviewer, manager, partner

signOff.​stages[].​userIdrequiredstring (uuid)nullable
signOff.​stages[].​atrequiredstring (date-time)nullable
signOff.​stages[].​currentrequiredboolean

Signed against the content as it is now.

signOff.​currentStageIdrequiredstring
signOff.​signrequiredobject (GuardResult)

Can the caller sign at the current stage now?

signOff.​sign.​allowedrequiredboolean
signOff.​sign.​reasonsrequiredarray of string
signOff.​sign.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

signOff.​ownSignOffStageIdrequiredstringnullable

Stage of the caller’s own live sign-off, which they can remove.

signOff.​signStageIdstringnullable

The stage signing now would record the caller’s sign-off at. Usually currentStageId; the first stage when the caller re-signs their own out-of-date preparer sign-off (the section is reopened first). Null when there is nothing to sign.

signOff.​unsignobject (GuardResult)

Can the caller remove their own sign-off now? Refused while the file is signed off at every stage.

signOff.​unsign.​allowedrequiredboolean
signOff.​unsign.​reasonsrequiredarray of string
signOff.​unsign.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

signOff.​unsignRemovesarray of SignOff

Removing the caller’s own sign-off removes these later sign-offs too (other people’s).

signOff.​unsignRemoves[].​stageIdrequiredstring
signOff.​unsignRemoves[].​stageNamerequiredstring
signOff.​unsignRemoves[].​signAsrequiredstring (SignOffRole)

Who signs at this stage, for labels such as "Sign as reviewer".

One of: preparer, reviewer, manager, partner

signOff.​unsignRemoves[].​userIdrequiredstring (uuid)nullable
signOff.​unsignRemoves[].​atrequiredstring (date-time)nullable
signOff.​unsignRemoves[].​currentrequiredboolean

Signed against the content as it is now.

signOff.​fingerprintrequiredstring

Content fingerprint now.

nextSteprequiredobject (NextStep)

The first outstanding item and the one action that deals with it.

nextStep.​messagerequiredstring
nextStep.​actionrequiredstring (NextStepAction)

One of: import, map, journal, explain, reconcile, post_tax, post_deferred_tax, open_tax, fixed_assets, post_fixed_assets, checklist, sign, resign, answer_review_point, check_review_point, raise_review_point, open_section, submit, approve, reopen, wait, none, generate_file, start_next_year

nextStep.​labelrequiredstringnullable

Button label, e.g. "Post tax journal".

nextStep.​targetrequiredstringnullable

Section code, journal id, account code or review point id the action is about.

nextStep.​donerequiredboolean

Nothing left for anyone to do here.

nextStep.​morerequiredinteger

Further outstanding items after this one.

at least 0

reviewPointsrequiredarray of ReviewPoint
reviewPoints[].​idrequiredstring (uuid)
reviewPoints[].​sectionCoderequiredstringnullable

Null for a point on the engagement as a whole.

reviewPoints[].​categoryrequiredstring (ReviewPointCategory)

One of: query, error, presentation, missing_evidence

reviewPoints[].​statusrequiredstring (ReviewPointStatus)

One of: open, answered, cleared, reopened

reviewPoints[].​raisedAtStageIdrequiredstring
reviewPoints[].​raisedInRoundrequiredinteger

at least 1

reviewPoints[].​raisedByrequiredstring (uuid)nullable
reviewPoints[].​raisedAtrequiredstring (date-time)
reviewPoints[].​clearedByrequiredstring (uuid)nullable
reviewPoints[].​clearedAtrequiredstring (date-time)nullable
reviewPoints[].​sourceMeetingIdstring (uuid)nullable

The meeting whose next step this point came from (Create follow-ups in Tolvi Meetings), if any.

reviewPoints[].​messagesrequiredarray of ReviewPointMessage
reviewPoints[].​messages[].​idrequiredstring (uuid)
reviewPoints[].​messages[].​kindrequiredstring (ReviewPointMessageKind)

One of: raise, comment, answer, clear, reopen

reviewPoints[].​messages[].​authorIdrequiredstring (uuid)nullable
reviewPoints[].​messages[].​bodyrequiredstring
reviewPoints[].​messages[].​mentionsrequiredarray of string (uuid)
reviewPoints[].​messages[].​atrequiredstring (date-time)
reviewPoints[].​messages[].​evidencerequiredarray of Evidence
reviewPoints[].​messages[].​evidence[].​idrequiredstring (uuid)
reviewPoints[].​messages[].​evidence[].​sectionCoderequiredstringnullable
reviewPoints[].​messages[].​evidence[].​checklistItemIdrequiredstring (uuid)nullable
reviewPoints[].​messages[].​evidence[].​reviewPointIdrequiredstring (uuid)nullable
reviewPoints[].​messages[].​evidence[].​reviewPointMessageIdrequiredstring (uuid)nullable
reviewPoints[].​messages[].​evidence[].​fileNamerequiredstring
reviewPoints[].​messages[].​evidence[].​contentTyperequiredstring
reviewPoints[].​messages[].​evidence[].​sizeBytesrequiredinteger

at least 0

reviewPoints[].​messages[].​evidence[].​statusrequiredstring (EvidenceStatus)

pending_upload until POST …/evidence/{evidenceId}/confirm checks the stored file; then pending_scan (malware scan) and available. Only available files can be downloaded or read by Tolvi AI. rejected: the file failed the checks or the scan found malware (see rejectedReason); it can never be downloaded.

One of: pending_upload, pending_scan, available, rejected

reviewPoints[].​messages[].​evidence[].​rejectedReasonrequiredstringnullable

Why a rejected file was rejected, e.g. "malware detected"; null otherwise.

reviewPoints[].​messages[].​evidence[].​uploadedByrequiredstring (uuid)nullable
reviewPoints[].​messages[].​evidence[].​createdAtrequiredstring (date-time)
evidencerequiredarray of Evidence
evidence[].​idrequiredstring (uuid)
evidence[].​sectionCoderequiredstringnullable
evidence[].​checklistItemIdrequiredstring (uuid)nullable
evidence[].​reviewPointIdrequiredstring (uuid)nullable
evidence[].​reviewPointMessageIdrequiredstring (uuid)nullable
evidence[].​fileNamerequiredstring
evidence[].​contentTyperequiredstring
evidence[].​sizeBytesrequiredinteger

at least 0

evidence[].​statusrequiredstring (EvidenceStatus)

pending_upload until POST …/evidence/{evidenceId}/confirm checks the stored file; then pending_scan (malware scan) and available. Only available files can be downloaded or read by Tolvi AI. rejected: the file failed the checks or the scan found malware (see rejectedReason); it can never be downloaded.

One of: pending_upload, pending_scan, available, rejected

evidence[].​rejectedReasonrequiredstringnullable

Why a rejected file was rejected, e.g. "malware detected"; null otherwise.

evidence[].​uploadedByrequiredstring (uuid)nullable
evidence[].​createdAtrequiredstring (date-time)

Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 429 Too many requests, as problem details (application/problem+json).

Remove your own sign-off from a section

POST/api/v1/engagements/{id}/sections/{code}/unsign

Scopes
engagements:write and engagements:read

Later sign-offs are removed with it (the section detail’s signOff.unsignRemoves lists them). Refused (409) while the file is signed off at every stage: reopen it for re-approval first. Part of the working_papers product: the firm must have it and you must have access to it.

Parameters

Parameters for POST /api/v1/engagements/{id}/sections/{code}/unsign
NameInTypeDescription
idrequiredpathstring (uuid)

Engagement id.

coderequiredpathstring

Section code (W/P ref), e.g. C.

One of: A, B, C, D, E, F, G, H, I, J, K, L, M, T, X, Z

Responses

200 OK, application/json

Body: object (SectionDetail).

The fields are as shown above.

Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 429 Too many requests, as problem details (application/problem+json).

Get the engagement workflow and its event history

GET/api/v1/engagements/{id}/workflow

Scopes
engagements:read

Part of the working_papers product: the firm must have it and you must have access to it.

Parameters

Parameters for GET /api/v1/engagements/{id}/workflow
NameInTypeDescription
idrequiredpathstring (uuid)

Engagement id.

Responses

200 OK, application/json

Body: object (WorkflowHistory).

200 OK response for GET /api/v1/engagements/{id}/workflow
FieldTypeDescription
workflowrequiredobject (EngagementWorkflow)
workflow.​templateIdrequiredstring
workflow.​templateNamerequiredstring
workflow.​statusrequiredstring (EngagementStatus)

One of: not_started, in_progress, submitted, returned, complete

workflow.​workflowStatusrequiredstring (WorkflowStatus)

One of: in_progress, submitted, returned, reopened, approved

workflow.​currentStageIdrequiredstring
workflow.​currentStageNamerequiredstring
workflow.​currentStageIndexrequiredinteger

at least 0

workflow.​stagesrequiredarray of WorkflowStage
workflow.​stages[].​idrequiredstring
workflow.​stages[].​namerequiredstring
workflow.​stages[].​staterequiredstring (TimelineStepState)

One of: done, now, todo

workflow.​stages[].​signedByrequiredstring (uuid)nullable
workflow.​stages[].​signedAtrequiredstring (date-time)nullable
workflow.​stages[].​assigneeIdrequiredstring (uuid)nullable

Who the engagement team assigns to this stage (preparer, reviewer, manager or partner), or null when nobody is.

workflow.​stages[].​sentBackByrequiredstring (uuid)nullable

While the workflow is returned: who sent it back from this stage.

workflow.​stages[].​sentBackAtrequiredstring (date-time)nullable

While the workflow is returned: when it was sent back from this stage.

workflow.​roundrequiredinteger

Amendment round (each return or reopen starts a new one).

at least 1

workflow.​returnCountrequiredinteger

at least 0

workflow.​reopenCountrequiredinteger

at least 0

workflow.​changedAfterApprovalrequiredboolean
workflow.​returnTargetsrequiredarray of string

Stages a return can go back to.

workflow.​actionsrequiredobject (EngagementActions)

The engagement-level actions, checked for the caller.

workflow.​actions.​submitrequiredobject (GuardResult)

Whether the caller can take an action now, and every reason not.

workflow.​actions.​submit.​allowedrequiredboolean
workflow.​actions.​submit.​reasonsrequiredarray of string
workflow.​actions.​submit.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

workflow.​actions.​approverequiredobject (GuardResult)

Whether the caller can take an action now, and every reason not.

workflow.​actions.​approve.​allowedrequiredboolean
workflow.​actions.​approve.​reasonsrequiredarray of string
workflow.​actions.​approve.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

workflow.​actions.​returnrequiredobject (GuardResult)

Whether the caller can take an action now, and every reason not.

workflow.​actions.​return.​allowedrequiredboolean
workflow.​actions.​return.​reasonsrequiredarray of string
workflow.​actions.​return.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

workflow.​actions.​reopenrequiredobject (GuardResult)

Whether the caller can take an action now, and every reason not.

workflow.​actions.​reopen.​allowedrequiredboolean
workflow.​actions.​reopen.​reasonsrequiredarray of string
workflow.​actions.​reopen.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

eventsrequiredarray of WorkflowEvent
events[].​idrequiredstring (uuid)
events[].​subjectrequiredstring

"engagement" or a section code.

events[].​typerequiredstring
events[].​stageIdrequiredstring
events[].​actorIdrequiredstring (uuid)nullable
events[].​atrequiredstring (date-time)
events[].​fromStatusrequiredstring
events[].​toStatusrequiredstring
events[].​roundrequiredinteger
events[].​openPointsrequiredinteger
events[].​fingerprintrequiredstringnullable
events[].​notestringnullable

The note given with a submission or approval.

events[].​declarationobject (ApprovalDeclaration)nullable

The declaration given with an approval.

events[].​declaration.​initialsrequiredstring

The approver’s initials, typed as a signature.

1 to 10 characters

events[].​declaration.​statementrequiredstring

What they declared, e.g. "I have reviewed the file and approve the accounts for issue to the client."

1 to 500 characters

Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 429 Too many requests, as problem details (application/problem+json).

Submit the engagement for review

POST/api/v1/engagements/{id}/workflow/submit

Scopes
engagements:write and engagements:read

Every section prepared and unchanged, no unanswered review points. Optionally name who takes the next stage (reviewerId, saved on the team) and leave them a note. Not available through MCP. Part of the working_papers product: the firm must have it and you must have access to it.

Parameters

Parameters for POST /api/v1/engagements/{id}/workflow/submit
NameInTypeDescription
idrequiredpathstring (uuid)

Engagement id.

Request body

Optional. application/json: object (SubmitEngagement).

Optional: name who reviews next and leave them a note.

Request body for POST /api/v1/engagements/{id}/workflow/submit
FieldTypeDescription
reviewerIdstring (uuid)

The person for the next stage (reviewer, manager or partner by the stage’s role). Saved on the engagement team, replacing whoever was there, and told about the submission. Must be a member of the firm.

notestring

A cover note for the reviewer: kept with the submission in the history and sent with the notification.

up to 2000 characters

Responses

200 OK, application/json

Body: object (EngagementWorkflow).

200 OK response for POST /api/v1/engagements/{id}/workflow/submit
FieldTypeDescription
templateIdrequiredstring
templateNamerequiredstring
statusrequiredstring (EngagementStatus)

One of: not_started, in_progress, submitted, returned, complete

workflowStatusrequiredstring (WorkflowStatus)

One of: in_progress, submitted, returned, reopened, approved

currentStageIdrequiredstring
currentStageNamerequiredstring
currentStageIndexrequiredinteger

at least 0

stagesrequiredarray of WorkflowStage
stages[].​idrequiredstring
stages[].​namerequiredstring
stages[].​staterequiredstring (TimelineStepState)

One of: done, now, todo

stages[].​signedByrequiredstring (uuid)nullable
stages[].​signedAtrequiredstring (date-time)nullable
stages[].​assigneeIdrequiredstring (uuid)nullable

Who the engagement team assigns to this stage (preparer, reviewer, manager or partner), or null when nobody is.

stages[].​sentBackByrequiredstring (uuid)nullable

While the workflow is returned: who sent it back from this stage.

stages[].​sentBackAtrequiredstring (date-time)nullable

While the workflow is returned: when it was sent back from this stage.

roundrequiredinteger

Amendment round (each return or reopen starts a new one).

at least 1

returnCountrequiredinteger

at least 0

reopenCountrequiredinteger

at least 0

changedAfterApprovalrequiredboolean
returnTargetsrequiredarray of string

Stages a return can go back to.

actionsrequiredobject (EngagementActions)

The engagement-level actions, checked for the caller.

actions.​submitrequiredobject (GuardResult)

Whether the caller can take an action now, and every reason not.

actions.​submit.​allowedrequiredboolean
actions.​submit.​reasonsrequiredarray of string
actions.​submit.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

actions.​approverequiredobject (GuardResult)

Whether the caller can take an action now, and every reason not.

actions.​approve.​allowedrequiredboolean
actions.​approve.​reasonsrequiredarray of string
actions.​approve.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

actions.​returnrequiredobject (GuardResult)

Whether the caller can take an action now, and every reason not.

actions.​return.​allowedrequiredboolean
actions.​return.​reasonsrequiredarray of string
actions.​return.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

actions.​reopenrequiredobject (GuardResult)

Whether the caller can take an action now, and every reason not.

actions.​reopen.​allowedrequiredboolean
actions.​reopen.​reasonsrequiredarray of string
actions.​reopen.​codesrequiredarray of string

Machine-readable reason codes from @tolvi/workflow.

Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 429 Too many requests, as problem details (application/problem+json).

Approve the engagement at its current stage

POST/api/v1/engagements/{id}/workflow/approve

Scopes
review:write and engagements:read
Role
Reviewer or above

Segregation of duties and every workflow guard apply. Optionally name who takes the next stage (reviewerId, saved on the team as on submit, and told). An optional note and declaration (with the approver’s typed initials) are kept with the approval in the history and the audit trail. Not available through MCP.

Needs the Reviewer role or above. Part of the working_papers product: the firm must have it and you must have access to it.

Parameters

Parameters for POST /api/v1/engagements/{id}/workflow/approve
NameInTypeDescription
idrequiredpathstring (uuid)

Engagement id.

Request body

Optional. application/json: object (ApproveEngagement).

Request body for POST /api/v1/engagements/{id}/workflow/approve
FieldTypeDescription
reviewerIdstring (uuid)

The person for the next stage (manager or partner by the stage’s role), as on submit. Saved on the engagement team, replacing whoever was there, and told about the approval. Must be a member of the firm. Ignored at the last stage.

notestring

A note kept with the approval in the history and sent with the notification.

up to 2000 characters

declarationobject (ApprovalDeclaration)

The approver’s declaration with their typed initials (the web app asks for one at partner sign-off).

declaration.​initialsrequiredstring

The approver’s initials, typed as a signature.

1 to 10 characters

declaration.​statementrequiredstring

What they declared, e.g. "I have reviewed the file and approve the accounts for issue to the client."

1 to 500 characters

Responses

200 OK, application/json

Body: object (EngagementWorkflow).

The fields are as shown above.

Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 429 Too many requests, as problem details (application/problem+json).

Return the engagement to an earlier stage

POST/api/v1/engagements/{id}/workflow/return

Scopes
review:write and engagements:read
Role
Reviewer or above

Needs at least one unanswered review point; starts a new amendment round. An optional note for the preparer is kept in the history and sent with the notification.

Needs the Reviewer role or above. Part of the working_papers product: the firm must have it and you must have access to it.

Parameters

Parameters for POST /api/v1/engagements/{id}/workflow/return
NameInTypeDescription
idrequiredpathstring (uuid)

Engagement id.

Request body

Required. application/json: object (ReturnEngagement).

Request body for POST /api/v1/engagements/{id}/workflow/return
FieldTypeDescription
toStageIdstring

Default: the first stage.

reviewPointIdsarray of string (uuid)

Default: every unanswered review point.

notestring

A note for the preparer: kept with the return in the history and sent with the notification.

up to 2000 characters

Responses

200 OK, application/json

Body: object (EngagementWorkflow).

The fields are as shown above.

Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 429 Too many requests, as problem details (application/problem+json).

Reopen an approved engagement whose content changed

POST/api/v1/engagements/{id}/workflow/reopen

Scopes
review:write and engagements:read
Role
Reviewer or above

Approvals from the target stage on go stale.

Needs the Reviewer role or above. Part of the working_papers product: the firm must have it and you must have access to it.

Parameters

Parameters for POST /api/v1/engagements/{id}/workflow/reopen
NameInTypeDescription
idrequiredpathstring (uuid)

Engagement id.

Request body

Required. application/json: object (ReopenEngagement).

Request body for POST /api/v1/engagements/{id}/workflow/reopen
FieldTypeDescription
toStageIdstring

Default: the first review stage.

Responses

200 OK, application/json

Body: object (EngagementWorkflow).

The fields are as shown above.

Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 429 Too many requests, as problem details (application/problem+json).