GetAllTasks

Function to get tasks. Returns tasks that are not deleted, newest first, with search and filters

POST https://rest.crmango.com/api/GetAllTasks

Authorization

1 Sent in the request headers
Bearer varchar

Auth token (required in Authorization header)

Body data

26 Sent in the request body
task_id integer

ID of one task. Returns it with the full description, other filters are ignored

search varchar

Text searched in the task name and company name (a part is enough). More words = all must match. A number also finds the task with this ID. Best matches come first

user_id integer

Tasks where this user is the reporter OR the assignee
Reference: GetAllUsers

assignee_id integer

Assignee. 0 = tasks without an assignee
Reference: GetAllUsers

reporter_id integer

Reporter
Reference: GetAllUsers

watcher_id integer

Tasks watched by this user
Reference: GetAllUsers

company_id integer

Tasks of this company

order_id integer

Tasks linked to this order

task_type_id integer

Task type
Reference: GetAllLists

label_id integer

Tasks that have this label
Reference: GetAllLists

status integer

Task status (2 = done)
Reference: GetAllLists

priority integer

Priority (0–5)

is_done integer

1 = only done tasks, 0 = only not done tasks

is_private integer

1 = only private tasks, 0 = only public tasks

overdue integer

1 = only not done tasks after the deadline

vehicle_id integer

Tasks of this vehicle

trailer_id integer

Tasks of this trailer

driver_id integer

Tasks of this driver

recurring_task_id integer

Tasks created from this recurring task template

date_type varchar

Which date date_from and date_to filter: creation_date (default) or finish_date

date_from integer

Date from as unix timestamp

date_to integer

Date to as unix timestamp

sort_by varchar

Sorting: id, creation_date, finish_date, priority or task_name. Default is the newest first (with search the best match first)

sort_dir varchar

Sorting direction: asc or desc (default desc)

limit integer

Number of tasks per page (1–1000, default 100)

page integer

Page number starting from 0 (default 0)

Response

36 HTTP 200

Function to get tasks. Returns tasks that are not deleted, newest first, with search and filters

code integer

HTTP status code (200 = OK)

response array

List of tasks, or "Empty response" when nothing matches

idt integer

Task ID

nazov varchar

Task name

reporter_id integer

User ID who created the task (0 = none)

assignee_id integer

User ID assigned to the task (0 = none)

watcher_id varchar

Comma-separated IDs of watching users

is_private integer

0 = public, 1 = private

priority integer

Priority (0–5)

company varchar

Company name

company_id integer

Company ID

task_type_id integer

Task type ID

label_id varchar

Comma-separated label IDs

status integer

Task status ID (2 = done)

task_done integer

1 = done, 0 = not done

progress integer

Completion percentage (0–100)

creation_date datetime

Creation date (Y-m-d H:i:s)

finish_date datetime

Deadline (Y-m-d H:i:s), null = no deadline

planned_start datetime

Planned start (Y-m-d H:i:s), null = not planned

planned_end datetime

Planned end (Y-m-d H:i:s), null = not planned

task_done_date datetime

Completion date (Y-m-d H:i:s), null = not done

description varchar

Task description as plain text (decoded from base64). In the list it is shortened to 500 characters, with task_id it is complete

order_id integer

Linked order ID

is_subordinate integer

1 = the task is a sub-task

subordinate_issues varchar

JSON list of sub-task IDs

repeat_after integer

Repeat after this many days

recurring_task_id integer

Recurring task template ID

days_before integer

Notify this many days before the deadline

repeat_after_km integer

Repeat after this many kilometers

km_before integer

Notify this many kilometers before the due tachometer status

tachometer_status integer

Tachometer status at which the task is due

vehicle_id integer

Vehicle ID

trailer_id integer

Trailer ID

driver_id integer

Driver ID

register_id integer

Register record ID

register_type_id integer

Register type ID

Example request

curl --request POST \
  --url 'https://rest.crmango.com/api/GetAllTasks' \
  --header 'Authorization: Bearer auth_token' \
  --header 'Content-Type: application/json' \
  --data '{
    {
      "search": "service",
      "user_id": 12,
      "is_done": 0,
      "overdue": 1,
      "sort_by": "finish_date",
      "sort_dir": "asc",
      "limit": 20,
      "page": 0
    }
  }'
{
    "code": 200,
    "response": [
        {
            "idt": 1234,
            "nazov": "Service the truck",
            "reporter_id": 5,
            "assignee_id": 12,
            "watcher_id": "3,7",
            "is_private": 0,
            "priority": 3,
            "company": "ACME s.r.o.",
            "company_id": 8,
            "task_type_id": 2,
            "label_id": "4,6",
            "status": 1,
            "task_done": 0,
            "progress": 10,
            "creation_date": "2026-10-18 08:56:02",
            "finish_date": "2026-11-30 12:00:00",
            "planned_start": "2026-11-25 08:00:00",
            "planned_end": "2026-11-25 16:00:00",
            "task_done_date": null,
            "description": "Negotiate cooperation terms",
            "order_id": 102,
            "is_subordinate": 0,
            "subordinate_issues": null,
            "repeat_after": 30,
            "recurring_task_id": 3,
            "days_before": 5,
            "repeat_after_km": 15000,
            "km_before": 1000,
            "tachometer_status": 250000,
            "vehicle_id": 14,
            "trailer_id": 15,
            "driver_id": 77,
            "register_id": null,
            "register_type_id": null
        }
    ]
}