Using REST APIs with Device Manager
Smart Inventory Tracker registers devices by capturing information related to one or more devices through the REST API and responds with an environment URL that must be installed on each device to enable secure connections to the TraceLink Track & Trace Services. Registering devices authorizes communication with TraceLink applications (e.g. Smart Inventory Tracker).
 Devices can also be registered through the
 Devices can also be registered through the Authentication
The Smart Inventory Tracker REST APIs support user-based authentication using HTTP Basic Authentication.
 URL
URL
                                                Use a Post request to the following URL:
- itest: itestmsapi.us1.tracelink.com/etapi/basic/itest/devmgr/device-management/manage
- prod: msapi.us1.tracelink.com/etapi/basic/prod/devmgr/device-management/manage
 Header key-value pairs
Header key-value pairs
                                                - Content-Type – The media type for the message. Valid value is "application/json".
- Authorization – The Administrator's username and password, encoded using Base64. If the message is sent through Postman, select Basic Auth on the Authorization tab to enter the Administrator's username and password. These credentials are encrypted and added to the header. 
Prerequisites
- The company owns Smart Inventory Tracker, in addition to Serialized Operations Manager, Smart Event Manager, or both.
- The company has configured internal locations. See the Company Administration Online Help for more information.
- The internal locations are linked to Smart Inventory Tracker to configure location-specific options (optional). See the Management Online Help for more information.
HTTP response status codes
 Successful response
Successful response
                                                | 200 | OK. The request was successful. For GET, this means that the resource has been fetched. | 
 Redirect message
Redirect message
                                                | 307 | Temporary Redirect. The client must get the requested resource at another URI with the same HTTP method that was used in the prior request. | 
 Client error status codes
Client error status codes
                                                | 400 | Bad Request. The server could not understand the request due to invalid syntax. | 
| 401 | Unauthorized. The client is unauthenticated, not allowed access, and should re-request credentials. | 
| 403 | Forbidden. The request is valid and the client is authenticated, but the client is not allowed access rights to the content for any reason. | 
| 404 | Not Found. The server cannot find the requested item. This can also mean that the endpoint is valid but the resource does not exist. | 
 Server error status codes
Server error status codes
                                                | 500 | Internal Server Error. The server has encountered an unknown error. | 
| 502 | Bad Gateway. The server is working as a gateway to handle the request and received an invalid response. | 
| 503 | Service Unavailable. The server is not ready to handle the request. | 
| 504 | Gateway Timeout. The server is acting as a gateway and cannot get a response in time. | 
How to read the guidelines table
 Body guidelines
Body guidelines
                                                - Element – The field name designated by the request or response guidelines.
- Type – The type of data format required for the value.
- Update – Indicates whether the value can be updated in a later request.
- Description – A description of the value, including its format and acceptable values, if needed.
Device Manager API
Administrators for the company that owns Smart Inventory Tracker send the Device Manager Request to provide information for devices that need authentication. The Device Manager Response contains the list of devices successfully registered or updated, or errors indicating why the device could not be authenticated. The authentication certificates must then be installed on each device. Download the Smart Inventory Tracker Installation Qualification Document for more information.



