Skip to main content

Activity Detail Report

Personnel shift activity with compliance tracking, geofence context, and sub-shift breakdowns.

GET/apidev/v1/reports/cpm/activity-detail
PermissionAPICLI_RPTCPM_DETALLE
Rate Limit10 req/min
Cache300s
Max Range31 days

Request

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.
driversstringNoAll visibleComma-separated driver IDs. Max 500.
devicesstringNoAll visibleComma-separated device IDs. Max 500.
device_groupsstringNoComma-separated device group IDs. Max 100.
shift_categoriesstringNoComma-separated shift category IDs. Max 50.
shift_idstringNoSpecific shift identifier.
compliance_onlybooleanNofalseReturn only non-compliant records.
detailedbooleanNofalseInclude sub-shift breakdown in response.
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/activity-detail?startdate=2026-03-01T00:00:00&enddate=2026-03-15T23:59:59&detailed=true&limit=25"

Response

Response Fields

FieldTypeDescription
shift_idstring | nullShift identifier.
shift_linenumberShift line number.
driver_idstring | nullDriver identifier.
driver_namestringDriver name.
device_namestringVehicle name.
shift_startstring | nullShift start timestamp.
shift_endstring | nullShift end timestamp.
shift_namestringShift/schedule name.
shift_hoursnumberConfigured shift hours.
start_addressstringAddress at shift start.
end_addressstringAddress at shift end.
start_geofencestringGeofence at shift start.
end_geofencestringGeofence at shift end.
qra_timestring | nullQRA registration timestamp.
qrx_timestring | nullQRX registration timestamp.
qrv_timestring | nullQRV registration timestamp.
qtp_timestring | nullQTP registration timestamp.
worked_hoursnumberHours worked.
rested_hoursnumberHours rested.
kms_shiftnumberKilometers during shift.
kms_restnumberKilometers during rest.
compliance_breachbooleanWhether a compliance breach was detected.
sub_shiftsarraySub-shift breakdown (included when detailed=true).

Example Response

{
"success": true,
"data": [
{
"shift_id": "982710394857201664",
"shift_line": 1,
"driver_id": "982710394857201700",
"driver_name": "Carlos Martinez",
"device_name": "Unit-105",
"shift_start": "2026-03-05T07:00:00",
"shift_end": "2026-03-05T15:00:00",
"shift_name": "Morning Shift",
"shift_hours": 8,
"start_address": "Av. Reforma 1234, Col. Centro",
"end_address": "Av. Reforma 1234, Col. Centro",
"start_geofence": "Depot Central",
"end_geofence": "Depot Central",
"qra_time": "2026-03-05T06:55:00",
"qrx_time": "2026-03-05T15:05:00",
"qrv_time": "2026-03-05T07:02:00",
"qtp_time": null,
"worked_hours": 7.8,
"rested_hours": 0.2,
"kms_shift": 145.3,
"kms_rest": 2.1,
"compliance_breach": false,
"sub_shifts": []
},
{
"shift_id": "982710394857201665",
"shift_line": 2,
"driver_id": "982710394857201701",
"driver_name": "Laura Hernandez",
"device_name": "Unit-203",
"shift_start": "2026-03-05T22:00:00",
"shift_end": "2026-03-06T06:00:00",
"shift_name": "Night Shift",
"shift_hours": 8,
"start_address": "Blvd. Manuel Avila Camacho, Naucalpan",
"end_address": "Calle Madero 456, Col. Centro",
"start_geofence": "Zone North",
"end_geofence": "",
"qra_time": "2026-03-05T22:10:00",
"qrx_time": null,
"qrv_time": "2026-03-05T22:15:00",
"qtp_time": null,
"worked_hours": 9.2,
"rested_hours": 0,
"kms_shift": 210.5,
"kms_rest": 0,
"compliance_breach": true,
"sub_shifts": []
}
],
"meta": {
"total": 2,
"limit": 25,
"offset": 0
}
}

Errors

CodeHTTPDescription
BAD_REQUEST400Missing required headers.
VALIDATION_ERROR400Invalid parameters (e.g. date range exceeds 31 days).
UNAUTHORIZED401Invalid or expired JWT / API Key.
FORBIDDEN403User lacks required permission.
RATE_LIMITED429Exceeded 10 req/min.
INTERNAL_ERROR500Unexpected server error.