Skip to main content

Revisits Report

Detects repeat visits to the same account within a configurable window — revisit rate and first-time-fix rate per group.

GET/apidev/v1/reports/gt/revisits
PermissionAPICLI_RPTGT_REVISITAS
Rate Limit10 req/min
Cache300s
Max Range92 days

Overview​

Identifies when the same account was visited more than once within a short period — a signal that the first visit did not resolve the problem. For each finished task, the report looks at the previous finished task on the same account; if the gap is within the revisit window, the task is counted as a revisit, otherwise as a first visit. Results are aggregated per group with the revisit rate, the first-time-fix rate, and the average days between consecutive visits.

Tune the window with revisit_window_days (default 30, range 1–365): two visits to the same account within that many days count as a revisit. Choose how rows are grouped with group_by (defaults to provider).


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.
revisit_window_daysintegerNo30Days within which a second visit to the same account counts as a revisit (1–365).
group_bystringNoproviderHow rows are grouped. One of: provider, device, driver, cause, subcause, service_type, product, origin, shift, end_code, comm_media, route, country, department, city, zone, client, telephonist, operator, resource_type, date, month, weekday, hour.
devicesstringNo—Comma-separated device IDs. Max 500.
driversstringNo—Comma-separated driver IDs. Max 500.
providersstringNo—Comma-separated provider IDs. Max 100.
service_typesstringNo—Comma-separated service type IDs. Max 100.
causesstringNo—Comma-separated cause IDs. Max 100.
subcausesstringNo—Comma-separated subcause IDs. Max 100.
statusesstringNo—Comma-separated task status codes. Max 100.
device_groupsstringNoAllComma-separated device type IDs (the device_group catalog from Fleet / Devices). Filters tasks to devices of those types; combines with devices as an intersection. Max 100
originsstringNo—Comma-separated origin IDs. Max 100.
route_idsstringNo—Comma-separated route IDs. Max 100.
operatorsstringNo—Comma-separated operator IDs. Max 100.
client_idstringNo—Single client ID.
account_idstringNo—Single account ID.
shift_idstringNo—Single shift ID.
limitintegerNo25Number of records per page (1–100).
offsetintegerNo0Number of records to skip for pagination.
How device_groups combines with devices

device_groups is expanded to every device of those types, and if you also send devices, only the devices present in both lists are kept. If that intersection is empty the report returns no rows.


Code Examples​

curl -s -H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
"https://$TENANT/apidev/v1/reports/gt/revisits?startdate=2026-03-01T00:00:00&enddate=2026-03-15T23:59:59&revisit_window_days=15&group_by=driver&limit=25"

Response​

Response Fields​

FieldTypeDescription
group_labelstringDisplay name of the group (e.g. driver, device, provider).
group_idstring | nullInternal ID of the group, or null when not resolvable.
totalnumberTotal finished tasks in the group.
revisitasnumberTasks that revisited an account within the window.
primera_visitanumberTasks that were a first visit (no recent prior visit).
dias_entre_visitas_avgnumberAverage days between consecutive visits to the same account.
tasa_revisitas_pctnumberRevisit rate percentage (revisitas / total * 100).
first_time_fix_pctnumberFirst-time-fix rate percentage ((total − revisitas) / total * 100).

Example Response​

{
"success": true,
"data": [
{
"group_label": "Carlos Martinez",
"group_id": "10293",
"total": 120,
"revisitas": 18,
"primera_visita": 102,
"dias_entre_visitas_avg": 6.41,
"tasa_revisitas_pct": 15.0,
"first_time_fix_pct": 85.0
}
],
"meta": {
"total": 1,
"limit": 25,
"offset": 0
}
}

Errors​

CodeHTTPDescription
VALIDATION_ERROR400Invalid params: missing dates, range > 92 days, revisit_window_days outside 1–365, invalid enum values.
UNAUTHORIZED401Missing, invalid, or expired tenant / Authorization / X-API-Key
FORBIDDEN403User lacks required permission.
RATE_LIMITED429Exceeded 10 req/min.
INTERNAL_ERROR500Unexpected server error.