Number of APIs: 29
Introduction The purpose of this document is to set the design requirements of the Application Programming Interface (API) for supporting the data integration services of the FlashTrak-RTL Web Application. The FlashTrak-RTL Wed Application is used for managing transportation conditions with the Real Time Data Loggers (RTL) of DeltaTrak. General Requirements The following general requirements shall apply to the FlashTrak Data Service:
The FlashTrak-RTL data service shall be available at data.flashtrakrtl.com via a secure connection.
The service shall respond when entering its URL in a web browser. The response shall be in the format of text such as “FlashTrak-RTL API x.x”, where x.x shall represent the current version of the API software. Any additional interaction with the service shall require Client’s Authentication.
The FlashTrak-RTL Service shall require Token string for authenticating Client’s requests. The Client must have an existing User profile in the FlashTrak-RTL Application and must be a member of the Account Administrators group i.e. a User with all access rights. The Client authentication shall be required for every transaction using the API.
A token for accessing the FlashTrak-RTL Service can be generated upon request by contacting DeltaTrak customer support.
Transactions with the services shall use JSON data objects. Every API function shall have its own JSON service end point.
GET {{baseUrl}}/status
Get current status and version of the API
GET {{baseUrl}}/shipment?tripNumber=Shipment Trip Number&shipperID=Shipper ID&receiverID=Receiver ID&status="Completed" | "Pending" | "Registered" | "Activated"&createdAt=2022-03-01 11:00&query=count&page=1&qty=10
Find Shipments that match specified criteria
■ Should pull back shipments belonging to account, plus shipments shared with
account (explicit & receiver sharing)
■ Optional filters reduce results, and no parameters return all shipments for
account (see above)
■ Should include locations, product, alarm criteria(s), and list of shipment alerts
GET {{baseUrl}}/shipment/:tripNumber/readings?qty=15&start_date=2022-11-21 11:00&end_date=2022-11-21 24:00
Gets the sensor data recorded for the requested Shipment ID
■ Returns device reading array for single shipment
■ Includes separate array of maritime/sea-rates vessel geo-locations, if exists
POST {{baseUrl}}/shipment
Creates new empty shipment record for a specific RTL Device ID. The Device ID must be free and not used for any other shipment with Incomplete status.
■ Ability to specify a single Product ID
■ Ability to specify locations (Shipper Location ID, Receiver Location ID, Airport
and Marine Port IDs, etc)
■ Available receiver locations include this account's receiver locations, plus any
receiver locations shared by receiver sharing
■ If user specifies a 3rd party receiver location, then the list of available products
to associate is limited to that receiver's locations, meaning product and receiver
location must match accounts
■ API should throw an error if the selected product doesn't match the account of
the selected receiver location.
PUT {{baseUrl}}/shipment/:tripNumber
Edit a Shipment with Incomplete status. Completed shipments shall no longer receive data from the associated Device ID.
■ Same criteria/rules as above
■ Will missing optional parameters clear that existing field in the DB, or leave that
field untouched? Think clearing is better, meaning the entire dataset is required.
PUT {{baseUrl}}/shipment/:tripNumber/complete
Edit a Shipment with Incomplete status. Completed shipments shall no longer receive data from the associated Device ID.
■ Empty body?
■ Completes the shipment, if belonging to account
■ Don't believe we need to take sharing into consideration
DELETE {{baseUrl}}/shipment/:tripNumber
Deletes a Shipment with Complete status. Deleting the Shipment shall also remove all
of its sensors’ data records.
■ Deletes the shipment (by marking in DB as deleted), if belonging to account
■ Don't believe we need to take sharing into consideration
GET {{baseUrl}}/product
List all products and shared products
■ Pulls back products belonging to account, plus products shared with account
(explicit & receiver sharing)
■ Each location node should contain the account ID that it belongs to
■ Since alarm criteria are defined at the product level, include array of alarm
criteria definitions associated with each product
GET {{baseUrl}}/location
List all locations and shared locations
■ Pulls back locations (of all types) belonging to account, plus shipments shared
with account (explicit & receiver sharing)
■ Ability to filter locations would be nice, but not required - this is typically a
smaller dataset
■ Each location node should contain the account ID that it belongs to
GET {{baseUrl}}/admin/flightmode
Get list of all shipments with Flight Mode enabled
■ Returns the flight mode details for ALL non-completed shipments with flight
mode settings
■ These results should not be tied/limited to a specific account, because it will be
called the DeltaTrak device communication services
■ There should be some special DeltaTrak API key that will be used for these
admin
calls that will be used by DT (not the customer)
POST {{baseUrl}}/account/:accountID/shipment
Create a Shipment to a specific Customer.
■ Trip Number must be created beforehand using the /trip endpoint
■ Shipment ID will be generated automatically if not provided
POST {{baseUrl}}/account/:accountID/shipment/:tripNumber/data
Send readings to the shipment.
■ t1, t2, vibration, light, location and co2 are all optional parameters.
■ proccess parameter is true by default. If sent as false, it will turn off alarms for the readings.
GET {{baseUrl}}/account/:accountID/shipment
Find Shipments that match specified criteria
■ Should pull back shipments belonging to account, plus shipments shared with
account (explicit & receiver sharing)
■ Optional filters reduce results, and no parameters return all shipments for
account (see above)
■ Should include locations, product, alarm criteria(s), and list of shipment alerts
DELETE {{baseUrl}}/account/:accountID/shipment/:shipmentID
Delete shipment and it's readings. Deleting the shipment in this endpoint would move the Trip Number back to the Customer's Inventory.
DELETE {{baseUrl}}/account/:accountID/shipment/:shipmentID/clean
Clean all shipment data and reset alarm status.
PUT {{baseUrl}}/account/:accountID/shipment/:tripNumber
POST {{baseUrl}}/account/:accountID/product
Create Product for the customer account.
GET {{baseUrl}}/account/:accountID/product
List all products and shared products
■ Pulls back products belonging to account, plus products shared with account
(receiver sharing)
■ Each location node should contain the account ID that it belongs to
■ Since alarm criteria are defined at the product level, include array of alarm
criteria definitions associated with each product
DELETE {{baseUrl}}/account/:accountID/product/:productID
Delete a product form a customer account.
Product will not be deleted if the Product is currently being used by a Shipment.
POST {{baseUrl}}/account/:accountID/location
Create a Location under the customer account.
GET {{baseUrl}}/account/:accountID/location
List all locations and shared locations
■ Pulls back locations (of all types) belonging to account, plus shipments shared
with account (explicit & receiver sharing)
■ Ability to filter locations would be nice, but not required - this is typically a
smaller dataset
■ Each location node should contain the account ID that it belongs to
DELETE {{baseUrl}}/account/:accountID/location/:locationID
Delete the Location from the customer account.
The Location will not be deleted if the Location is currently being used by a Shipment.
POST {{baseUrl}}/account
GET {{baseUrl}}/account
DELETE {{baseUrl}}/account/:accountID
POST {{baseUrl}}/account/:accountID/trip
Create a Trip Number.
GET {{baseUrl}}/account/:accountID/trip
List the Trip Numbers available in the Customer Inventory
DELETE {{baseUrl}}/account/:accountID/trip/:tripID
Permanently delete the Trip Number from the Customer Inventory
GET {{baseUrl}}/account/:accountID/carrier
List all carriers of an account
ENDPOINTS