API Call Examples
## Login
<h3><i>Call Setting</i></h3>
<table>
<thead>
<tr>
<th>Field</th>
<th>Content</th>
</tr>
</thead>
<tbody>
<tr>
<td><p>POST</p></td>
<td><p><a href="https://connect.calamp.com/connect/services/login">https://connect.calamp.com/connect/services/login</a></p></td>
</tr>
<tr>
<td><p>Header</p></td>
<td><p>Content-Type: application/x-www-form-urlencoded</p></td>
</tr>
<tr>
<td><p>Body</p></td>
<td><p>x-www-form-urlencoded<br/>username: <user><br/>password: <pass><br/>useAuthToken: true</p></td>
</tr>
</tbody>
</table>
<h3><i>Examples</i></h3>


## Smart Search
<h3><i>Call Setting</i></h3>
| Field | Content |
| :----- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| POST | [https://connect.calamp.com/device-services/devices/smartsearch?include=groups&withIdReport=true&withCredentials=true&withLocation=true&expand=deviceConfiguration&v=2.1&pg=1&pgsize=10&sort=+name](https://connect.calamp.com/device-services/devices/smartsearch?include=groups&withIdReport=true&withCredentials=true&withLocation=true&expand=deviceConfiguration&v=2.1&pg=1&pgsize=10&sort=+name) |
| Header | calamp-services-app: <yourAPIkey> |
| Body | raw: JSON |
<h3><i>Example Search Bodies</i></h3>
<table>
<thead>
<tr>
<th>Example</th>
<th>Search Body</th>
</tr>
</thead>
<tbody>
<tr>
<td><p>Search for a specific ESN.</p></td>
<td><p><code>\{ "search": \{"queryString": "4562211953"}}</code></p></td>
</tr>
<tr>
<td><p>Request all the devices in an account and its subaccounts.</p></td>
<td><p><code>\{ "search": \{ "queryString": "\*", "accountId": 1110, "hierLevel": "All" }}</code></p></td>
</tr>
<tr>
<td><p>Request multiple devices.</p></td>
<td><p><code>\{ "search": \{ "queryString": "esn: (4562211953 OR 1110000305 OR 3671000349)" }}</code></p></td>
</tr>
<tr>
<td><p>Request all the devices in group 4650.</p></td>
<td><p><code>\{ "search": \{ "queryString": "groupIds: (4650)", "accountId": 1110, "hierLevel": "All" }}</code></p></td>
</tr>
<tr>
<td><p>Request all the devices with a name containing "demo."</p></td>
<td><p><code>\{ "search": \{ "queryString": "name: (_demo_)", "accountId": 1110, "hierLevel": "All" }}</code></p></td>
</tr>
<tr>
<td><p>Request all the devices with firmware 8.4a or 8.6c.</p></td>
<td><p><code>\{ "search": \{ "queryString": "extensions.firmwareVersion: (84a OR 86c)", "accountId": 1110, "hierLevel": "All" }}</code></p></td>
</tr>
</tbody>
</table>
<h3><i>Examples</i></h3>



<h3><i>Searchable Properties</i></h3>
| Property Name | Type | Comments |
| :---------------------------- | :-------------------- | :----------------------------------- |
| account | long\[] | |
| extensions.firmwareVersion | string\[] | |
| extensions.networkMode | string\[] | |
| pegBehaviorId | long\[] | |
| mdn | string\[] | Searchable without the property name |
| ipAddress | string\[] | Searchable without the property name |
| activationDate | date\[] | yyyy-MM-dd'T'HH:mm:ss.SSSZ |
| name | string\[] | Searchable without the property name |
| deviceConfigurationId | long\[] | |
| lastModifiedOn | dat | yyyy-MM-dd'T'HH:mm:ss.SSSZ |
| provisionStatus | string\[] | |
| status | resourceStatus\[] | |
| serialNumber | string\[] | Searchable without the property name |
| extensions.vbusEnableStatus | string\[] | |
| extensions.poNumber | string\[] | |
| category | devicecategory\[] | |
| createdOn | date\[] | yyyy-MM-dd'T'HH:mm:ss.SSSZ |
| architecture | devicearchitecture\[] | |
| extensions.shippingOrder | string\[] | |
| extensions.networkCarrier | string\[] | |
| esn | string\[] | Searchable without the property name |
| iccid | string\[] | Searchable without the property name |
| typeid | long\[] | |
| airId | string\[] | Searchable without the property name |
| groupIds | list\[] | |
| dmDevice | boolean\[] | |
| extensions.signalStrength | string\[] | |
| lastReportedTime | date\[] | yyyy-MM-dd'T'HH:mm:ss.SSSZ |
| accountId | long\[] | |
| imei | string\[] | Searchable without the property name |
| extensions.configVersion | string\[] | |
| id | long\[] | Searchable without the property name |
| extensions.sku | string\[] | |
| externalId | string\[] | Searchable without the property name |
| macAddress | string\[] | Searchable without the property name |
| shipDate | date\[] | yyy-MM-dd'T'HH:mm:ss.SSSZ |
| typeName | string\[] | |
| meid | string\[] | Searchable without the property name |
| type | long\[] | |
| extensions.idReportTimestamp | date\[] | yyy-MM-dd'T'HH:mm:ss.SSSZ |
| extensions.networkCurrentMode | string\[] | |
| extensions.fileVersion | string\[] | |
| extensions.appId | string\[] | |
| min | long\[] | Searchable without the property name |
| imsi | string\[] | Searchable without the property name |
| phoneNumber | string\[] | Searchable without the property name |
## Shipping Information
<h3><i>Call Setting</i></h3>
| Field | Content |
| :------ | :---------------------------------------------------------------------- |
| **GET** | [https://connect.calamp.com/device-services/devices/`{esn}`/shippinginfo](https://connect.calamp.com/device-services/devices/{esn}/shippinginfo) |
| Headers | calamp-services-app: <yourAPIkey> |
<h3><i>Examples</i></h3>

## Current Device File
<h3><i>Call Setting</i></h3>
| Field | Content |
| :------ | :----------------------------------------------------------------------------- |
| GET | [https://connect.calamp.com/device-services/devices/`{esn}`/filehistory/current](https://connect.calamp.com/device-services/devices/{esn}/filehistory/current) |
| Headers | calamp-services-app: <yourAPIkey> |
<h3><i>Examples</i></h3>

## Device File History
<h3><i>Call Setting</i></h3>
| Field | Content |
| :------ | :--------------------------------------------------------------------- |
| **GET** | [https://connect.calamp.com/device-services/devices/`{esn}`/filehistory](https://connect.calamp.com/device-services/devices/{esn}/filehistory) |
| Headers | calamp-services-app: <yourAPIkey> |
<h3><i>Examples</i></h3>

## Additional Resources
- [General CTC API Information](https://developer.calamp.com/calamp/docs/rest-over-http)
- [CTC API Login Instruction](https://developer.calamp.com/calamp/docs/the-api-login-interface)
- [Device Information](https://developer.calamp.com/calamp/reference/devicessearch)
- [Device File](https://developer.calamp.com/calamp/reference/devicetypes)
- [Job](https://developer.calamp.com/calamp/reference/createjob)Updated 10 months ago
What’s Next
Did this page help you?
