List Activities
Query task-type activities visible to your integration.
GET /api/integration/activities/tasks
Returns a paginated list of task-type activities visible to your integration's API key, from one project or from the whole tenant (see Required header).
Authentication: Required — permission activity:view
Required header
| Header | Value |
|---|---|
x-api-key | YOUR_API_KEY |
x-project-id is optional: this is a project-optional endpoint. With a tenant key or a user token, sending the header narrows the list to that project; without it, the list covers every project of the tenant, and each activity carries its projectId. A project key always lists the activities of its own project. A header that is sent is validated — see Project errors.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number (default: 1) |
per_page | number | No | Results per page (default: 25, max: 100) |
status | string | No | Filter by activity status (see Activity States). Filterable values: READY, RETRYING, DISPATCHED, COMPLETED, CANCELED, FAILED |
result_status | string | No | Filter by result status (see Activity States). Filterable values: COMPLETED, NOT_EXECUTED |
channel | string | No | Filter by channel (SALESMAN, CALLCENTER, etc.) |
external_commerce_id | string | No | Filter by commerce external ID |
external_operator_id | string | No | Filter by operator external ID |
scheduled_from | string | No | Minimum scheduled date (ISO 8601) |
scheduled_to | string | No | Maximum scheduled date (ISO 8601) |
Example
curl -X GET "BASE_URL/api/integration/activities/tasks?page=1&per_page=10&status=READY" \
-H "x-api-key: YOUR_API_KEY"const params = new URLSearchParams({
page: "1",
per_page: "10",
status: "READY",
});
const response = await fetch(
`${BASE_URL}/api/integration/activities/tasks?${params}`,
{
headers: {
"x-api-key": "YOUR_API_KEY",
},
}
);
const data = await response.json();import requests
response = requests.get(
f"{BASE_URL}/api/integration/activities/tasks",
headers={
"x-api-key": "YOUR_API_KEY",
},
params={
"page": 1,
"per_page": 10,
"status": "READY",
},
)
data = response.json()Response 200 OK
The following is an illustrative example of the response shape. Values for fields such as id, scheduledAt, status, lifecycleStatus, etc., vary depending on the actual state of each activity. For the complete catalog of possible status and lifecycleStatus values, see Activity States.
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"activityOrigin": "ACTIVITY",
"projectId": "3f6c2b1a-8d4e-4f7a-9b2c-5e1d0a7f6c34",
"type": "TASK",
"status": "READY",
"score": 85,
"channel": "SALESMAN",
"scheduledAt": "2026-04-10T18:00:00.000Z",
"occurredAt": null,
"createdAt": "2026-04-10T14:30:00.000Z",
"lifecycleStatus": "READY",
"lifecycleStatusLabel": "Lista",
"lifecycleStatusDetail": null,
"canForceRetryDispatch": false,
"commerceExternalId": "COM-001",
"commerceName": "Farmacia Central",
"reason": {
"code": "CHURN_RISK",
"label": "Riesgo de fuga"
},
"userStatus": null,
"commerceAssignment": {
"commerceExternalId": "COM-001",
"assignmentReason": "Asignación por ruta",
"commerce": {
"externalId": "COM-001",
"name": "Farmacia Central"
}
},
"activityDetails": {
"type": "TASK",
"assignedRouteCode": "RUTA-NORTE-01",
"assignedOperatorExternalId": "OP-042",
"assignedRoute": {
"code": "RUTA-NORTE-01",
"name": "Ruta Norte"
},
"assignedOperator": {
"externalId": "OP-042",
"name": "Carlos Pérez",
"type": "SALESMAN"
}
},
"activityResult": null
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total": 47,
"total_pages": 5,
"has_next": true,
"has_previous": false
}
}Standalone execution example
Items with activityOrigin: "STANDALONE" come from a result registered as a standalone execution, without a preceding activity: scheduledAt repeats the result's occurredAt, and activityResult is always populated. A populated activityResult also appears on ACTIVITY items once they have been handled.
Only the item is shown below — the surrounding pagination envelope is identical to the one above.
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"activityOrigin": "STANDALONE",
"projectId": "3f6c2b1a-8d4e-4f7a-9b2c-5e1d0a7f6c34",
"type": null,
"reason": null,
"userStatus": null,
"status": null,
"score": null,
"scheduledAt": "2026-04-12T16:45:00.000Z",
"occurredAt": "2026-04-12T16:45:00.000Z",
"createdAt": "2026-04-12T16:47:00.000Z",
"lifecycleStatus": null,
"lifecycleStatusLabel": null,
"lifecycleStatusDetail": null,
"canForceRetryDispatch": false,
"channel": "SALESMAN",
"commerceExternalId": "COM-001",
"commerceName": "Farmacia Central",
"commerceAssignment": null,
"activityResult": {
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"resultStatus": "COMPLETED",
"source": "STANDALONE",
"origin": "PLATFORM",
"channel": "SALESMAN",
"occurredAt": "2026-04-12T16:45:00.000Z",
"createdAt": "2026-04-12T16:47:00.000Z",
"resultDetails": {
"type": "TASK",
"result": {
"code": "RESCHEDULE",
"label": "Reprogramar visita"
},
"comment": null,
"requiresFutureScheduledAt": true,
"externalOperatorId": "OP-042",
"operator": {
"externalId": "OP-042",
"name": "Carlos Pérez"
}
}
},
"activityDetails": {
"type": "TASK",
"assignedRouteCode": null,
"assignedOperatorExternalId": "OP-042",
"assignedRoute": null,
"assignedOperator": {
"externalId": "OP-042",
"name": "Carlos Pérez",
"type": "SALESMAN"
}
}
}Activity fields
| Field | Type | Description |
|---|---|---|
id | string | Unique activity identifier |
activityOrigin | "ACTIVITY" | "STANDALONE" | Activity origin |
projectId | string | Project the activity belongs to |
type | string | null | Activity type (e.g., "TASK") |
status | string | null | Current activity status — see Activity States for the complete catalog |
score | number | null | Activity priority score (set at creation) |
channel | string | null | Activity channel (SALESMAN, CALLCENTER, etc.) |
scheduledAt | string | null | Scheduled date (ISO 8601) |
occurredAt | string | null | Date when the activity was handled (ISO 8601) |
createdAt | string | null | Creation date (ISO 8601) |
lifecycleStatus | string | null | Lifecycle status for display (read-only, computed) — see Activity States |
lifecycleStatusLabel | string | null | Human-readable lifecycle status label |
lifecycleStatusDetail | string | null | Additional status detail |
canForceRetryDispatch | boolean | Indicates whether a re-dispatch can be forced |
commerceExternalId | string | External ID of the associated commerce |
commerceName | string | Commerce name |
reason | object | null | Activity reason (code, label) |
userStatus | object | null | Custom user status (code, label) |
commerceAssignment | object | null | Commerce assignment information |
activityDetails | object | null | Type-specific activity details |
activityResult | object | null | Activity result (if exists) |
activityDetails fields (TASK type)
| Field | Type | Description |
|---|---|---|
type | "TASK" | Type discriminator |
assignedRouteCode | string | null | Assigned route code |
assignedOperatorExternalId | string | null | Assigned operator external ID |
assignedRoute | object | null | Assigned route (code, name) |
assignedOperator | object | null | Assigned operator (externalId, name, type) |
activityResult fields
| Field | Type | Description |
|---|---|---|
id | string | Result identifier |
resultStatus | string | Result status — see Activity States §resultStatus |
source | string | Result source |
origin | string | Origin channel |
channel | string | null | Result channel |
occurredAt | string | Date when it occurred (ISO 8601) |
createdAt | string | Creation date (ISO 8601) |
resultDetails | object | null | Task result details |
resultDetails fields (TASK type)
| Field | Type | Description |
|---|---|---|
type | "TASK" | Type discriminator |
result | object | Submitted result type (code, label) |
comment | string | null | Comment submitted along with the result |
requiresFutureScheduledAt | boolean | Indicates whether the submitted result type requires a future_scheduled_at date |
externalOperatorId | string | null | External ID of the operator who submitted the result |
operator | object | null | Operator who submitted the result (externalId, name) |
Errors
| Status | Description |
|---|---|
401 | API key missing or invalid |
403 | The key does not have the activity:view permission |
400 / 403 / 404 | The x-project-id that was sent is not valid — see Project errors |