Filing queue
5 operations in the Tolvi API, version 1. Paths are relative to https://api.tolvi.co.uk. Every amount is integer pence.
What could be filed
GET/api/v1/filing-batches/ready
- Role
- Manager or above
- Access
- A signed-in Tolvi session only, never an API token.
Self Assessment returns, Company Tax Returns and Companies House accounts approved in your products. Where a product’s filing is off, the row says it opens soon. Never available to API keys or connected assistants.
Needs the Manager role or above.
Responses
200 OK, application/json
Body: object (FilingReadyList).
| Field | Type | Description |
|---|---|---|
itemsrequired | array of FilingReadyItem | |
items[].productrequired | string (FilingProduct) | One of: |
items[].returnIdrequired | string (uuid) | |
items[].clientIdrequired | string (uuid) | |
items[].clientNamerequired | string | |
items[].labelrequired | string | |
items[].figuresHashrequired | string | |
items[].canFilerequired | boolean | Whether this can go in a batch today. |
items[].reasonrequired | stringnullable | |
items[].filingOpenrequired | boolean | |
items[].opensSoonMessagerequired | stringnullable | Shown instead of a way to file while the switch is off. |
productsrequired | array of FilingProductState | |
products[].productrequired | string (FilingProduct) | One of: |
products[].filingOpenrequired | boolean | |
products[].opensSoonMessagerequired | stringnullable | |
declarationsrequired | object | The declarations a person accepts to start a batch, by product. |
Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 429 Too many requests, as problem details (application/problem+json).
List batches
GET/api/v1/filing-batches
- Role
- Manager or above
- Access
- A signed-in Tolvi session only, never an API token.
Never available to API keys or connected assistants.
Needs the Manager role or above.
Responses
200 OK, application/json
Body: object (FilingBatchList).
| Field | Type | Description |
|---|---|---|
itemsrequired | array of FilingBatch | |
items[].idrequired | string (uuid) | |
items[].statusrequired | string (FilingBatchStatus) | One of: |
items[].createdAtrequired | string (date-time) | |
items[].startedAtrequired | string (date-time)nullable | |
items[].finishedAtrequired | string (date-time)nullable | |
items[].itemsrequired | array of FilingBatchItem | |
items[].items[].idrequired | string (uuid) | |
items[].items[].positionrequired | integer | |
items[].items[].productrequired | string (FilingProduct) | One of: |
items[].items[].returnIdrequired | string (uuid) | |
items[].items[].clientNamerequired | string | |
items[].items[].labelrequired | string | |
items[].items[].statusrequired | string (FilingItemStatus) | One of: |
items[].items[].messagerequired | stringnullable | In plain words. |
items[].items[].finishedAtrequired | string (date-time)nullable |
Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 429 Too many requests, as problem details (application/problem+json).
Build a batch
POST/api/v1/filing-batches
- Role
- Manager or above
- Access
- A signed-in Tolvi session only, never an API token.
Nothing is sent. Answers 503 while batch filing or any chosen product’s filing is off. Off by default. It has only run against a fake: HMRC has not reviewed or accepted any of it. Never available to API keys or connected assistants.
Needs the Manager role or above.
Request body
Required. application/json: object (CreateFilingBatch).
| Field | Type | Description |
|---|---|---|
itemsrequired | array of FilingBatchNewItem | |
items[].productrequired | string (FilingProduct) | One of: |
items[].returnIdrequired | string (uuid) | |
items[].figuresHashrequired | string | The hash you reviewed. A change since is refused. |
items[].accountIdrequired | string (uuid) | The HMRC account or Companies House presenter to file with. |
items[].variant | string (FilingVariant) | One of: |
Responses
200 OK, application/json
Body: object (FilingBatch).
| Field | Type | Description |
|---|---|---|
idrequired | string (uuid) | |
statusrequired | string (FilingBatchStatus) | One of: |
createdAtrequired | string (date-time) | |
startedAtrequired | string (date-time)nullable | |
finishedAtrequired | string (date-time)nullable | |
itemsrequired | array of FilingBatchItem | |
items[].idrequired | string (uuid) | |
items[].positionrequired | integer | |
items[].productrequired | string (FilingProduct) | One of: |
items[].returnIdrequired | string (uuid) | |
items[].clientNamerequired | string | |
items[].labelrequired | string | |
items[].statusrequired | string (FilingItemStatus) | One of: |
items[].messagerequired | stringnullable | In plain words. |
items[].finishedAtrequired | string (date-time)nullable |
Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 429 Too many requests, as problem details (application/problem+json).
A batch and each return’s status
GET/api/v1/filing-batches/{id}
- Role
- Manager or above
- Access
- A signed-in Tolvi session only, never an API token.
Never available to API keys or connected assistants.
Needs the Manager role or above.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) |
Responses
Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 429 Too many requests, as problem details (application/problem+json).
Start a batch
POST/api/v1/filing-batches/{id}/start
- Role
- Manager or above
- Access
- A signed-in Tolvi session only, never an API token.
- Retries
- Send an
Idempotency-Keyto make retries safe.
A manager or partner with a second factor. Each return goes through its own product’s filing, one at a time, with every control that has. A refusal stops that return and not the rest. Off by default. It has only run against a fake: HMRC has not reviewed or accepted any of it. Never available to API keys or connected assistants.
Needs the Manager role or above.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | |
Idempotency-Key | header | string | A unique key (1-255 visible characters) to make retries safe. Replayed for 24 hours. 1 to 255 characters |
Request body
Required. application/json: object (StartFilingBatch).
| Field | Type | Description |
|---|---|---|
declarations | object | The declaration accepted for each product in the batch: |
companyCodes | object | Companies House company authentication codes by item id. Used once, never stored. |
Responses
Errors: 400 Bad request, 401 Unauthorised, 403 Forbidden, 404 Not found, 409 Conflict, 422 Unprocessable content, 429 Too many requests, as problem details (application/problem+json).