1.3 Search Contractor

Updated at: 5/16/2023 8:12:52 PM

Url

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

Method

Post

Body

```json { "Name": { "Op": "EQ|CS", "Val": "<contractor_name>" }, "Number": "<contractor_number>", "Ssn": "<ssn>", "TaxID": "<tax_id>", "RequireActiveCoverage": "<true|false>", "IncludeClosed": "<true|false>", "PageSize": "<page_size>", "PageNumber": "<page_number>" } ```

Parameters

- `ContractorNumber`. Optional. - `Name` Optional. - `Op`Optional. Default to `EQ`. Available operators: - `EQ`: equals to - `CS`: contains string - `Val` Required if `Name` element is present - `IncludeClosed`. Optional. default to false. Those contractors that are in a inactive status will be filtered out if the value is set to true. - `RequireActiveCoverage`. Optional, default to false. Contractors without active coverage will be excluded from the result if the value is 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": { "PageSize": 0, "PageNumber": 0, "TotalCount": 0, "TotalPages": 0, "Items": [ { "ID": "<contractor_id>", "Number": "<contractor_number>", "Name": "", "FirstName": "<first_name>", "MiddleName": "<middle_name>", "LastName": "<last_name>", "Dob": "<dob:Date>", "Email": "<email>", "PhoneNumber": "<phone_number>", "CellNumber": "<cell_number>", "Address": "<address>", "Address2": "<address2>", "City": "<city>", "State": "<state>", "Zip": "<zip>", "License": "<license>", "LicenseState": "<license_state>", "CustomFields": { "CustomField1": "<custom_field_1>", "CustomField2": "<custom_field_2>" }, "InactivationDate": "<date:Date>" } ] } } ```

Returns

- `InactivationDate` will be shown if closed contractors are included in the results.

Notes

- The request would fail if it fails to find the motor carrier by `fleet_token`.
In this article