API - Custom Search - Items

SEARCH BASICS

SEARCH CRITERIA

The body of a search request must include a search criteria. These criteria Ids are used in the "searchCriteria" property of the request body. The criteria are different depending on the field. For easier reference, the search criteria can be broken down into the following groups:

Group 1 - TEXT FIELDS

Text Fields can be searched with the following criteria:

- Equals, Not Equals, Starts With, Text Search

These criteria are represented as follows:

Equals:

{

"id": 0,

},

Not Equals

{

"id": 1,

},

Starts With

{

"id": 2,

},

Text Search

{

"id": 25,

}

Group 2 - DATE FIELDS

Date Fields can be searched with the following criteria:

( Note - X is number of days)

- Before, After, Between, Exactly, Newer than X, Older than X, Between X and Y, Current Week, Last Week, Month To Date, Last Month, Year To Date, Last Year

These criteria are represented as follows:

Before

{

"id": 6,

},

After

{

"id": 7,

},

Between

{

"id": 8,

},

Exactly

{

"id": 13,

},

Newer Than

{

"id": 12,

},

Older Than

{

"id": 11,

},

Between X and Y

{

"id": 18,

},

Current Week

{

"id": 19,

},

LastWeek

{

"id": 20,

},

Month To Date

{

"id": 21,

},

Last Month

{

"id": 22,

},

Year To Date

{

"id": 23,

},

Last Year

{

"id": 24,

}

Group 3 - DROPDOWN FIELDS

Dropdown fields can be searched with the following criteria:

- Equals, Not Equals, Select All

These criteria are represented as follows

Equals

{

"id": 0,

},

Not Equals

{

"id": 1,

},

Select All is the default and does not need to be specified in the search request body.

Group 4 - BOOLEAN FIELDS

Boolean fields (true or false) can be searched with the following criteria:

- Equals, Not Equals

These criteria are represented as follows:

Equals

{

"id": 0,

},

Not Equals

{

"id": 1,

},

Field Types

Field Types are specified using Ids, and are included in the body as "typeId"

These are the field types and their Ids:

ITEMS SEARCH

The following fields can be searched for items:

Note the field name in parentheses - this will be used in our search request Json body

Group 1 - Text Fields

Group 2 Date Searches

Group 3 Dropdown Fields

Group 4 Boolean Fields

       

Examples

Here is the endpoint for an item search:

This is a POST request.

https://securelb.trackerproducts.com/api/items/search

Text Field Search With A Date Restriction

Here is the body for a search with a text field.

We are searching the description field with a value of "bottle" using the text search criteria type.

This value is added in the "model" property of the request body

Note that for "searchCriteria" we need to only provide the criteria id

Also note the "typeId" property is the field type as outlined above.

We are also searching a created date after 06-01-2018.

The "typeId" is now changed to the value corresponding to field type date

Note that "model" is the date of the search is the to date.

Also, dates can be searched with just day, month, and year or can be a full date with time.

So, the "model" below could also be "2018-06-01"

POST - https://securelb.trackerproducts.com/api/items/search

{ "tags": [],

"IsSearchingInSublocations": false,

"DynamicFields": [],

"StaticFields": [

{

"name": "ITEM_DATE_CREATED",

"typeId": 2,

"fieldName": "DateCreated",

"searchCriteriasType": 2,

"searchCriterias": [],

"searchCriteria": 7,

"toDate": null,

"model": "2018-06-01T04:00:00.000Z"

},

{

"name": "ITEM_DESCRIPTION",

"typeId": 1,

"fieldName": "Description",

"searchCriterias": [],

"searchCriteria": 25,

"model": "bottle"

},

{

"name": "NAV.TAGS",

"typeId": 5,

"fieldName": "Tags",

"searchCriteriasType": 1,

"typeAheadTemplate": "",

"searchCriterias": [],

"searchCriteria": 0,

"model": "tags"

},

{

"name": "SEARCH.OFFICE_SELECTION",

"typeId": 7,

"fieldName": "OfficeSelection",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "offices"

},

"searchCriterias": [],

"selectedOffices": [],

"model": [

{

"id": 1,

"name": "Tracker Products - 1 Office",

"selected": true

},

{

"id": 231,

"name": "Tracker Products - 231 Office",

"selected": true

}

],

"searchCriteria": 0

}

],

