Developers

PocketTrack API

Pull your machines, status history, maintenance logs, parts requests, warranty claims, refund requests and reminders into your own dashboards, spreadsheets and reports. Read-only, JSON over HTTPS, no SDK required.

1. Get a key

An admin creates keys in Settings → API Keys. The key is shown once; copy it somewhere safe. Keys belong to your organization, not to a person, so they keep working when staff change. Revoke a key from the same page and it stops working immediately.

Read keys are available to every organization. Write access (changing machine status, adding notes, resolving refunds) is enabled per organization on request. Contact us and tell us what you are building.

2. Authenticate

Send the key as a bearer token on every request. The base URL is https://pockettrack.app/api/v1.

curl https://pockettrack.app/api/v1/summary \
  -H "Authorization: Bearer pt_live_YOUR_KEY"

Every response is JSON with a data field. List endpoints add a pagination object. Errors come back as { "error": { "code", "message" } } with a matching HTTP status.

{
  "data": [
    {
      "id": "6a1f…",
      "location_id": "59f2…",
      "type": "washer",
      "label": "07",
      "status": "out_of_service",
      "status_reason": "Not draining",
      "down_since": "2026-10-28T13:05:41.000Z",
      "attention_since": null,
      "priority": "normal"
    }
  ],
  "pagination": { "limit": 100, "offset": 0, "returned": 1, "total": 1 }
}

3. Endpoints

EndpointReturns
GET/meWhat this key can see
GET/summaryMachine counts by status
GET/locationsList locations
GET/machinesList machines
GET/machines/{id}Get one machine
GET/machines/{id}/historyMachine timeline
GET/status-historyList status changes
GET/logsList maintenance logs
GET/parts-requestsList parts requests
GET/warranty-claimsList warranty claims
GET/refund-requestsList refund requests
GET/remindersList reminders

Full parameters and response shapes are in the interactive reference.

4. Filtering and paging

  • location_id and machine_id narrow any list.
  • updated_since returns only rows changed at or after an ISO timestamp. Poll it every few minutes instead of downloading everything.
  • limit (up to 500, default 100) and offset page through long lists.
# Everything that changed in the last 15 minutes
curl "https://pockettrack.app/api/v1/status-history?updated_since=2026-10-31T14:00:00Z" \
  -H "Authorization: Bearer pt_live_YOUR_KEY"

5. Machine statuses

  • working: in service, nothing flagged.
  • in_service_attention: in service, flagged for attention. attention_since says since when.
  • awaiting_followup: down, waiting on parts or a technician. down_since is set.
  • out_of_service: down. down_since is set.

6. Example: Google Sheets

No server needed. This Apps Script function fills a sheet with your machines.

// Google Sheets → Extensions → Apps Script. Paste, set your key, then
// put =POCKETTRACK_MACHINES() in a cell. Refreshes when the sheet recalculates.
const KEY = "pt_live_YOUR_KEY";

function POCKETTRACK_MACHINES() {
  const res = UrlFetchApp.fetch("https://pockettrack.app/api/v1/machines?limit=500", {
    headers: { Authorization: "Bearer " + KEY },
  });
  const rows = JSON.parse(res.getContentText()).data;
  const header = ["Label", "Type", "Status", "Reason", "Down since", "Location"];
  return [header].concat(rows.map(m => [
    m.label, m.type, m.status, m.status_reason || "", m.down_since || "", m.location_id,
  ]));
}

7. Limits and good manners

  • 120 requests per minute per key. Over that you get HTTP 429; wait a minute and retry.
  • All timestamps are UTC in ISO 8601. Convert to your location’s timezone for display.
  • Keep keys out of browsers and shared spreadsheets. If one leaks, revoke it and create another.
  • The API is versioned at /v1. We add fields without notice and never remove or rename them within a version.

Questions, or need write access? contactpockettrack@gmail.com