Get Driver Tags
GET/drivers/tags
This endpoint lists the driver ID tags of the account, newest first seen first. Each tag carries its
current assignment, or null when it is not assigned. Tags are registered when a terminal first
reports them, so a tag that has never been scanned does not appear. Earlier assignments are not listed
here, GET /drivers/tags/{identification_tag_id}/history lists them.
status is ASSIGNED when the tag has an assignment that is running or starts in the future, LOST
when its latest assignment was marked lost and no later assignment is running, and UNASSIGNED
otherwise.
A subuser sees every unassigned tag, and an assigned tag only when it can view the assigned driver.
That means the driver is one the subuser owns or has been granted view or edit on, as for
GET /drivers.
What assignment holds, case by case. An assignment is current when it is not lost and its end is
after the time of the request. It is running when it has also started, and future when it has not.
| Case | HTTP status | assignment | Row chosen when several exist | Fields that can be null |
|---|---|---|---|---|
| Running assignment | 200 | Object, tag status is ASSIGNED | The running one. If data has several running assignments, the one with the latest assigned_ts. A running assignment wins over a future one. | unassigned_ts is null when the assignment has no end, and a date when it ends later. |
| Future assignment only | 200 | Object, tag status is ASSIGNED | The one that starts soonest. | Same as above. assigned_ts is in the future. |
| No assignment, or only ended ones that were not lost | 200 | null, tag status is UNASSIGNED | None. Ended assignments are not listed here. | assignment is null. |
| Lost assignment, and nothing current | 200 | Object, tag status is LOST | The most recently ended assignment, and only when it was marked lost. Otherwise the tag is UNASSIGNED. | unassigned_ts is never null. Marking a tag lost ends the assignment. |
| Subuser who cannot view the driver of the assignment | 200 | The tag is not in the list at all. It is not shown with null and it is not a 403. | The assignment is chosen first, then the permission is applied. An older assignment is never shown instead. | none |
| Tag deleted | 200 | The tag is not in the list, and neither are its assignments. A filter that only matches a deleted tag returns the empty page, not 404. | none | none |
unassigned_ts: null means the assignment has no end. assignment is null only for UNASSIGNED.
driver_tag_description, last_name and first_seen_ts can be null. first_name is never null. The tag
identification_tag_id and identification_tag, and the assignment assignment_id, driver_id and
assigned_ts, are never null. The pagination meta counts only the tags the caller can see.
Request
Responses
- 200
- 401
- 403
- 422
- 500
- 503
Successful operation
Unauthorized access. Authentication is required.
Access is forbidden. The user does not have permission to access this resource, or the account is not currently active.
Validation failed for the input parameters.
Internal server error.
Service temporarily unavailable. The request did not complete and can be retried after the number of seconds in the Retry-After header, when one is sent.
Response Headers
Seconds to wait before retrying. Sent with db_busy and db_pool_timeout.