"officeIds": [

1,

231

],

"orderBy": "PrimaryCaseNumber",

"orderByAsc": true,

"PageSize": 100,

"peopleIds": [ ],

"PageNumber": 1,

"SavedSearchEntities": [ ]

}


This search returned 7 items, here is a sample of the data returned:

{

"count": 7,

"data": [

{

"formDataParsed": [],

"sequentialCaseId": "1",

"sequentialCaseIdNested": {

"section": 1,

"nested": null

},

"barcode": "8e9c1a40-18d6-477d-89fc-63bae6e93e76",

"description": "empty bottle",

"recoveryDate": "2018-06-14T04:00:00Z",

"recoveryLocation": "Newport, KY, USA",

"active": true,

"locationId": 45986,

"location": "Drawer 2",

"lastLocationId": 45986,

"lastLocation": "Drawer 2",

"statusId": 1,

"status": "Checked In",

"categoryId": 138,

"category": "Accessory",

"custodyReasonId": 5,

"custodyReason": "Evidence",

"recoveredById": 1,

"recoveredBy": "Jack Sparrow",

"submittedById": 1,

"submittedBy": "Jack Sparrow",

"custodianId": null,

"custodian": null,

"currentOfficeId": 1,

"primaryCaseId": 2933683,

"primaryCaseNumber": "2018-0614-01",

"primaryCaseOfficer": "Jack 3176D103FF Sparrow",

"isPrimaryCaseRestricted": false,

"make": null,

"model": null,

"serialNumber": null,

"creatingOrgId": 1,

"dateCreated": "2018-06-14T13:07:16.958Z",

"loaningOrgId": null,

"incomingOrgId": null,

"sequentialOrgId": 151006,

"cases": [

2933683

],

"caseModels": [],

"media": null,

"mediaAmount": 0,

"rootMediaFolderId": 0,

"formData": null,

"formDataAmount": 0,

"notes": [],

"notesAmount": 0,

"tags": [],

"tagsAmount": 0,

"barcodes": [],

"barcodesAmount": 0,

"id": 4932612,

"sqlId": 4801402,

"people": null,

"peopleIds": [],

"peopleNames": null,

"parentItemId": null,

"parentItemDescription": null,

"parentSequentialOrgId": null,

"childItems": [],

"childItemsAmount": 0,

"tasks": null,

"tasksAmount": 0,

"historiesAmount": 0,

"isForbidden": false

},

{

)

Group 2 - Date Fields

Here is a search for items with a created date in the last 7 days:

Note that the "model" is not needed for this search type.

POST - https://securelb.trackerproducts.com/api/items/search

{

"tags": [ ],

"IsSearchingInSublocations": false,

"DynamicFields": [ ],

"StaticFields": [

{

"name": "ITEM_DATE_CREATED",

"typeId": 2,

"fieldName": "DateCreated",

"searchCriteriasType": 2,

"searchCriterias": [],

"searchCriteria": 20,

"toDate": null

},

{

"name": "NAV.TAGS",

"typeId": 5,

"fieldName": "Tags",

"searchCriteriasType": 1,

"typeAheadTemplate": "",

"searchCriterias": [],

"searchCriteria": 0,

"model": "tags"

},

{

"name": "SEARCH.OFFICE_SELECTION",

"typeId": 7,

"fieldName": "OfficeSelection",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "offices"

},

"searchCriterias": [],

"selectedOffices": [],

"model": [

{

"id": 1,

"name": "Tracker Products - 1 Office",

"selected": true

},

{

"id": 231,

"name": "Tracker Products - 231 Office",

"selected": true

}

],

"searchCriteria": 0

}

],

"officeIds": [

1,

231

],

"orderBy": "PrimaryCaseNumber",

"orderByAsc": true,

"PageSize": 100,

"peopleIds": [ ],

"PageNumber": 1,

"SavedSearchEntities": [

{

"name": "SEARCH.SAVED_SEARCH.CASES",

"typeId": 3,

"fieldName": "SavedSearchId_cases",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "cases"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

},

{

"id": 919,

"name": "All Cases"

},

{

"id": 37034,

"name": "Case Officer Mike"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.DISPOSALS",

"typeId": 3,

"fieldName": "SavedSearchId_disposals",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "disposals"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.CHECKINS",

"typeId": 3,

"fieldName": "SavedSearchId_checkins",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "checkins"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.CHECKOUTS",

"typeId": 3,

"fieldName": "SavedSearchId_checkouts",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "checkouts"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.MOVES",

"typeId": 3,

"fieldName": "SavedSearchId_moves",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "moves"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.TRANSFERS",

"typeId": 3,

"fieldName": "SavedSearchId_transfers",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "transfers"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

}

]

}

And here is a sample of the returned data for this request: {

"count": 4,

"data": [

{

"formDataParsed": [

{

"value": "123456",

"searchName": "816.field2765",

"customFormId": 816,

"customFormName": "Test 2",

"fieldName": null,

"fieldType": "text",

"name": "Test Item Form",

"text": null

}

],

"sequentialCaseId": "3",

"sequentialCaseIdNested": {

"section": 3,

"nested": null

},

"barcode": "edc68cb1-f74a-41ab-a792-a27a39b61e5e",

"description": "iphone",

"recoveryDate": "2018-07-30T04:00:00Z",

"recoveryLocation": "Norwood, OH, USA",

"active": true,

"locationId": 45986,

"location": "Drawer 2",

"lastLocationId": 45986,

"lastLocation": "Drawer 2",

"statusId": 1,

"status": "Checked In",

"categoryId": 28,

"category": "Cellular Phone",

"custodyReasonId": 5,

"custodyReason": "Evidence",

"recoveredById": 1,

"recoveredBy": "Jack Sparrow",

"submittedById": 1,

"submittedBy": "Jack Sparrow",

"custodianId": null,

"custodian": null,

"currentOfficeId": 1,

"primaryCaseId": 2933700,

"primaryCaseNumber": "2018-0730-01",

"primaryCaseOfficer": "Jack 3176D103FF Sparrow",

"isPrimaryCaseRestricted": false,

"make": null,

"model": null,

"serialNumber": null,

"creatingOrgId": 1,

"dateCreated": "2018-07-30T15:08:41.103Z",

"loaningOrgId": null,

"incomingOrgId": null,

"sequentialOrgId": 151051,

"cases": [

2933700

],

"caseModels": [],

"media": null,

"mediaAmount": 0,

"rootMediaFolderId": 0,

"formData": null,

"formDataAmount": 1,

"notes": [],

"notesAmount": 0,

"tags": [

{

"tagModelId": 12406,

"name": "Phone"

}

],

"tagsAmount": 1,

"barcodes": [],

"barcodesAmount": 0,

"id": 4935657,

"sqlId": 4811445,

"people": null,

"peopleIds": [],

"peopleNames": null,

"parentItemId": null,

"parentItemDescription": null,

"parentSequentialOrgId": null,

"childItems": [],

"childItemsAmount": 0,

"tasks": null,

"tasksAmount": 0,

"historiesAmount": 0,

"isForbidden": false

},

{


Group 3 - Dropdown Fields

In order to search these fields you will first need to get the Ids that will be used as our "model" values

For example, if you would like to do a search on the status field for items, first make a GET to the api to aquire the options for item status.

Here is a call to retrieve Item Status options:

GET - https://securelb.trackerproducts.com/api/itemstatus



This returns the following data:

[

{

"id": 1,

"name": "Checked In"

},

{

"id": 2,

"name": "Checked Out"

},

{

"id": 3,

"name": "Disposed"

},

{

"id": 4,

"name": "na"

}

]


In order ot search for one of the drop down values for item status, pass the corresponding id in the model for the Item Status field. Here is an example of a search for Items with a status of checked in:

POST - https://securelb.trackerproducts.com/api/items/search


Here is the body of the POST:

{

"tags": [],

"IsSearchingInSublocations": false,

"DynamicFields": [],

"StaticFields": [

{

"name": "ITEM_STATUS",

"typeId": 3,

"fieldName": "StatusId",

"searchCriteriasType": 1,

"dropdownEntities": {

"entity": "itemstatus",

"options": ""

},

"searchCriterias": [],

"dropdownValues": [ ],

"searchCriteria": 0,

"model": 1

},

{

"name": "NAV.TAGS",

"typeId": 5,

"fieldName": "Tags",

"searchCriteriasType": 1,

"typeAheadTemplate": "",

"searchCriterias": [ ],

"searchCriteria": 0,

"model": "tags"

},

{

"name": "SEARCH.OFFICE_SELECTION",

"typeId": 7,

"fieldName": "OfficeSelection",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "offices"

},

"searchCriterias": [

{

"id": 0,

"name": "TP_SEARCH.SEARCH_CRITERIA.EQUALS"

}

],

"selectedOffices": [ ],

"model": [

{

"id": 1,

"name": "Tracker Products - Local - 1 Office, LLC",

"selected": true

},

{

"id": 231,

"name": "Tracker Products - Local - 231 Office",

"selected": true

}

],

"searchCriteria": 0

}

],

"officeIds": [

1,

231

],

"orderBy": "PrimaryCaseNumber",

"orderByAsc": false,

"PageSize": 25,

"peopleIds": [ ],

"PageNumber": 1,

"clientDate": "2020-06-08T18:32:35.044Z",

"clientTz": "America/New_York",

"timezoneOffset": 240,

"SavedSearchEntities": []

}


Dropdown fields can also be searched with not equals criteria.


Here is a search of all items that do NOT have a status of Checked In:

POST - https://securelb.trackerproducts.com/api/items/search


Here is the body of the POST:

{

"tags": [],

"IsSearchingInSublocations": false,

"DynamicFields": [],

"StaticFields": [

{

"name": "ITEM_STATUS",

"typeId": 3,

"fieldName": "StatusId",

"searchCriteriasType": 1,

"dropdownEntities": {

"entity": "itemstatus",

"options": ""

},

"searchCriterias": [],

"dropdownValues": [ ],

"searchCriteria": 1,

"model": 1

},

{

"name": "NAV.TAGS",

"typeId": 5,

"fieldName": "Tags",

"searchCriteriasType": 1,

"typeAheadTemplate": "",

"searchCriterias": [ ],

"searchCriteria": 0,

"model": "tags"

},

{

"name": "SEARCH.OFFICE_SELECTION",

"typeId": 7,

"fieldName": "OfficeSelection",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "offices"

},

"searchCriterias": [

{

"id": 0,

"name": "TP_SEARCH.SEARCH_CRITERIA.EQUALS"

}

],

"selectedOffices": [ ],

"model": [

{

"id": 1,

"name": "Tracker Products - Local - 1 Office, LLC",

"selected": true

},

{

"id": 231,

"name": "Tracker Products - Local - 231 Office",

"selected": true

}

],

"searchCriteria": 0

}

],

"officeIds": [

1,

231

],

"orderBy": "PrimaryCaseNumber",

"orderByAsc": false,

"PageSize": 25,

"peopleIds": [ ],

"PageNumber": 1,

"clientDate": "2020-06-08T18:32:35.044Z",

"clientTz": "America/New_York",

"timezoneOffset": 240,

"SavedSearchEntities": []

}


Group 4 - Boolean Fields

Boolean fields can be searched by specifying true or false in the "model" property of the search request body.

Tags Searches (items)

Tags can be searched for items and cases. In order to search with tags you must provide corresponding ids for the tag(s) you wish to search.

Here is an endpoint which will return tags in your organization:

GET - https://securelb.trackerproducts.com/api/tagModels



This will return an array of Tags like the following:

[

{

"itemsCount": 1,

"casesCount": 4,

"id": 12422,

"name": "9246-1",

"color": "#4b749b",

"organizationId": 380,

"organization": null,

"active": true,

"savedSearch": null

},

{

"itemsCount": 0,

"casesCount": 2,

"id": 12423,

"name": "9246-2",

"color": "#9b4b6d",

"organizationId": 380,

"organization": null,

"active": true,

"savedSearch": null

},

{

"itemsCount": 0,

"casesCount": 2,

"id": 12424,

"name": "9246-3",

"color": null,

"organizationId": 380,

"organization": null,

"active": true,

"savedSearch": null

}

]


Now we can search for items with the tag "9246-1"

POST - https://securelb.trackerproducts.com/api/items/search

{

"tags": [

12422

],

"IsSearchingInSublocations": false,

"DynamicFields": [ ],

"StaticFields": [

{

"name": "NAV.TAGS",

"typeId": 5,

"fieldName": "Tags",

"searchCriteriasType": 1,

"typeAheadTemplate": "",

"searchCriterias": [ ],

"searchCriteria": 0,

"model": "tags",

"tags": [

{

"savedSearch": null,

"id": 12422,

"name": "9246-1",

"color": "#4b749b",

"organizationId": 380,

"organization": null,

"active": true

}

]

},

{

"name": "SEARCH.OFFICE_SELECTION",

"typeId": 7,

"fieldName": "OfficeSelection",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "offices"

},

"searchCriterias": [ ],

"selectedOffices": [ ],

"model": [ ],

"searchCriteria": 0

}

],

"officeIds": [

10612,

10613

],

"orderBy": "PrimaryCaseNumber",

"orderByAsc": false,

"PageSize": 25,

"peopleIds": [ ],

"PageNumber": 1,

"clientDate": "2020-07-16T21:10:43.636Z",

"clientTz": "America/New_York",

"timezoneOffset": 240,

"SavedSearchEntities": [ ]

}



This returns the following item:

{

"count": 1,

"data": [

{

"checkoutReason": null,

"checkoutDate": null,

"checkoutTo": null,

"checkoutExpectedReturnDate": null,

"checkoutNotes": null,

"disposalMethod": null,

"disposalDate": null,

"disposedBy": null,

"disposalUser": null,

"disposalNotes": null,

"witness": null,

"formDataParsed": [],

"sequentialCaseId": "1",

"sequentialCaseIdNested": {

"section": 1,

"nested": null

},

"barcode": "7d514daa-7afb-4026-9f17-a9a377f4b73e",

"description": "Test Item",

"recoveryDate": "2020-07-10T16:00:00Z",

"recoveryLocation": "Newport, KY",

"recoveryLocationLatitude": null,

"recoveryLocationLongitude": null,

"active": true,

"locationId": 166917,

"location": "root",

"fullLocation": "root",

"lastLocationId": null,

"lastLocation": null,

"statusId": 1,

"status": "Checked In",

"categoryId": 31,

"category": "Alcohol",

"custodyReasonId": 5,

"custodyReason": "Evidence",

"recoveredById": 1716185,

"recoveredBy": "Test User",

"submittedById": 37709,

"submittedBy": "Fernando Ortiz",

"custodianId": null,

"custodian": null,

"currentOfficeId": 10612,

"currentOfficeName": "Office 1",

"primaryCaseId": 2934621,

"primaryCaseNumber": "2020-0710-04",

"primaryCaseOfficerId": 37710,

"primaryCaseOfficer": "Test User",

"primaryCaseOffenseTypeId": 158,

"primaryCaseOffenseType": "Accident",

"isPrimaryCaseRestricted": false,

"make": null,

"model": null,

"serialNumber": null,

"creatingOrgId": 380,

"dateCreated": "2020-07-10T16:00:00Z",

"loaningOrgId": null,

"incomingOrgId": null,

"sequentialOrgId": 7,

"cases": [

2934621

],

"caseModels": [],

"media": null,

"mediaAmount": 0,

"rootMediaFolderId": 0,

"formData": null,

"formDataAmount": 0,

"notes": [],

"notesAmount": 0,

"tags": [

{

"tagModelId": 12422,

"name": "9246-1",

"color": "#4b749b"

}

],

"tagsAmount": 1,

"barcodes": null,

"barcodesAmount": 0,

"id": 5250216,

"sqlId": 4912296,

"people": null,

"peopleIds": null,

"peopleNames": null,

"peopleGuids": null,

"parentItemId": null,

"parentItemDescription": null,

"parentSequentialOrgId": null,

"childItems": [],

"childItemsAmount": 0,

"tasks": null,

"tasksAmount": 0,

"historiesAmount": 0,

"isForbidden": false

}

]

}


Multiple tag searches can be done as well. Note that specifying multiple tags is an AND search.

So in the follwing search I will only get results where both tags are attached to an item:

Here I will search for items with tag "9246-1" and "9246-2"

POST - https://securelb.trackerproducts.com/api/items/search

{

"tags": [

12422, 12423

],

"IsSearchingInSublocations": false,

"DynamicFields": [ ],

"StaticFields": [

{

"name": "NAV.TAGS",

"typeId": 5,

"fieldName": "Tags",

"searchCriteriasType": 1,

"typeAheadTemplate": "",

"searchCriterias": [ ],

"searchCriteria": 0,

"model": "tags",

"tags": [

{

"savedSearch": null,

"id": 12422,

"name": "9246-1",

"color": "#4b749b",

"organizationId": 380,

"organization": null,

"active": true

},

            {

                     "savedSearch": null,

                     "id": 12423,

                     "name": "9246-2",

                     "color": "#9b4b6d",

                     "organizationId": 380,

                     "organization": null,

                     "active": true

            }

]

},

{

"name": "SEARCH.OFFICE_SELECTION",

"typeId": 7,

"fieldName": "OfficeSelection",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "offices"

},

"searchCriterias": [ ],

"selectedOffices": [ ],

"model": [ ],

"searchCriteria": 0

}

],

"officeIds": [

10612,

10613

],

"orderBy": "PrimaryCaseNumber",

"orderByAsc": false,

"PageSize": 25,

"peopleIds": [ ],

"PageNumber": 1,

"clientDate": "2020-07-16T21:10:43.636Z",

"clientTz": "America/New_York",

"timezoneOffset": 240,

"SavedSearchEntities": [ ]

}



This returns the following item with both tags:

{

"count": 1,

"data": [

{

"checkoutReason": null,

"checkoutDate": null,

"checkoutTo": null,

"checkoutExpectedReturnDate": null,

"checkoutNotes": null,

"disposalMethod": null,

"disposalDate": null,

"disposedBy": null,

"disposalUser": null,

"disposalNotes": null,

"witness": null,

"formDataParsed": [],

"sequentialCaseId": "1",

"sequentialCaseIdNested": {

"section": 1,

"nested": null

},

"barcode": "7d514daa-7afb-4026-9f17-a9a377f4b73e",

"description": "Test Item",

"recoveryDate": "2020-07-10T16:00:00Z",

"recoveryLocation": "Newport, KY",

"recoveryLocationLatitude": null,

"recoveryLocationLongitude": null,

"active": true,

"locationId": 166917,

"location": "root",

"fullLocation": "root",

"lastLocationId": null,

"lastLocation": null,

"statusId": 1,

"status": "Checked In",

"categoryId": 31,

"category": "Alcohol",

"custodyReasonId": 5,

"custodyReason": "Evidence",

"recoveredById": 1716185,

"recoveredBy": "Test User",

"submittedById": 37709,

"submittedBy": "Fernando Ortiz",

"custodianId": null,

"custodian": null,

"currentOfficeId": 10612,

"currentOfficeName": "Office 1",

"primaryCaseId": 2934621,

"primaryCaseNumber": "2020-0710-04",

"primaryCaseOfficerId": 37710,

"primaryCaseOfficer": "Test User",

"primaryCaseOffenseTypeId": 158,

"primaryCaseOffenseType": "Accident",

"isPrimaryCaseRestricted": false,

"make": null,

"model": null,

"serialNumber": null,

"creatingOrgId": 380,

"dateCreated": "2020-07-10T16:00:00Z",

"loaningOrgId": null,

"incomingOrgId": null,

"sequentialOrgId": 7,

"cases": [

2934621

],

"caseModels": [],

"media": null,

"mediaAmount": 0,

"rootMediaFolderId": 0,

"formData": null,

"formDataAmount": 0,

"notes": [],

"notesAmount": 0,

"tags": [

{

"tagModelId": 12422,

"name": "9246-1",

"color": "#4b749b"

},

{

"tagModelId": 12423,

"name": "9246-2",

"color": "#9b4b6d"

}

],

"tagsAmount": 2,

"barcodes": null,

"barcodesAmount": 0,

"id": 5250216,

"sqlId": 4912296,

"people": null,

"peopleIds": null,

"peopleNames": null,

"peopleGuids": null,

"parentItemId": null,

"parentItemDescription": null,

"parentSequentialOrgId": null,

"childItems": [],

"childItemsAmount": 0,

"tasks": null,

"tasksAmount": 0,

"historiesAmount": 0,

"isForbidden": false

}

]

}

