Returns the latest location of the tags on an air waybill (AWB), or the latest location and environmental readings of a device identified by its asset barcode.
Headers. customer_id and authorized_groups (plural) are required; they select the account whose data is returned.
Two modes, chosen by the event query parameter. Send either no event or event=sensor. Other values are not supported; do not send them.
AWB mode (no event). asset_id is the AWB number.
- Every active tag on the AWB in your account is considered. For each tag, its latest event is used (activation and end-of-journey events are not counted).
- A tag is returned only if that latest event has a position (latitude and longitude), a location and a facility; tags without one are left out. A latitude or longitude of exactly
0counts as no position. event_typeiscargoiq-<STATUS>when the event carries a Cargo iQ status (for examplecargoiq-RCS), otherwiselocation.- If no tag can be returned, the response is
404 AWB not found.
Sensor mode (event=sensor). asset_id is a device asset barcode.
- The latest event (activation and end-of-journey events are not counted) of a device with that asset barcode in your account is returned with six environmental readings, always in this order:
ambient_temp,probe_temp,shock,humidity,pressure,light. - A reading the device did not report is returned as
0, notnull. event_typeis alwaysenvironment.- Only the single latest event is considered. If it has no position (latitude and longitude; a value of exactly
0counts as none), location or facility, nothing is returned, even when older events have one. - When there is nothing to return, the response is
200withassets: []. Sensor mode never returns404.
Timestamps. timestamp is the event time as local wall-clock time in the event's time zone, format YYYY-MM-DDTHH:mm:ss, with no offset and no Z. The zone is given in time_zone as an IANA name; it is Etc/UTC when the event's time zone is not known.
Units. °C for ambient_temp and probe_temp, g for shock, % for humidity, Pa for pressure, lx for light.
Error messages (this endpoint returns a message, not an error_code):
| Status | message | What to do |
|---|---|---|
| 400 | Missing required headers: customer_id or authorized_groups | Send both headers (note the plural authorized_groups). |
| 404 | AWB not found | AWB mode only: no active tag on this AWB in your account has a latest event with a position, location and facility. Check the AWB number and headers; a newly labelled AWB has no location until its tags report one. |
A temporary server fault while reading the data is reported the same way as no data: 404 AWB not found in AWB mode, 200 with assets: [] in sensor mode. If an asset you expect to have a location returns one of these, retry once with backoff before treating the result as final.
Retries. Read-only; safe to repeat.
- Mock serverhttps://docs.trackonomy.com/_mock/external-api/trackonomy-external-api/external/locations/{asset_id}
- Productionhttps://api.trackonomy.com/external/locations/{asset_id}
- PPE (integration testing)https://ppe.api.trackonomy.com/external/locations/{asset_id}
curl --request GET \
--url 'https://ppe.api.trackonomy.com/external/locations/00612345675?event=sensor' \
--header 'Authorization: Bearer <access_token>' \
--header 'customer_id: acme' \
--header 'authorized_groups: acme-air'AWB mode: one entry per returned tag (at least one). Sensor mode: at most one entry, with a sensors array, or an empty assets array.
Fixed value, the same on every response (not a request ID).
Trackonomy's vendor ID, the same on every response.
GET /external/locations/00612345675. One tag whose latest event carries a Cargo iQ status.
{ "version": "1.0.0", "uuid": "a51799fa-4765-4f9c-9460-2d44fc2fe27f", "vendor_id": "c59f7130-e0b7-4aff-ac6e-a97dcfbd9222", "assets": [ { … } ] }