2.3 Search Unit

Updated at: 3/3/2022 5:22:58 AM

Url

/api/v2/{fleet_token}/contractors/{contractor_id}/units/search

Method

Post

Body

```json { "UnitNumber": "<unit_number>, "Vin": { "Op": "<op>", "Val": "<vin>" }, "IncludeClosed": "<true|false>", "PageSize": "<page_size>", "PageNumber": "<page_number>" } ```

Parameters

- `UnitNumber`. Optional. - `Vin` Optional. - `Op`Optional. Default to `EQ`. Available operators: - `EQ`:equal - `CS`: contains string - `Val` Required if `Vin` element is present - `IncludeClosed` Optional, default to false. Inactive units will be included if set to true. - `PageSize` Optional. Default to 20. Will return full list if set to 0 or a negative value. - `PageNumber` Optional. Default to 1. will return the first page if set to 0 or a negative value.

Response

```json { "Success": "<true|false>", "Message": "<message>", "Data": [ { "ID": "<unit_id>", "UnitNumber": "<unit_number>", "Year": "", "Make": "", "Vin": "", "StatedValue": "", "EquipmentType": "", "Model": "", "InactivationDate": "<date:Date>" } ] } ```

Returns

- `TotalPages` total number of pages. - `TotalCount` total number of units. - `PageNumber` current page. - `PageSize` number of units per page. - `Items` the units on current page.

Notes

- The request would fail if it fails to locate the motor carrier by `fleet_token`. - We do exact match on `UnitNumber`. - Both exact match and partial match are available for matching by `Vin`.
In this article