createClient and
addClientDocuments return a
taskId; you use the tasks API to follow that work to completion.
Tasks are reached through the me query as a WorkspaceUser, so
authenticate with a workspaceToken (see
Authentication). All requests go to:
The Task type
The task’s unique identifier. This is the value returned as
taskId by the
mutations that start work.The individual stages of the task, each with its own status. Use these for
granular progress while a task is
RUNNING.The typed result of the task, resolved by
type. See Task
result.Supporting types
The stage, for example
CONVERT_DOCUMENTS, CLASSIFY_SUBDOCS,
EXTRACT_SUBDOCS, or EXPORT_AND_INDEX. The full set of stages depends on the
parent task’s type.A machine-readable code when a data-entry stage fails, for example
INVALID_CREDENTIALS, CLIENT_NOT_FOUND, or TIMEOUT. null otherwise.List tasks
Readworkspace.tasks to list tasks across the whole workspace. Filter, page,
and sort with the arguments below.
Arguments
Check a single task’s status
There is notask(id:) query. To follow one task (for example the taskId
returned by createClient or addClientDocuments), list the tasks for its
client with client.tasks and read the entry whose id matches. Because a
client’s task list is small and typed, this is the reliable way to poll a
specific task.
Client.tasks accepts these arguments:
Task result
Every task carries a typedresult. TaskResult is a union whose concrete type
is determined by the task’s type. Select fields with an inline fragment on the
member you expect, and read __typename to know which one you got.
Returned for
TAX_PREP tasks: a summary plus document/form counts and the
individual review items.taxYear, returnType, and summary, you can select
those on each fragment and branch on __typename: