Web APIOrders
Orders
Orders and their tracking: the transponders assigned to them, their latest positions and their recorded paths.
https://api.staging.locantra.deGet one order
https://api.staging.locantra.de/orderReturns a single order, looked up by ID or by Name. Give exactly one of them.
Create an order
https://api.staging.locantra.de/orderCreates an order and, optionally, one transponder assignment per chip code in Transponders. A chip code that is still assigned elsewhere is rejected with 409. Category and Tags classify the order; both are optional free text, and Tags are trimmed and deduplicated before they are stored.
Update an order
https://api.staging.locantra.de/orderChanges an order's name, category or tags. Name is required on every request; Category and Tags are left unchanged when the body omits them, and are cleared by an empty string and an empty array respectively.
Delete an order
https://api.staging.locantra.de/orderDeletes an order. Its active transponder assignments are ended first, in the same operation, so their chips stop being tracked under the order; an assignment that has not started yet is ended at its start. The assignments and their recorded history are kept.
Get the recorded path of an order's transponders
https://api.staging.locantra.de/order/pathReturns the recorded positions of an order's transponder assignments over time, keyed by assignment ID. ID is the order's own ID. AssignmentID filters by an assignment's own ID, not by the chip code printed on the transponder; repeat the parameter for several, at most 200 per request. Limit (default 100, maximum 1000) caps the positions returned per assignment.
Get the latest position of every transponder on an order
https://api.staging.locantra.de/order/pings/latestReturns the most recent recorded position of each transponder assignment on one order, keyed by assignment ID. ID is the order's own ID. AssignmentID filters by an assignment's own ID, not by the chip code printed on the transponder; repeat the parameter for several, at most 200 per request. Each row's Online says whether the latest ping was recorded within your organisation's online window (setting devices.online_window, default 30 minutes).
Get the latest position of one transponder assignment
https://api.staging.locantra.de/order/positionReturns the most recent recorded position of one transponder assignment. AssignmentID is the assignment's own ID, not the chip code printed on the transponder. Online says whether the latest ping was recorded within your organisation's online window (setting devices.online_window, default 30 minutes).
Get an order with its transponder assignments
https://api.staging.locantra.de/order/summaryReturns one order together with every transponder assignment that belongs to it.
List orders
https://api.staging.locantra.de/ordersLists the orders of your organisation. Give at least one filter or All=true. ID, Name and CreatedBy each take at most 200 values per request. Category selects orders in any of the given categories and Tag orders carrying at least one of the given tags; each takes at most 50 values per request. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total match count. Search matches name, ID, tags and chip codes; State selects Active, Ended, NoAssignments or Stale orders, and the envelope's Counts give the size of every state for the same request without State. An unknown OrderField is a 400. IncludeActivity=true returns order activity summaries instead of plain orders.
Classify several orders
https://api.staging.locantra.de/ordersSets the category, the tags or both on each order in ID (at most 200), as an order update does: Category and Tags are left unchanged when the body omits them, are cleared by an empty string and an empty array respectively, and Tags replace the order's tags. Give at least one of them. The transponder assignments' own classification is not touched. Each order is handled on its own: Data.Results has one entry per ID, in request order, with Outcome Done, Unchanged (the order already has these values) or Failed with Reason OrderNotFound (no order of your organisation has this ID) or OrderActionFailed (retry it).
Delete several orders
https://api.staging.locantra.de/ordersDeletes each order in ID (repeat the parameter, at most 200). As with a single delete, each order's active transponder assignments are ended first, in the same operation (one not started yet at its start); the assignments and their recorded history are kept. Each order is handled on its own: Data.Results has one entry per ID, in request order, with Outcome Done (Count assignments ended), Unchanged (no order of your organisation has this ID, for example because it was already deleted, so a retry is safe) or Failed with Reason OrderActionFailed (retry it).
List orders with their tracking activity
https://api.staging.locantra.de/orders/activityLists orders enriched with detection counts and the latest recorded position, for sorting by real activity rather than by administrative changes. Results are paged with Limit (default 100, maximum 1000) and Offset. LatestAssignmentID is an assignment's own ID; LatestTransponderID is the physical chip code. LatestGeoFenceID is the zone of the latest detection and GeoFenceCounts how many transponders were last detected in each zone. Search, State and Counts work as on GET /orders; Stale is an Active order with no detection within your organisation's online window (setting devices.online_window, default 30 minutes).