Tasks replace To-dos. The routes moved from
/api/entities/:entityId/todos to /api/organizations/:organizationId/tasks, the completed flag became status, and the error codes moved from TODO_* to TASK_*.States
Sintropix sets
completedAt for you. It stamps the moment a Task first becomes completed, keeps it when you send completed again, and clears it when the Task moves back to todo or in_progress.
Assignee and due date
A Task can be assigned to one staff or client Member of its Organization. Aviewer can’t take a Task. List the Members a Task can take with GET /tasks/assignees. Assigning a User who isn’t a staff or client Member of the Organization is refused with 422 and TASK_ASSIGNEE_NOT_ASSIGNABLE_ERROR. When a Member leaves the Organization, their Tasks stay and become unassigned.
dueDate is a calendar day, YYYY-MM-DD. Lists show the nearest due date first and the Tasks with no due date last.
The assignee hears about their Tasks in the Bandeja:
- Assigning a Task to another Member sends them a
task_assignedNotification that names who assigned it. Assigning a Task to yourself, saving the same assignee again, or unassigning a Task notifies nobody. - When the due date of an assigned Task passes and the Task isn’t
completed, the assignee gets onetask_overdueNotification. Sintropix checks just after midnight in Santiago (Chile) time, so the Notification arrives on the day after the due date. If you move the due date and the new one passes too, the assignee is notified again.
Subtasks
A Task can hold subtasks (subtareas in the app), one level deep. Use them to split a piece of work into steps, such as one subtask per document you ask the client for. A subtask is an ordinary Task with a parent: it keeps its own state, assignee, due date, description, Task Links, and Notifications.- Create a subtask by sending
parentTaskIdwhen you create the Task. A Task can’t move under another parent later. - A subtask can’t hold subtasks. Naming a subtask as the parent is refused with
422andTASK_PARENT_IS_SUBTASK_ERROR. - The parent must be a Task of the same Organization. Otherwise the create is refused with
404andTASK_PARENT_NOT_FOUND_ERROR. - Deleting a Task deletes its subtasks too.
- A parent and its subtasks change state independently. Completing a parent leaves its open subtasks as they are, and completing every subtask leaves the parent as it is. Read
subtaskCountandcompletedSubtaskCountto show progress, such as “1/3”.
The board
In the app, switch Tareas from Lista to Tablero to see the Tasks as a board, with one column per state: Por hacer, En progreso, and Completadas. Todas and Mías work the same on the board. The URL keeps the view, so a reload or a shared link opens the board again.- Each card shows the title and the assignee and, when the Task has them, its due date, its subtask progress, and its related records. A subtask is its own card, in the column of its own state, with its parent’s name above its title.
- Drag a card to another column to change its state, or use the state menu on the card. A refused change shows the reason under the card. Moving a parent with open subtasks to Completadas asks you to confirm, as in the list.
- You can’t reorder cards within a column. They keep the list’s order: nearest due date first.
- Change a card’s due date or assignee on the card, delete it from the trash icon that shows on hover, and click it to open the Task’s detail panel.
Related records
A Task Link (Relación in the app) relates a Task to one record: an Invoice, a Bank Movement, or a Ledger Entry. A Task has any number of Task Links, and each record appears at most once per Task. Each Task Link names the Entity that holds its record, and that Entity must belong to the Task’s Organization. You relate records in two ways:- When you create the Task, send them in
links. - Later, add one at a time with
POST /tasks/:taskId/links, and remove one withDELETE /tasks/:taskId/links/:taskLinkId.
- Delete the Invoice or the Bank Movement.
- Unbook the Ledger Entry (its status becomes
deleted). - Cancel the Scheduled Entry (its status becomes
cancelled).
links replaces the single link a Task used to carry. The Task object no longer has entityId, invoiceId, bankMovementId, ledgerEntryId, or link, and a create sends its records in links instead of top-level ids.The Task object
The Task Link object
Each item oflinks describes one related record. kind tells you which kind of record it is, and id is the record’s id. Each kind carries the fields you need to display the record and open it in the app.
Every kind carries these fields:
Each kind adds its own fields:
GET /api/organizations/:organizationId/tasks
List the Tasks of the Organization, in every state and across every Entity. Subtasks are listed like any other Task, each with its parentTask. Pass one record filter to list only the Tasks related to that record. Pass assignee=me to keep only the Tasks assigned to you, the User of the session or of the API key.
Tasks come ordered by dueDate, nearest first, with the Tasks that have no due date last. Ties go to the oldest Task first.
Query parameters
Send at most one record filter. Sending two returns
400. A Task matches when any of its Task Links names the record. assignee combines with a record filter.
Response 200: an array of Task objects.
GET /api/organizations/:organizationId/tasks/assignees
List the staff and client Members of the Organization, the Users a Task can be assigned to. Viewers are not listed.
Response 200: an array of { userId, name, image }, where image is a photo URL or null.
POST /api/organizations/:organizationId/tasks
Create a Task. It starts in todo, unassigned, with no due date and an empty description. You supply the id, so a retried request with the same id returns 409 instead of creating a duplicate.
Body
Each item of
links names one record:
Each item sends exactly one of
invoiceId, bankMovementId, or ledgerEntryId. An item with none or several, or two items that name the same record, return 400. The items can name records of different Entities of the Organization. If one record is refused, no Task is created.
Response 201: the created Task object, including links.
PATCH /api/organizations/:organizationId/tasks/:taskId
Edit the text or description of a Task, move it to another state, assign or unassign it, or set or clear its due date. Send at least one field.
Body
Response
200: the updated Task object.
POST /api/organizations/:organizationId/tasks/:taskId/links
Relate a Task to one more record. The body is one Task Link item, as in the links of a create: the entityId of the record’s Entity and exactly one of invoiceId, bankMovementId, or ledgerEntryId.
Relating a record the Task already relates to changes nothing and returns the Task as it is.
Response 201: the Task object, with every Task Link.
DELETE /api/organizations/:organizationId/tasks/:taskId/links/:taskLinkId
Remove one relation from a Task. Read taskLinkId from the Task’s links. The Task and the record stay.
Response 200: the Task object, with its remaining Task Links.
DELETE /api/organizations/:organizationId/tasks/:taskId
Delete a Task permanently, with its subtasks and its Notifications.
Response 200: the deleted Task object.
Errors
Task domain errors carry acode and a params object in the body.

