Skip to main content

Work Summary Report

Worked-day summary grouped by driver/vehicle or by provider, with opening/closing tasks, rest windows, and geodesic deviation alerts.

GET/apidev/v1/reports/cpm/work-summary
PermissionAPICLI_RPTCPM_RESUMENTRABAJO
Rate Limit10 req/min
Cache300s
Max Range31 days

Overview

Returns one summary row per worked day over the selected period. In mobile mode each row is anchored to a driver work shift (driver + vehicle), and in provider mode each row is anchored to a provider + day. Every row exposes the task that opened the day and the task that closed it, the rest window, and the geodesic deviation between the task address and the where the field event was actually registered.

  • Groupinggroup_by=movil anchors rows to driver shifts; group_by=prestador anchors them to provider + day
  • Date modedate_mode controls which task date the period is applied to (finalized, ingress, or full process)
  • Deviation alertsdeviation_threshold sets the alert distance (meters); deviation_only=true returns only rows that breached it
  • Scope filters — narrow results by vehicle, driver, provider, or service-finalization code

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
startdatestringYesISO 8601 start date-time (e.g. 2026-03-01T00:00:00).
enddatestringYesISO 8601 end date-time. Max range 31 days from startdate.
group_bystringNomovilGrouping mode: movil (driver/vehicle shift) or prestador (provider + day).
date_modestringNofinalizacionWhich task date the period applies to: finalizacion (task end), ingreso (task call/ingress), or todo (full process overlap).
vehiclesstringNoAll visibleComma-separated vehicle IDs. Applies to group_by=movil. Max 500.
driversstringNoAll visibleComma-separated driver IDs. Applies to group_by=movil. Max 500.
providersstringNoAll visibleComma-separated provider IDs. Applies to group_by=prestador. Max 500.
finalization_codesstringNoComma-separated service-finalization IDs. Max 100.
deviation_thresholdintegerNo200Alert distance in meters. A row is flagged when an event is registered farther than this from the task address.
deviation_onlybooleanNofalseReturn only rows with at least one deviation alert.
limitintegerNo25Number of records per page (1100).
offsetintegerNo0Number of records to skip for pagination.

Code Examples

curl -s -H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
"https://$TENANT/apidev/v1/reports/cpm/work-summary?startdate=2026-03-01T00:00:00&enddate=2026-03-15T23:59:59&group_by=movil&date_mode=finalizacion&limit=25"

Response

Response Fields

Each row represents one worked day. The opening and closing blocks describe the task that opened and closed the day; both share the same task-extreme shape.

FieldTypeDescription
shift_idstring | nullDriver work-shift identifier. null in prestador mode.
driver_idstringDriver identifier.
driver_namestringDriver name.
driver_image_urlstringDriver photo URL.
vehicle_idstring | nullVehicle identifier.
vehicle_namestring | nullVehicle name.
provider_idstring | nullProvider identifier (prestador mode).
provider_namestring | nullProvider name (prestador mode).
shift_startstring | nullShift start timestamp (QRA).
shift_endstring | nullShift end timestamp (QTP).
rest_startstring | nullRest window start.
rest_endstring | nullRest window end.
openingobjectThe task that opened the day (see Task Extreme fields).
closingobjectThe task that closed the day (see Task Extreme fields).
tasksarrayAll tasks of the day, each as a Task Extreme object.

Task Extreme fields

FieldTypeDescription
task_idstringTask identifier.
task_numberstringService/task number.
status_namestringEvent status name.
finalization_code_idstring | nullService-finalization code identifier.
finalization_code_namestring | nullService-finalization code name.
account_external_codestring | nullAccount external code.
account_namestring | nullAccount name.
task_addressstringTask address (street/number/apartment/corner).
event_timestring | nullTimestamp of the event (start or end).
event_addressstring | nullAddress where the event was registered.
deviation_distancenumber | nullGeodesic distance (meters) between task address and event location.
deviation_alertbooleanWhether deviation_distance exceeded the threshold.
parametersstringHuman-readable summary of the event (finalization code, parameters, notes).

Example Response

{
"success": true,
"data": [
{
"shift_id": "982710394857201664",
"driver_id": "982710394857201700",
"driver_name": "Carlos Martinez",
"driver_image_url": "",
"vehicle_id": "982710394857201800",
"vehicle_name": "Unit-105",
"provider_id": null,
"provider_name": null,
"shift_start": "2026-03-05T07:00:00",
"shift_end": "2026-03-05T15:00:00",
"rest_start": "2026-03-05T11:30:00",
"rest_end": "2026-03-05T12:00:00",
"opening": {
"task_id": "982710394857202001",
"task_number": "100245",
"status_name": "Started",
"finalization_code_id": null,
"finalization_code_name": null,
"account_external_code": "CLI-0098",
"account_name": "Acme Logistics",
"task_address": "Av. Reforma 1234, Esq. Juarez",
"event_time": "2026-03-05T07:42:00",
"event_address": "Av. Reforma 1234, Col. Centro",
"deviation_distance": 35,
"deviation_alert": false,
"parameters": "Finalization Code: Completed | Notes: Delivered on time"
},
"closing": {
"task_id": "982710394857202055",
"task_number": "100312",
"status_name": "Finished",
"finalization_code_id": "982710394857203001",
"finalization_code_name": "Completed",
"account_external_code": "CLI-0142",
"account_name": "Globex Retail",
"task_address": "Calle Madero 456, Col. Centro",
"event_time": "2026-03-05T14:48:00",
"event_address": "Calle Madero 460, Col. Centro",
"deviation_distance": 320,
"deviation_alert": true,
"parameters": "Finalization Code: Completed | Signature: Yes"
},
"tasks": []
}
],
"meta": {
"total": 1,
"limit": 25,
"offset": 0
}
}

Errors

CodeHTTPDescription
VALIDATION_ERROR400Invalid parameters (e.g. date range exceeds 31 days, or an unknown group_by / date_mode value).
UNAUTHORIZED401Missing, invalid, or expired tenant / Authorization / X-API-Key
FORBIDDEN403User lacks required permission.
RATE_LIMITED429Exceeded 10 req/min.
INTERNAL_ERROR500Unexpected server error.