Breadcrumbs

Export GPS breadcrumb trails for employee shifts on a specific date. Breadcrumbs capture location movement while an employee is clocked in — useful for field-service compliance, route verification, and enterprise audit workflows.

The API uses an async three-step flow: request a report, poll until it is ready, then download a JSON file.

Endpoints

StepMethodEndpointDescription
1POST/time-clock/breadcrumbs/v1/reportStart report generation for a date
2GET/time-clock/breadcrumbs/v1/report/{fileId}Poll task status
3GET/time-clock/breadcrumbs/v1/report/{fileId}/downloadDownload the JSON report

Overview

  • Single-day export: pass one date (YYYY-MM-DD). The report includes shift breadcrumbs for that calendar day across all time clocks in the company (company timezone).
  • Async generation: step 1 returns a fileId (UUID). A background worker builds the file and uploads it to storage.
  • Poll then download: call step 2 until status is completed, then call step 3 to stream the JSON.
  • Shift-scoped data: breadcrumbs are grouped per shift (timeActivityId) and user. Only shifts with breadcrumb data appear in the file.
  • Prerequisite: breadcrumbs must be enabled on at least one time clock in the company (Time Clock settings).
📘

What are breadcrumbs?

While an employee is clocked into a shift, Connecteam can record periodic GPS events — motion readings, geofence enter/exit events, and providerChange events (network/GPS state changes). These are stored on the shift and exported in the report.

👍

Authenticated download

Always download through step 3 with your API key or OAuth token. The API validates that the fileId belongs to your company before streaming the file.


Authentication

  • API Key (X-API-KEY header), or
  • OAuth 2.0 with scope time_clock.read

Plan requirement: Time Clock API (timeClockApi, Operations API category).


Step 1 — Generate Report

POST /time-clock/breadcrumbs/v1/report

Request Body

FieldTypeRequiredDescription
datestring (YYYY-MM-DD)YesCalendar date to export. Must not be in the future.

Example Request

curl --request POST \
  --url https://api.connecteam.com/time-clock/breadcrumbs/v1/report \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '{
    "date": "2025-03-15"
  }'

Response

{
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "data": {
    "fileId": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Save data.fileId — you need it for steps 2 and 3.


Step 2 — Poll Status

GET /time-clock/breadcrumbs/v1/report/{fileId}

Path Parameters

ParameterTypeRequiredDescription
fileIdstring (UUID)YesThe fileId returned from step 1

Task Status Values

StatusMeaning
in_queueTask created; waiting for the worker
in_progressReport is being generated
completedFile is ready — proceed to step 3
errorGeneration failed — see errorMsg

Example Request

curl --request GET \
  --url https://api.connecteam.com/time-clock/breadcrumbs/v1/report/550e8400-e29b-41d4-a716-446655440000 \
  --header 'X-API-KEY: YOUR_API_KEY'

Response (in progress)

{
  "requestId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "data": {
    "status": "in_progress",
    "errorMsg": null
  }
}

Response (completed)

{
  "requestId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "data": {
    "status": "completed",
    "errorMsg": null
  }
}

Poll every few seconds until status is completed or error.


Step 3 — Download Report

GET /time-clock/breadcrumbs/v1/report/{fileId}/download

Streams the JSON file (Content-Type: application/json) with a Content-Disposition: attachment header. Only available when status is completed.

Example Request

curl --request GET \
  --url https://api.connecteam.com/time-clock/breadcrumbs/v1/report/550e8400-e29b-41d4-a716-446655440000/download \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --output breadcrumbs_2025-03-15.json

Report File Structure

The downloaded JSON has this top-level shape:

{
  "breadcrumbsByActivities": [
    {
      "timeClockId": 12345,
      "timeActivityId": "shift-abc123",
      "userId": 9170357,
      "breadcrumbs": [
        {
          "timestamp": 1710504000,
          "receivedTimestamp": 1710504002,
          "type": "motion",
          "gps": {
            "altitude": 50.0,
            "latitude": 40.7128,
            "longitude": -74.0060,
            "speed": 2.5,
            "accuracy": 10.0,
            "altitudeAccuracy": 5.0,
            "latitudeAccuracy": null,
            "longitudeAccuracy": null
          }
        },
        {
          "timestamp": 1710507600,
          "receivedTimestamp": 1710507601,
          "type": "geoFence",
          "action": "ENTER",
          "geoFenceId": "gf-site-001",
          "gps": {
            "altitude": 48.0,
            "latitude": 40.7130,
            "longitude": -74.0058,
            "speed": 0.0,
            "accuracy": 8.0
          }
        }
      ]
    }
  ]
}