Special Searches (items)

We recently changed the format in which we return custom search item data. Clients who have created integrations with this format can still receive search request data as before by using the following endpoint.

The difference here is the format in which this endpoint returns custom form data.

The body of this request will be slightly different if searching on a textfield. The available search criteria for this endpoint are as follows:

- Equals, Not Equals, Contains

These criteria are represented as follows:

Equals:

{

"id": 0,

},

Not Equals

{

"id": 1,

},

Contains

{

"id": 4,

},

POST - https://securelb.trackerproducts.com/api/items/searchMongo

And here is the body of the request: {

"tags": [],

"IsSearchingInSublocations": false,

"DynamicFields": [

],

"StaticFields": [

{

"name": "ITEM_DATE_CREATED",

"typeId": 2,

"fieldName": "DateCreated",

"searchCriteriasType": 2,

"searchCriterias": [],

"searchCriteria": 7,

"toDate": null,

"model": "2018-05-01T04:00:00.000Z"

},

{

"name": "ITEM_DESCRIPTION",

"typeId": 1,

"fieldName": "Description",

"searchCriterias": [],

"searchCriteria": 4,

"model": "bottle"

},

{

"name": "NAV.TAGS",

"typeId": 5,

"fieldName": "Tags",

"searchCriteriasType": 1,

"typeAheadTemplate": "",

"searchCriterias": [],

"searchCriteria": 0,

"model": "tags"

},

{

"name": "SEARCH.OFFICE_SELECTION",

"typeId": 7,

"fieldName": "OfficeSelection",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "offices"

},

"searchCriterias": [],\ "selectedOffices": [],

"model": [

{

"id": 1,

"name": "Tracker Products - 1 Office",

"selected": true

},

{

"id": 231,

"name": "Tracker Products - 231 Office",

"selected": true

}

],

"searchCriteria": 0

}

],

