Tasks
Namespace tasks plus the tasks blueprint (actionstools_app/tasks/), table
em_actions_tasks (_staging outside production), key (instance_id, uuid). All routes require a
JWT.
Routes
| Method | Path | Behaviour |
|---|---|---|
GET |
|
With |
POST |
|
Create. Required body fields: |
PATCH |
|
Bulk update: |
DELETE |
|
Bulk soft delete: |
GET |
|
Single task ( |
PUT |
|
Update (same required fields as create). |
DELETE |
|
Soft delete. |
POST |
|
|
POST |
|
|
GET |
|
Change history of a task, proxied from the event logger’s |
Creating a task
{
"title": "Collect missing bank statement",
"body": "<p>Statement for March is missing</p>",
"status": "new",
"priority": "high",
"assignee_type": "group",
"assignee_uuid": "CUST_SERVICE",
"assignee_name": "Customer Service",
"created_by_name": "agent@payability.com",
"dueDate": "2026-11-02T17:00:00Z",
"supplier_name": "ACME Supplies LLC",
"task_url_template": "https%3A%2F%2Finternal.payability.com%2F%23%2Ftasks%3FtaskUuid%3D%7B%7D",
"_mode": "sync"
}
-
item_numberis assigned from the global counterem_actions_counters(atomic increment). -
dueDatemay be a timestamp or any date stringdateutilparses; it is stored as a Unix timestamp.due_dateanddueDateare kept in sync (sanitize_task_for_iav2). -
priority_intis derived frompriority(low10 …critical40) for sorting. -
task_url_template(URL-encoded,{}replaced by the task uuid) is used in notifications. Production defaults tohttps://internal.payability.com/#/tasks?taskUuid={}. -
Duplicate guard: if one of the last three tasks created on the instance has the same body, title, target, assignee, owner, status, type and priority, that task is returned instead of a new one. This absorbs double clicks and client retries.
"_mode": "async" in the body queues the whole creation on the Worker and returns immediately
with meta.message = "object has been successfully queued to create" and no data.
|
Async mode calls |
Updates and notifications
perform_update diffs the new fields against the stored task:
-
Changing
item_number,instance_id,uuid,created_at,created_by_name,owner_uuid,type,target_type,bodyortitlerequires the caller to be the owner or aCRM_ADMIN(checked against the Payability internal API). -
Setting
statustodonereassigns the task to its creator. -
If the caller is logged in,
send_events_and_notificationsis queued: two event-logger entries (task and supplier) and, whentask_url_templatewas sent, notifications to the assignee, the owner and followers. See Slack and Messaging (email).