Issue a pairing code for a driver
Carrier admins and dispatchers. The code is valid 10 minutes, works once, and replaces any code of the same driver still waiting. Only its hash is stored: show it now, it cannot be read again.
Headers
x-correlation-idYour request identifier. Generated when absent, and always echoed in the response header.
Issue a pairing code for a driver › Request Body
membership_id^([0-9a-fA-F]{8}-[0-… · requiredThe driver membership the phone will act for.
Issue a pairing code for a driver › Responses
The code to show, as text and as a QR code of pairing_uri.
codeShow it as is, and as a QR code of pairing_uri.
pairing_urimembership_idexpires_at^(?:(?:\d\d[2468][04… · requiredPair a driver phone
Public, called by the driver app with the code it scanned or the driver typed. Registers the phone and returns its Cognito tokens; the app then refreshes them with the refresh token alone. An unknown, used or expired code gives invalid_pairing_code. The route is rate limited.
Headers
x-correlation-idYour request identifier. Generated when absent, and always echoed in the response header.
Pair a driver phone › Request Body
code8 characters shown as XXXX-XXXX. Case, spaces and dashes are ignored; O, I and L read as 0, 1, 1.
Pair a driver phone › Responses
The paired device and its tokens.
device_idcarrier_iddriver_nameThe driver the phone acts for, to greet them.
Cognito tokens of the device. Keep the refresh token in the secure storage of the phone.
List driver phones
Carrier admins and dispatchers. Newest pairing first, cursor paginated.
query Parameters
limitMaximum number of items in the page.
cursorThe next_cursor of the previous page, passed back as is. Omit it to get the first page.
statusComma-separated statuses to keep.
membership_id^([0-9a-fA-F]{8}-[0-…Keep the phones of one driver membership.
Headers
x-correlation-idYour request identifier. Generated when absent, and always echoed in the response header.
List driver phones › Responses
One page of devices.
next_cursorPass it as cursor to get the next page. null on the last page.
The driver app releases each phone is compared with.
Report that a driver phone is alive
Sent by the driver app with a device token. Updates its last sync time, app version and printer.
Headers
x-correlation-idYour request identifier. Generated when absent, and always echoed in the response header.
Report that a driver phone is alive › Request Body
app_versionprinter_nameThe label printer paired with the phone, or null.
pending_event_countTracking events saved on the phone and not sent yet. Dispatch sees it on the tour.
Report that a driver phone is alive › Responses
Recorded.
Revoke a driver phone
Carrier admins and dispatchers. The API refuses the phone at once and it can no longer refresh its tokens. Revoking a revoked phone returns it unchanged.
path Parameters
idThe device id.
Headers
x-correlation-idYour request identifier. Generated when absent, and always echoed in the response header.
Revoke a driver phone › Responses
The revoked device.
idmembership_iddriver_namemodelosapp_versionapp_version_statusup_to_date: the latest driver app. update_available: an older one the API still serves. unsupported: below the minimum version.
printer_namepending_event_countTracking events saved on the phone and not sent yet, as of its last heartbeat.
statuspaired_at^(?:(?:\d\d[2468][04… · requiredlast_seen_at^(?:(?:\d\d[2468][04… · requiredrevoked_at^(?:(?:\d\d[2468][04… · requiredRemove a revoked driver phone
Carrier admins and dispatchers. Takes a revoked phone off the list; what it synced stays. A phone still active is refused with a 409: revoke it first. Removing it again changes nothing.
path Parameters
idThe device id.
Headers
x-correlation-idYour request identifier. Generated when absent, and always echoed in the response header.
Remove a revoked driver phone › Responses
The phone is off the list.