Batch
A Batch groups multiple Documents together for coordinated sending. Batches can enforce signing order across documents and track aggregate progress. They belong to a Group and are created by a User.
There are two batch types: BATCH (multi-document sends) and BULK (bulk sends to many recipients).
Implements: Node
Fields
| Field | Type | Description |
|---|---|---|
id | ID! | Unique identifier |
name | String | Title of the batch |
enforceOrder | Boolean | Whether documents must be sent in a specific order |
type | BatchType | BULK or BATCH |
creatorName | String | Name of the user who initiated the batch |
assigneeName | String | Name of the user who controls the batch |
requestId | ID | ID of the async task that created this batch |
status | String | Net status of documents in the batch |
progress | BatchStatus | Progress status: CREATING, EMAILING, COMPLETE, or UNKNOWN |
documentCount | Int | Total documents in the batch |
submittedCount | Int | Documents originally submitted |
inProgressCount | Int | Documents currently in progress |
completedCount | Int | Documents signed |
rejectedCount | Int | Documents rejected |
awaitingActionCount | Int | Documents needing admin action |
bouncedCount | Int | Documents with bounced emails |
created | AWSDateTime | When the batch was created |
modified | AWSDateTime | When the batch was last modified |
Relationships
| Field | Type | Description |
|---|---|---|
group | Group | The group this batch belongs to |
creator | User | The user who created the batch (full object — avoid on lists) |
Connections
documentConnection
Documents within this batch. Supports cursor-based pagination.
| Argument | Type | Description |
|---|---|---|
first | Int | Number of items |
after | ID | Pagination cursor |
Query
query GetBatch($id: ID!) {
batch(id: $id) {
id
name
type
progress
documentCount
completedCount
}
}
Batches are also accessed via Group.batchConnection — see Group.
Example
A batch detail query with documents and recipients (based on the Legalesign Console app):
query GetBatchDetails {
batch(id: "YmF0Y2gxMjM0NTY3OC1hYmNkLTEyMzQtZWZnaC0wMTIzNDU2Nzg5YWI=") {
id
name
type
enforceOrder
status
progress
submittedCount
documentCount
inProgressCount
completedCount
rejectedCount
awaitingActionCount
bouncedCount
created
modified
creator {
id
name
email
}
documentConnection {
documents {
id
name
status
senderName
senderEmail
batchOrder
sourceTemplateId
created
modified
recipients {
id
email
role
roleType
status
firstName
lastName
sentDateTime
signedDateTime
emailProblem
recipientOrder
}
}
}
}
}
Related
- Document — documents within a batch
- Group — the group this batch belongs to
- How Pagination Works — paginating batch lists
- Query Examples — basic batch query
- Complex Query Examples — batch with nested data
- Mutation Examples — batch and bulk send mutations