"officeIds": [

1,

231

],

"orderBy": "PrimaryCaseNumber",

"orderByAsc": true,

"PageSize": 100,

"peopleIds": [

],

"PageNumber": 1,\ "SavedSearchEntities": [

{

"name": "SEARCH.SAVED_SEARCH.CASES",

"typeId": 3,

"fieldName": "SavedSearchId_cases",\ "searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "cases"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

},

{

"id": 919,

"name": "All Cases"

},

{

"id": 920,

"name": "All Cases Last 365 Days"

},

{

"id": 37034,

"name": "Case Officer Mike"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.DISPOSALS",

"typeId": 3,

"fieldName": "SavedSearchId_disposals",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "disposals"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.CHECKINS",

"typeId": 3,

"fieldName": "SavedSearchId_checkins",

"searchCriteriasType": 5,\ "dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "checkins"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.CHECKOUTS",

"typeId": 3,

"fieldName": "SavedSearchId_checkouts",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "checkouts"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.MOVES",

"typeId": 3,

"fieldName": "SavedSearchId_moves",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "moves"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

},

{

"name": "SEARCH.SAVED_SEARCH.TRANSFERS",

"typeId": 3,

"fieldName": "SavedSearchId_transfers",

"searchCriteriasType": 5,

"dropdownEntities": {

"entity": "SavedSearches",

"options": {

"model": "transfers"

}

},

"searchCriterias": [],

"dropdownValues": [

{

"id": null,

"name": "Select all"

}

],

"searchCriteria": 0

}

]

}


