tax_workpaper.xlsx for a business return, or a generated
bundle (PDF, leadsheets, forms, checklist, source documents) assembled from the
binder. The workpaper API covers three operations:
- Save an edited xlsx workbook back to the client’s git-backed file store
(
saveTaxWorkpaperXlsx). - Generate a bundled workpaper download rendered server-side from the
binder (
generateWorkpaperBundlepluscheckWorkpaperGenerationStatus). - Translate a return into a workpaper via a background task
(
triggerWorkpaperTranslate), and list the templates available for a given return type (workpaperTemplates).
me query resolved
as a WorkspaceUser (for the Workspace.workpaperTemplates and
Workspace.checkWorkpaperGenerationStatus reads) or are top-level mutations.
They require a workspaceToken (see Authentication).
All requests go to:
There is no top-level
workpapers query. The two read fields
(workpaperTemplates and checkWorkpaperGenerationStatus) live on the
Workspace type, so you read them through
me { ... on WorkspaceUser { workspace { ... } } }. The workspaceToken
already identifies the workspace.Save a tax workpaper xlsx
saveTaxWorkpaperXlsx commits an edited xlsx workbook back to the client’s
git-backed file store as tax_workpaper.xlsx. The workbook is sent as a
base64-encoded .xlsx payload. The mutation returns a ClientCommit describing
the new git commit.
Input: SaveTaxWorkpaperXlsxInput
The client whose
tax_workpaper.xlsx you are saving.The full xlsx workbook, base64-encoded. The server writes this verbatim to
tax_workpaper.xlsx in the client’s file store.Optional. A short summary of the edit (for example the cell coordinate that
changed). Becomes part of the git commit message.
Returns: ClientCommit!
A ClientCommit is the git commit the AI service recorded for the write. The
same type is returned by other git-backed writes (updateSubDocumentField,
revertClientCommit).
The full commit SHA.
The abbreviated commit SHA.
Who made the commit.
kind is USER for a workspace user, AGENT for an
automated agent, or SYSTEM for a system-level write.ISO timestamp when the commit was recorded.
The commit message (includes the
summary you passed in, when supplied).Parent commit SHAs. Empty for the initial commit.
Files changed by this commit. For
saveTaxWorkpaperXlsx this is the
tax_workpaper.xlsx row.The task ID associated with the write, when the commit was produced by a
background task.
null for direct user edits.The run ID associated with the write, when relevant.
null for direct user
edits.Generate a workpaper bundle
generateWorkpaperBundle queues a server-side render that assembles a bundled
workpaper download (PDF, leadsheets, forms, checklist, source documents) from
the binder. It returns a WorkpaperRenderJob carrying the
workflowExecutionId you poll with
checkWorkpaperGenerationStatus.
The bundle’s table of contents and section order is driven by orderedGroups:
a list of buckets, each containing categories, each containing the subdocument
IDs to include. This mirrors the binder sidebar outline.
Input: GenerateWorkpaperBundleInput
The client’s binder ID (read it from
me { ... on WorkspaceUser { workspace { clients(filters: { ids: [$clientId] }) { binder { id } } } } },
see Binder).The bucket-to-category-to-subdocument outline that drives the bundle’s section
order and PDF TOC. Each entry has a
bucketLabel and a list of categories;
each category has a category label and the subdocumentIds to include.Optional. The client’s display name, used to set the download filename (for
example
Filed workpaper - Jane Taxpayer.pdf).When
true, render a combined PDF in the bundle.When
true, include the client’s leadsheets in the bundle, exported in the
format set by leadsheetsFormat.The leadsheets export format:
EXCEL or CSV (see
Leadsheets and review). Only meaningful
when includeLeadsheets is true.When
true, include the client’s forms in the bundle.When
true, include the binder checklist in the bundle.When
true, include the binder’s source documents in the bundle.Returns: WorkpaperRenderJob!
The render job’s workflow execution ID. Pass it to
checkWorkpaperGenerationStatus to poll for
completion and the download URL.The render status:
RUNNING while the bundle is being rendered, COMPLETED
when the download is ready, or FAILED if the render errored. Immediately after
generateWorkpaperBundle returns, this is RUNNING.Check a bundle render status
checkWorkpaperGenerationStatus is a Workspace field that returns the current
state of a workpaper render job. Poll it with the workflowExecutionId returned
by generateWorkpaperBundle until status is
COMPLETED (then read downloadUrl.url) or FAILED (then read errorMessage).
Arguments
The render job’s workflow execution ID (from
generateWorkpaperBundle.workflowExecutionId).Returns: WorkpaperRender!
The render job’s workflow execution ID.
RUNNING, COMPLETED, or FAILED (see
WorkpaperRenderStatus).The signed download URL for the rendered bundle. Present only when
status is
COMPLETED. SignedPath is { filePath, url }; the url is the one you fetch
(or hand to the browser) to download the bundle. null while the render is
running or if it failed.ISO timestamp when the render completed.
null while RUNNING or FAILED.The error message when
status is FAILED. null otherwise.This poll pattern is distinct from the Task polling pattern.
Workpaper renders use a
workflowExecutionId and the WorkpaperRenderStatus
enum (RUNNING, COMPLETED, FAILED) on a WorkpaperRender shape returned by
Workspace.checkWorkpaperGenerationStatus. They do not use the Task /
TaskStatus type, the clients.tasks list, or TaskResult unions. Do not
conflate the two: a workpaper render is not a Task and cannot be read through
tasks(type:, status:).Trigger a workpaper translation
triggerWorkpaperTranslate kicks off a background translation task that
produces a workpaper for a client. It returns a TriggerTaskResult carrying the
taskId you poll through the standard Task polling pattern
(unlike the bundle render above, the translate
flow is a real Task).
As of this writing,
triggerWorkpaperTranslate and
workpaperTemplates are not yet wired into the web
app’s surface code (they exist only in the generated GraphQL types). They are
documented here from the live schema for completeness. If you build against
them, verify the behavior end to end against your own workspace before relying
on a specific shape.Input: TriggerWorkpaperTranslateInput
The client to translate a workpaper for.
The return form to target:
F1040, F1041, F1065, F1120, F1120S, or
F990 (see clients).Optional. The task type that produced the source data, when you are translating
from the output of a prior run.
Optional. The run ID of the source run, when relevant.
Optional. A specific template to apply. List the available templates for a
return type with
workpaperTemplates.Returns: TriggerTaskResult!
List workpaper templates
workpaperTemplates is a Workspace field that returns the list of workpaper
template names available for a given return type. Pass a template name as
templateName to triggerWorkpaperTranslate.
Arguments
The return form to list templates for:
F1040, F1041, F1065, F1120,
F1120S, or F990.Returns: [String!]!
A list of template name strings. Pass any one of them as templateName to
triggerWorkpaperTranslate.