Task Audit Report
Field-level audit trail for tasks: who changed what, when, from where, including status changes, assignments, and dynamic-field edits.
/apidev/v1/audit/tasksOverview
Returns the audit history of tasks over the selected period. Each record captures a single change event on a task — what action took place, who triggered it, from which channel, and the exact fields that changed (old value → new value), including dynamic (OAV) fields, status transitions, and assignments.
- Task lookup — locate the trail for one task by its internal id, service number, external number, or assistance number
- User filter — see every change made by a specific user
Each returned record also carries an action code (what kind of event it was) and a source code (which channel it originated from) — see Action values and Source values.
This audit trail is recorded only for companies that have task auditing turned on. If it is off, the endpoint returns an empty list with no error — there is simply no history to show.
Request
Request Headers
Every request to a protected endpoint requires these headers:
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token obtained from the Login endpoint. Format: Bearer <token> |
X-API-Key | Yes | Company integration key provided during onboarding. Format: gtk_xxx... |
tenant | Yes | Your assigned tenant domain (default: geotareas.com) — always send your assigned tenant |
Content-Type | Conditional | application/json — required for POST and PUT requests |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
startdate | string | Yes | — | ISO 8601 start date-time (e.g. 2026-03-01T00:00:00). |
enddate | string | Yes | — | ISO 8601 end date-time. Max range 92 days from startdate. |
user_id | string | No | All users | Filter by the user who made the change. |
task_id | string | No | — | Internal task identifier. |
task_number | string | No | — | Service number of the task (partial match). |
external_number | string | No | — | External task number from an integration (partial match). |
assistance_number | string | No | — | Assistance number (partial match). |
limit | integer | No | 25 | Number of records per page (1–100). A value outside that range returns 400 VALIDATION_ERROR — it is not clamped silently. |
offset | integer | No | 0 | Number of records to skip for pagination. |
Action values
The action response field carries one of these codes, telling you what kind of event the record captures (it is informational — it cannot be used as a query filter):
| Code | Meaning |
|---|---|
CREAR | Task was created. |
EDITAR | Task data was edited (static fields). |
CAMBIO_ESTADO | Status change (e.g. from received to assigned, assigned to accepted). |
ASIGNAR | Driver, vehicle, or provider was assigned. |
DESASIGNAR | Driver, vehicle, or provider was unassigned. |
RESERVAR | Task was reserved. |
DESRESERVAR | Task reservation was released. |
CANCELAR | Task was cancelled (individually or in bulk). |
FINALIZAR | Task was finalized (individually or in bulk). |
OAV_CREAR | Dynamic (OAV) field values were created. |
OAV_EDITAR | Dynamic (OAV) field values were edited. |
MIGRAR_HISTORIC | Task was moved to the history archive. |
ACK | Acknowledgment / non-acknowledgment received from the mobile app. |
REASIGNAR | Task was reassigned to a different driver, vehicle, or provider. |
Source values
The source response field carries one of these codes, telling you which channel the change originated from (it is informational — it cannot be used as a query filter):
| Code | Meaning |
|---|---|
WEB | Web panel (operator / dispatcher). |
MDT | Mobile app (field driver). |
API_EXTERNA | External API or integration. |
IMPORT | Bulk import worker. |
RUTAFIJA | Fixed-route scheduler. |
WORKFLOW | Workflow automation. |
IA_DESPACHO | Automatic AI dispatching. |
SISTEMA | Internal system process (scheduled jobs, maintenance). |
Code Examples
- cURL
- JavaScript
- Python
curl -s -H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
"https://$TENANT/apidev/v1/audit/tasks?startdate=2026-03-01T00:00:00&enddate=2026-03-31T23:59:59&task_number=100245&limit=25"
const res = await fetch(
`https://${TENANT}/apidev/v1/audit/tasks?startdate=2026-03-01T00:00:00&enddate=2026-03-31T23:59:59&task_number=100245&limit=25`,
{
headers: {
'Authorization': `Bearer ${token}`,
'X-API-Key': apiKey,
'tenant': TENANT,
},
}
);
const data = await res.json();
import requests
response = requests.get(
f"https://{TENANT}/apidev/v1/audit/tasks",
headers={"Authorization": f"Bearer {token}", "X-API-Key": api_key, "tenant": TENANT},
params={
"startdate": "2026-03-01T00:00:00",
"enddate": "2026-03-31T23:59:59",
"task_number": "100245",
"limit": 25,
},
)
data = response.json()
Response
Response Fields
| Field | Type | Description |
|---|---|---|
audit_id | string | Audit record identifier. |
occurred_at | string | Timestamp of the change event. |
task_id | string | null | Internal task identifier. |
task_number | string | null | Service number of the task. |
external_number | string | null | External task number from an integration. |
assistance_number | string | null | Assistance number of the task. |
action | string | null | Action code. See Action values. |
source | string | null | Origin channel code. See Source values. |
user_id | string | null | Identifier of the user who made the change. |
user_name | string | null | Name of the user who made the change. |
changes | array | Static fields that changed. Each item: field, old, new, optional label, oldLabel, newLabel. |
oav_changes | array | Dynamic (OAV) fields that changed. Each item: itemId, itemName, itemType, old, new. |
Example Response
{
"success": true,
"data": [
{
"audit_id": "982710394857201664",
"occurred_at": "2026-03-12T09:41:00",
"task_id": "982710394857100200",
"task_number": "100245",
"external_number": "EXT-77123",
"assistance_number": "A-55012",
"action": "CAMBIO_ESTADO",
"source": "MDT",
"user_id": "982710394857201700",
"user_name": "Carlos Martinez",
"changes": [],
"oav_changes": []
},
{
"audit_id": "982710394857201665",
"occurred_at": "2026-03-12T10:05:00",
"task_id": "982710394857100201",
"task_number": "100246",
"external_number": null,
"assistance_number": "A-55013",
"action": "EDITAR",
"source": "WEB",
"user_id": "982710394857201800",
"user_name": "Laura Hernandez",
"changes": [
{
"field": "serconid",
"old": "982710394857300100",
"new": "982710394857300101",
"label": "Driver",
"oldLabel": "Carlos Martinez",
"newLabel": "Diego Fuentes"
}
],
"oav_changes": []
}
],
"meta": {
"total": 2,
"limit": 25,
"offset": 0
}
}
Errors
| Code | HTTP | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid parameters (e.g. date range exceeds 92 days, or an unrecognized parameter name). |
UNAUTHORIZED | 401 | Missing, invalid, or expired tenant / Authorization / X-API-Key |
FORBIDDEN | 403 | User lacks the required permission. |
RATE_LIMITED | 429 | Exceeded 10 req/min. |
INTERNAL_ERROR | 500 | Unexpected server error. |