Activity Detail Report
Personnel shift activity with compliance tracking, geofence context, and sub-shift breakdowns.
GET
/apidev/v1/reports/cpm/activity-detailPermissionAPICLI_RPTCPM_DETALLE
Rate Limit10 req/min
Cache300s
Max Range31 days
Request
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 31 days from startdate. |
drivers | string | No | All visible | Comma-separated driver IDs. Max 500. |
devices | string | No | All visible | Comma-separated device IDs. Max 500. |
device_groups | string | No | — | Comma-separated device group IDs. Max 100. |
shift_categories | string | No | — | Comma-separated shift category IDs. Max 50. |
shift_id | string | No | — | Specific shift identifier. |
compliance_only | boolean | No | false | Return only non-compliant records. |
detailed | boolean | No | false | Include sub-shift breakdown in response. |
limit | integer | No | 25 | Number of records per page (1–100). |
offset | integer | No | 0 | Number of records to skip for pagination. |
Code Examples
- cURL
- JavaScript
- Python
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"
const res = await fetch(
`https://${TENANT}/apidev/v1/reports/cpm/activity-detail?startdate=2026-03-01T00:00:00&enddate=2026-03-15T23:59:59&detailed=true&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/reports/cpm/activity-detail",
headers={"Authorization": f"Bearer {token}", "X-API-Key": api_key, "tenant": TENANT},
params={"startdate": "2026-03-01T00:00:00", "enddate": "2026-03-15T23:59:59", "detailed": True, "limit": 25},
)
data = response.json()
Response
Response Fields
| Field | Type | Description |
|---|---|---|
shift_id | string | null | Shift identifier. |
shift_line | number | Shift line number. |
driver_id | string | null | Driver identifier. |
driver_name | string | Driver name. |
device_name | string | Vehicle name. |
shift_start | string | null | Shift start timestamp. |
shift_end | string | null | Shift end timestamp. |
shift_name | string | Shift/schedule name. |
shift_hours | number | Configured shift hours. |
start_address | string | Address at shift start. |
end_address | string | Address at shift end. |
start_geofence | string | Geofence at shift start. |
end_geofence | string | Geofence at shift end. |
qra_time | string | null | QRA registration timestamp. |
qrx_time | string | null | QRX registration timestamp. |
qrv_time | string | null | QRV registration timestamp. |
qtp_time | string | null | QTP registration timestamp. |
worked_hours | number | Hours worked. |
rested_hours | number | Hours rested. |
kms_shift | number | Kilometers during shift. |
kms_rest | number | Kilometers during rest. |
compliance_breach | boolean | Whether a compliance breach was detected. |
sub_shifts | array | Sub-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
| Code | HTTP | Description |
|---|---|---|
BAD_REQUEST | 400 | Missing required headers. |
VALIDATION_ERROR | 400 | Invalid parameters (e.g. date range exceeds 31 days). |
UNAUTHORIZED | 401 | Invalid or expired JWT / API Key. |
FORBIDDEN | 403 | User lacks required permission. |
RATE_LIMITED | 429 | Exceeded 10 req/min. |
INTERNAL_ERROR | 500 | Unexpected server error. |