Activity Fields

FieldTypeDescription
timeClockIdintegerTime clock the shift belongs to
timeActivityIdstringShift ID (same as shift id in time-activities APIs)
userIdintegerEmployee ID
breadcrumbsarrayOrdered GPS events for this shift

Breadcrumb Event Fields

FieldTypeDescription
timestampintegerWhen the event was recorded on the device (Unix seconds)
receivedTimestampintegerWhen Connecteam received the event (Unix seconds)
typestringmotion, geoFence, or providerChange
gpsobjectLatitude, longitude, altitude, speed (m/s), accuracy (meters), and optional accuracy components
actionstring(geoFence only) ENTER or EXIT
geoFenceIdstring(geoFence only) Geofence identifier
isNetworkEnabledboolean(providerChange only) Device network state
isLocationEnabledboolean(providerChange only) OS location services state
isGpsEnabledboolean(providerChange only) GPS hardware state
📝

Export notes

  • Activities with no breadcrumbs are omitted from the file.
  • Internal fields (age, lastLocationTrackingEvent) are stripped from the export.
  • Shifts are included when they have activity on the requested date (per company timezone day boundaries).

Integration Example

const BASE = 'https://api.connecteam.com/time-clock/breadcrumbs/v1';
const API_KEY = 'YOUR_API_KEY';
const headers = { 'X-API-KEY': API_KEY, 'Content-Type': 'application/json' };

async function downloadBreadcrumbsReport(date) {
  // Step 1 — start generation
  const createRes = await fetch(`${BASE}/report`, {
    method: 'POST',
    headers,
    body: JSON.stringify({ date }),
  });
  if (!createRes.ok) throw new Error(await createRes.text());
  const { data: { fileId } } = await createRes.json();

  // Step 2 — poll until completed
  const pollHeaders = { 'X-API-KEY': API_KEY };
  let status = 'in_queue';
  let errorMsg = null;
  while (status === 'in_queue' || status === 'in_progress') {
    await new Promise((r) => setTimeout(r, 5000));
    const statusRes = await fetch(`${BASE}/report/${fileId}`, { headers: pollHeaders });
    if (!statusRes.ok) throw new Error(await statusRes.text());
    ({ status, errorMsg } = (await statusRes.json()).data);
  }
  if (status === 'error') throw new Error(errorMsg || 'Report generation failed');

  // Step 3 — download JSON
  const downloadRes = await fetch(`${BASE}/report/${fileId}/download`, { headers: pollHeaders });
  if (!downloadRes.ok) throw new Error(await downloadRes.text());
  return downloadRes.json();
}

// Export breadcrumbs for March 15, 2025
const report = await downloadBreadcrumbsReport('2025-03-15');
console.log(`Activities with breadcrumbs: ${report.breadcrumbsByActivities.length}`);

Error Codes

HTTP StatusWhen
400Invalid fileId format (not a UUID); report not ready for download (statuscompleted); breadcrumbs not enabled; future date; no time clocks in company
401Missing or invalid authentication
403fileId belongs to a different company
404fileId not found; report file missing from storage
422Request body validation failure

When status is error, errorMsg in the status response contains the failure reason.


Prerequisites & Limitations

📝

Important Considerations

  • Enable breadcrumbs in Time Clock settings before calling the API. If no time clock has breadcrumbs enabled, step 1 returns 400.
  • Task metadata is retained for approximately 2 hours (poll within this window).
  • Generated files in storage use a 1-day TTL tag — download soon after completion.
  • Company-wide scope: one request exports breadcrumbs from all time clocks for the date.
  • Date only: there is no multi-day range in a single request; call once per day.

Generate Report API Reference · Get Status API Reference · Download API Reference