This returns the following results: {

"count": 20,

"data": [

{

"formDataParsed": [

{

"value": "123456",

"searchName": "816.field2765",

"customFormId": 816,

"customFormName": "Test 2",

"fieldName": null,

"fieldType": "text",

"name": "Test Item Form",

"text": null

}

],

"sequentialCaseId": "1",

"sequentialCaseIdNested": {

"section": 1,

"nested": null

},

"barcode": "93946b8c-9846-4d60-8456-64cdf6bd99d8",

"description": "empty bottle",

"recoveryDate": "2018-05-11T04:00:00Z",

"recoveryLocation": "Newport, KY, USA",

"active": true,

"locationId": 45986,

"location": "Drawer 2",

"lastLocationId": 45986,

"lastLocation": "Drawer 2",

"statusId": 1,

"status": "Checked In",

"categoryId": 138,

"category": "Accessory",

"custodyReasonId": 5,

"custodyReason": "Evidence",

"recoveredById": 1,

"recoveredBy": "Jack Sparrow",

"submittedById": 1,

"submittedBy": "Jack Sparrow",

"custodianId": null,

"custodian": null,

"currentOfficeId": 1,

"primaryCaseId": 2933670,

"primaryCaseNumber": "2018-0511-01",

"primaryCaseOfficer": "Jack 3176D103FF Sparrow",

"isPrimaryCaseRestricted": false,

"make": null,

"model": null,

"serialNumber": null,

"creatingOrgId": 1,

"dateCreated": "2018-05-11T17:13:30.912Z",

"loaningOrgId": null,

"incomingOrgId": null,

"sequentialOrgId": 150996,

"cases": [

2933670

],

"caseModels": [],

"media": null,

"mediaAmount": 8,

"rootMediaFolderId": 153732,

"formData": [

{

"id": "5b6b6996185c8a2a00cf6e63",

"active": true,

"entityId": 4932596,

"formId": 816,

"formName": "Test 2",

"dateFields": null,

"data": "{\"field2765\":\"123456\"}",

"organizationId": 1,

"officeId": 1,

"visibilityId": 0

}

],

"formDataAmount": 1,

"notes": [],

"notesAmount": 0,

"tags": [],

"tagsAmount": 0,

"barcodes": [],

"barcodesAmount": 0,

"id": 4932596,

"sqlId": 4791388,

"people": null,

"peopleIds": [],

"peopleNames": null,

"parentItemId": null,

"parentItemDescription": null,

"parentSequentialOrgId": null,

"childItems": [],

"childItemsAmount": 0,

"tasks": [],

"tasksAmount": 0,

"historiesAmount": 0,

"isForbidden": false

},

{

"formDataParsed": [],

"sequentialCaseId": "2",

"sequentialCaseIdNested": {

"section": 2,

"nested": null

},

"barcode": "a60afee7-e739-489a-848d-ec342327b1bf",\ "description": "empty bottle 2",

"recoveryDate": "2018-05-11T04:00:00Z",

"recoveryLocation": "Newport, KY, USA",

"active": true,

"locationId": null,

"location": null,

"lastLocationId": 45986,

"lastLocation": "Drawer 2",

"statusId": 2,

"status": "Checked Out",

"categoryId": 138,

"category": "Accessory",

"custodyReasonId": 5,

"custodyReason": "Evidence",

"recoveredById": 1,

"recoveredBy": "Jack Sparrow",

"submittedById": 1,

"submittedBy": "Jack Sparrow",

"custodianId": 1,

"custodian": "Jack 3176D103FF Sparrow",

"currentOfficeId": 1,

"primaryCaseId": 2933670,

"primaryCaseNumber": "2018-0511-01",

"primaryCaseOfficer": "Jack 3176D103FF Sparrow",

"isPrimaryCaseRestricted": false,

"make": null,

"model": null,

"serialNumber": null,

"creatingOrgId": 1,

"dateCreated": "2018-05-11T17:14:11.204Z",

"loaningOrgId": null,

"incomingOrgId": null,

"sequentialOrgId": 150997,

"cases": [

2933670

],

"caseModels": [],

"media": null,

"mediaAmount": 0,

"rootMediaFolderId": 153733,

"formData": null,

"formDataAmount": 0,

"notes": [],

"notesAmount": 0,

"tags": [],

"tagsAmount": 0,

"barcodes": [],

"barcodesAmount": 0,

"id": 4932597,

"sqlId": 4791389,

"people": null,

"peopleIds": [],

"peopleNames": null,

"parentItemId": null,

"parentItemDescription": null,

"parentSequentialOrgId": null,

"childItems": [],

"childItemsAmount": 0,

"tasks": [],

"tasksAmount": 0,

"historiesAmount": 0,

"isForbidden": false

},)