Skip to main content

Task Audit Report

Field-level audit trail for tasks: who changed what, when, from where, including status changes, assignments, and dynamic-field edits.

GET/apidev/v1/audit/tasks
PermissionAPICLI_AUDITORIA_TAREAS
Rate Limit10 req/min
Cache60s
Max Range92 days

Overview​

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.

Audit must be enabled per company

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:

HeaderRequiredDescription
AuthorizationYesBearer token obtained from the Login endpoint. Format: Bearer <token>
X-API-KeyYesCompany integration key provided during onboarding. Format: gtk_xxx...
tenantYesYour assigned tenant domain (default: geotareas.com) — always send your assigned tenant
Content-TypeConditionalapplication/json — required for POST and PUT requests

Query Parameters​

ParameterTypeRequiredDefaultDescription
startdatestringYes—ISO 8601 start date-time (e.g. 2026-03-01T00:00:00).
enddatestringYes—ISO 8601 end date-time. Max range 92 days from startdate.
user_idstringNoAll usersFilter by the user who made the change.
task_idstringNo—Internal task identifier.
task_numberstringNo—Service number of the task (partial match).
external_numberstringNo—External task number from an integration (partial match).
assistance_numberstringNo—Assistance number (partial match).
limitintegerNo25Number of records per page (1–100). A value outside that range returns 400 VALIDATION_ERROR — it is not clamped silently.
offsetintegerNo0Number 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):

CodeMeaning
CREARTask was created.
EDITARTask data was edited (static fields).
CAMBIO_ESTADOStatus change (e.g. from received to assigned, assigned to accepted).
ASIGNARDriver, vehicle, or provider was assigned.
DESASIGNARDriver, vehicle, or provider was unassigned.
RESERVARTask was reserved.
DESRESERVARTask reservation was released.
CANCELARTask was cancelled (individually or in bulk).
FINALIZARTask was finalized (individually or in bulk).
OAV_CREARDynamic (OAV) field values were created.
OAV_EDITARDynamic (OAV) field values were edited.
MIGRAR_HISTORICTask was moved to the history archive.
ACKAcknowledgment / non-acknowledgment received from the mobile app.
REASIGNARTask 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):

CodeMeaning
WEBWeb panel (operator / dispatcher).
MDTMobile app (field driver).
API_EXTERNAExternal API or integration.
IMPORTBulk import worker.
RUTAFIJAFixed-route scheduler.
WORKFLOWWorkflow automation.
IA_DESPACHOAutomatic AI dispatching.
SISTEMAInternal system process (scheduled jobs, maintenance).

Code Examples​

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"

Response​

Response Fields​

FieldTypeDescription
audit_idstringAudit record identifier.
occurred_atstringTimestamp of the change event.
task_idstring | nullInternal task identifier.
task_numberstring | nullService number of the task.
external_numberstring | nullExternal task number from an integration.
assistance_numberstring | nullAssistance number of the task.
actionstring | nullAction code. See Action values.
sourcestring | nullOrigin channel code. See Source values.
user_idstring | nullIdentifier of the user who made the change.
user_namestring | nullName of the user who made the change.
changesarrayStatic fields that changed. Each item: field, old, new, optional label, oldLabel, newLabel.
oav_changesarrayDynamic (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​

CodeHTTPDescription
VALIDATION_ERROR400Invalid parameters (e.g. date range exceeds 92 days, or an unrecognized parameter name).
UNAUTHORIZED401Missing, invalid, or expired tenant / Authorization / X-API-Key
FORBIDDEN403User lacks the required permission.
RATE_LIMITED429Exceeded 10 req/min.
INTERNAL_ERROR500Unexpected server error.