API Overview

API Overview

General Purpose of the Safe API

Tracker clients will generally use the API for the following tasks.

Requirements for each API Request

Each request made to the SAFE webAPI will require the following

Getting a valid User Token

If you created a token for the currently logged in user, then you must logout before using the token. 

Setting a Static License

In most cases, you are going to want to peg a license to the user that was created in the previous step. This will ensure that a license is available when the interface makes a call to the SAFE webAPI. If not license is available, then the API will respond with a message that no licenses are available.

What is your Org / Office ID

From within the SAFE interface, go to Settings > Offices to see your Org and Office ID.

How often should you POST or GET

Making an API call to the database more than once a minute may cause your account to be disabled. It is highly recommended that you make (or schedule) your call every 10 minutes or so. Please contact Tracker support if you need to POST or GET more often.

What we are trying to avoid here is pulling data from the API on a constant basis when not needed. If you are posting data and it happens quickly that is not a problem.

Testing the Tracker API


2. Header Fields

3. Once these fields are in place, select ‘Send’ and verify that an item was returned (if one exists).

Make sure you have a valid item in the system before you try to select one from the webAPI or you will get no results and it might look like something is wrong.


USERS

POST & GET User Administration

Used for creating a User in User Administration and also retrieving User info

API URL = https://securelb.trackerproducts.com/api/users/

Important: Users are required to be unique across the entire system. If a duplicate email is found it will notify you in the response.

See Example Usage 


User Typeahead Search

Used to search for users in the system

API URL = https://securelb.trackerproducts.com/api/users/typeahead?searchValue

Where searchValue is the text you wish to search

See Example Usage 


ITEMS

GET Items (Including Item Updates)

This API endpoint allows for polling of all items (and updates) in the system in sequential order. Every item, or update, will be applied an ascending ID number. Program your system to poll for ID 1 and continue until you do not get a response. Once there is no response you will store the last ID that was good and start at that number for your next poll. With this you are always keeping up with new items and updates to those items.

API URL = https://securelb.trackerproducts.com/api/items/seqOrgItemHistoryId/X

Where X = SeqOrgItemHistoryID of item Important Objects Returned

SeqUpdateOrgX See Example Usage 


Item POST (Create new item)

Used to post a single item to the system. Multiple item entries will simply loop this process.

API URL = https://securelb.trackerproducts.com/api/items

See Example Usage 


Item GET (Retrieve a Specific Item)

Used to return all results of a specific (single) item.

API URL = https://securelb.trackerproducts.com/api/items/{id}

Where {id} = Item ID found in Get Item area or other API searches.


Item PUT (Edit an Item)

Used to edit a specific (single) item.

API URL = https://securelb.trackerproducts.com/api/items/{id}

Where {id} = Item ID found in Get Item area or other API searches.

See Example Item Edit 


Item(s) GET (Retrieve All Items In a Specific Case)

Used to return all results of a specific (single) item.

API URL = https://securelb.trackerproducts.com/api/cases/{id}/items

Where {id} = Case ID found in GET Case API above.


GET Item Chain of Custody

Returns chain of custody for a specific item.

API URL = https://securelb.trackerproducts.com/api/items/X/coc

Where X = the "id" value of the item which is provided in the SeqUpdateOrgID

Important: Do NOT use any nested ID's, use the root level ID.

See Example Usage


CASES

Case GET (Retrieve a Specific Case)

Used to return all results of a specific (single) case.

API URL = https://securelb.trackerproducts.com/api/cases/getByNumber?value=X

Where X = Case number entered into the system by the user.

See Example Usage 


Case POST (Create)

Used for posting a new Case record to the system.

API URL = https://securelb.trackerproducts.com/api/cases

See Info Page for all necessary info to submit to this endpoint.


Case PUT (Edit existing case)

Used for posting a updated Case record to the system.

API URL = https://securelb.trackerproducts.com/api/cases/getByNumber?value=[casenumber]

See Info Page for all necessary info to submit to this endpoint.


Case Items (get all items in a case)

Used for retrieving all items that are within a case.

API URL = https://securelb.trackerproducts.com/api/cases/8854597/items

See Get Case Items for all info on this endpoint.


PEOPLE

Person POST (Create)

Used for posting new Person, Address and/or Entry to a Case.

API URL - https://securelb.trackerproducts.com/api/people

See Info Page for all necessary info to submit to this endpoint.


Person PUT(Update existing Person)

Used for updating an existing person entry.

API URL - https://securelb.trackerproducts.com/api/people/X

Where X = ID of Person

See Info Page for all necessary info to submit to this endpoint.


POST Existing Person to Existing Case

Used for posting an existing Person to an existing Case.

API URL - https://securelb.trackerproducts.com/api/people/addpersontocase/X

See Info Page for all necessary info to submit to this endpoint.


People GET (Retrieve all People In a Specific Case)

Used to get a list of all Persons tied to a specific case.

API URL = https://securelb.trackerproducts.com/api/cases/X/peopleList/

Where X = the "PrimaryCaseID"

FYI - The API for Retrieving Specific Case Data will be need to also be used so that you can get the PrimaryCaseID to enter into this URL.

See Example Usage 


People Typeahead Search

Used to search for people in the system

API URL = https://securelb.trackerproducts.com/api/people/typeahead?searchValue

Where searchValue is the text you wish to search

See Example Usage 


People Merge

Used to merge person records in the system

API URL = https://securelb.trackerproducts.com/api/people/mergePeople/{destinationPersonId}

See Example Usage 


Add Address To Person

API URL = https://securelb.trackerproducts.com/api/people/{id of person}/addresses

See Example Usage 


GET CSV list of all Persons in Org

See Example Usage 


CUSTOM FORMS

Custom Form Data

Custom form data can be added to an existing entity[case, person, or item], and can also be added while creating an entity. See Example 

Searching custom form data.

See Example 


SEARCHING

POST Custom Searching - People

API URL = https://securelb.trackerproducts.com/api/people/search

See Example Usage 


POST Custom Searching - Items

API URL = https://securelb.trackerproducts.com/api/items/search

See Example 


POST Custom Searching - CASES

API URL = https://securelb.trackerproducts.com/api/cases/search

See Example 


GET Media Sub Folders - Cases

API URL = https://securelb.trackerproducts.com/api/cases/3515614/getMediaSubfoldersById

See Example 


POST Transaction Searches (Checkins, Checkouts, Transfers, Moves, and Disposals)

API URL = https://securelb.trackerproducts.com/api/disposals/search

See Example