Tasks
List active tasks assigned to the authenticated user for action tracking and follow-up management.
Auth required: Yes for all operations.
Tasks are action items associated with various entities (customers, customer files, setups, tickets, etc.). They have a status, due date, priority, and can be assigned to users.
Model Properties
Task
| Property | Type | Required | Description |
|---|---|---|---|
id |
integer | auto | Unique identifier |
taskable_type |
string | No | PHP class name of the entity this task is attached to (polymorphic) |
taskable_id |
integer | No | ID of the entity this task is attached to |
customer_id |
integer | No | FK to customers (denormalized for quick access) |
customer_file_id |
integer | No | FK to customer_files (denormalized) |
customer_file_setup_id |
integer | No | FK to customer_file_setups. Links to the onboarding/setup process |
customer_file_setup_phase_id |
integer | No | FK to the setup phase within an onboarding process |
user_id |
integer | No | FK to users. The user who created this task |
actor_id |
integer | No | FK to users. The user assigned to complete this task |
status_id |
integer | No | FK to task_statuses. Current status |
title |
string | Yes | Task title |
body |
text | No | Task description or details |
priority |
integer | No | Priority level |
due |
date | No | Due date |
activation_date |
date | No | Date when the task becomes active |
completion_date |
date | auto | Date when the task was completed. Set automatically on completion |
created_at |
datetime | auto | Creation timestamp |
updated_at |
datetime | auto | Last update timestamp |
Task Status values (status_id): 1 = ready, 2 = assigned, 3 = started, 4 = stopped, 5 = pending, 6 = completed, 7 = cancelled, 8 = skipped.
GET /v1/sales-tasks
List tasks for the authenticated user that are active and upcoming. Used by sales dashboards and CRM integrations.
Auth required: Yes (auth:api)
Filters applied automatically:
user_id = authenticated user IDstatus_id < 5(not completed/cancelled)due IS NOT NULLdue >= today
Sorting: By due date ascending.
Includes: taskable relation (the entity the task is linked to).
Response 200: Array of task objects.
Examples:
curl -s -X GET "https://your-instance.bluerocktel.net/api/v1/sales-tasks" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
response = requests.get(
"https://your-instance.bluerocktel.net/api/v1/sales-tasks",
headers={"Authorization": "Bearer YOUR_API_TOKEN"}
)
tasks = response.json()
$response = Http::withToken('YOUR_API_TOKEN')
->get('https://your-instance.bluerocktel.net/api/v1/sales-tasks');
$tasks = $response->json();
const response = await fetch(
"https://your-instance.bluerocktel.net/api/v1/sales-tasks",
{
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
}
);
const tasks = await response.json();
Key Task Fields
| Field | Description |
|---|---|
taskable_type / taskable_id |
Polymorphic relation to the task's parent entity |
user_id |
Assigned user |
status_id |
Current status (status < 5 = active) |
due |
Due date |
priority |
Priority level |
title |
Task title |
body |
Task description/content |
On this page