Tasks
Tasks represent workflow items that can be assigned to users within a client account. Tasks support hierarchical organization through subtasks and integrate with the chat system for communication.
Endpoints
List Tasks
GET /api/v2/tasks
Retrieves a paginated list of tasks.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| client_account_id | integer | Yes | ID of the client account. Missing or not accessible returns 403 task.access_denied — this endpoint never falls back to all your accounts |
| assigned_to_id | integer | No | Filter by assigned user ID |
| parent_task_id | integer | No | Filter by parent task ID (use null for top-level tasks) |
| status | string | No | Filter by task status (PENDING, IN_PROGRESS, COMPLETED, CANCELLED) |
| task_type | string | No | Filter by task type (PLANNING, EXECUTION) |
| relation_type | string | No | Filter by related entity type |
| relation_id | integer | No | Filter by related entity ID |
| with | string | No | Include relations: subtasks, parent_task. Nest with dots (subtasks.subtasks) |
| page | integer | No | Page number (default: 1) |
| per_page | integer | No | Items per page (default: 100) |
Response
{
"data": [
{
"id": 1,
"title": "Review Q1 journal entries",
"description": "Check all journal entries for Q1 2024",
"status": "PENDING",
"task_type": "EXECUTION",
"completed_at": null,
"completion_summary": null,
"client_account_id": 7,
"assigned_to_id": 7,
"provider_client_account_id": null,
"parent_task_id": null,
"relation_type": null,
"relation_id": null,
"thread_id": 42,
"created_at": "2024-03-15T10:00:00Z",
"updated_at": "2024-03-15T10:00:00Z",
"created_by_id": 7,
"updated_by_id": null
}
],
"meta": {
"page": 1,
"pages": 1,
"per_page": 100,
"records": 1
}
}
Create Task
POST /api/v2/tasks
Creates a new task.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Task title |
| description | string | No | Detailed task description |
| status | string | No | Initial status (PENDING, IN_PROGRESS, COMPLETED, CANCELLED) |
| task_type | string | No | Type of task (PLANNING, EXECUTION) |
| completion_summary | string | No | Summary when completed |
| client_account_id | integer | Yes | The client account ID |
| assigned_to_id | integer | No | User ID to assign the task to |
| provider_client_account_id | integer | No | Provider client account ID |
| parent_task_id | integer | No | Parent task ID for creating subtasks |
| relation_type | string | No | Type of related entity |
| relation_id | integer | No | ID of related entity |
Response
Returns the created task with status 201 Created.
Get Task
GET /api/v2/tasks/{id}
Retrieves a specific task by ID.
Response
Returns a single task object.
Update Task
PUT /api/v2/tasks/{id}
Updates an existing task.
Request Body
Same fields as Create Task. All fields are optional for updates — only the fields present in the body are applied.
client_account_id may be sent, but only with the task’s current value: moving a task to another client account is rejected with task.client_account_immutable. provider_client_account_id, assigned_to_id and relation_type/relation_id are re-checked against the task’s client account only when they change, so editing an old task whose assignee has since lost access still works.
Response
Returns the updated task.
Delete Task
DELETE /api/v2/tasks/{id}
Deletes a task and its associated chat channel.
Response
Returns 204 No Content on success.
Attributes
| Attribute | Type | Description |
|---|---|---|
| id | integer | Unique identifier (read-only) |
| title | string | Task title |
| description | string | Detailed task description |
| status | string | Task status: PENDING, IN_PROGRESS, COMPLETED, or CANCELLED |
| task_type | string | Type of task: PLANNING or EXECUTION |
| completed_at | datetime | When the task was completed (read-only) |
| completion_summary | string | Summary of completion |
| client_account_id | integer | ID of the client account |
| assigned_to_id | integer | ID of the assigned user |
| provider_client_account_id | integer | ID of provider client account |
| parent_task_id | integer | ID of the parent task |
| relation_type | string | Type of related entity. Supported: CLIENT_ACCOUNT, any commercial-document type (ARINV, APINV, RECPT, …), asset, bankacc, PAYMT (bank transaction), businesspartner, CHAT_THREAD, department, JE (journal entry), project, QUESTION, tag, TASK, VOUCHER. Any other value is rejected |
| relation_id | integer | ID of related entity. Must name a row in the task’s client account |
| thread_id | integer | Associated chat thread ID (read-only) |
| created_at | datetime | Creation timestamp (read-only) |
| updated_at | datetime | Last update timestamp (read-only) |
| created_by_id | integer | ID of the creating user (read-only) |
| updated_by_id | integer | ID of the last updating user (read-only) |
Relationships
| Relationship | Type | Description |
|---|---|---|
| subtasks | Task[] | Child tasks |
| parent_task | Task | Parent task |
Neither is included by default — request them with ?with=subtasks or ?with=parent_task. parent_task is omitted from the response when the task has no parent.
Business Rules
- Deleting a task also deletes its associated chat channel
- Tasks can be organized hierarchically using
parent_task_id; a parent task must belong to the same client account - Each task automatically gets a chat thread for discussion
- A task’s
client_account_idis fixed once the task exists - Every id a task carries must stay inside its client account: the provider firm must have access to it (through its own account or an active contract), the assignee must be able to access it, and
relation_idmust name a row owned by it
Error Responses
Errors use the standard v2 envelope ({"error": {"code", "message", "request_id"}}) — see Error Handling.
| Status | Code | Description |
|---|---|---|
| 400 | common.serialization_error |
The request body is missing, or could not be deserialized into a task |
| 400 | task.client_account_immutable |
An update tried to change client_account_id |
| 400 | task.invalid_provider |
provider_client_account_id has no access to the task’s client account |
| 400 | task.invalid_assignee |
assigned_to_id has no access to the task’s client account |
| 400 | task.invalid_relation |
relation_type is not a supported type, or relation_id names a row in another client account |
| 400 | common.validation_error |
A validation rule failed: no title, or a parent_task_id that does not exist or belongs to another client account |
| 403 | task.access_denied |
client_account_id is missing or not accessible (list, create), or the task belongs to an account you cannot access |
| 404 | task.not_found |
Task not found |