Specialized APIsHyper Precise LocationAPI EndpointsDevice ManagementAdd a Device
API Reference
Add Devices for Hyper Precise
Adds up to 200 new devices, without provisioning lines of service for them. Use this API to manage some device settings before being ready to activate service for the devices.
POST /devices/actions/add
Header Parameters
The request header must set the content-type to JSON, contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit Getting Tokens.
| Parameter Name | Data Type | Description |
|---|---|---|
| Authorization (required) | string | HTTP Authorization request header containing a valid Bearer token: Authorization: Bearer {token} |
| VZ-M2M-Token (required) | string | A valid session token returned by a Connectivity Management POST /session/login request. |
| Content-Type (required) | string | Must be application/json. |
HTTP Request
POST https://thingspace.verizon.com/api/hyper-precise/v1/devices/actions/add
Request Parameters
| Parameter | Data Type | Description |
|---|---|---|
| accountName (required) | string | The numeric name of the account in the format "0000123456-00001". Leading zeroes must be included. |
| customFields (optional) | array | User defined key/value pairs that can be used for filtering. |
key (required for customfields) | string | User assigned name for filtering key. |
value (required for customfields) | string | The value assigned to the key. |
| devicesToAdd (required) | array | An array of deviceIds. |
| deviceIds (required) | array | An array of kind/id object pairs, two per device. |
| kind (required) | string | The type of identifier. This is: IMEI - International Mobile Equipent Identifier or ICCID - Integrated Circuit Card Identifier. Each device must have an IMEI and an ICCID entry. |
| id (required) | string | the value of the kind. |
| groupname (optional) | string | User assigned name of the group. |
| state (required) | string | The initial service state for the devices. The only valid state is Preactive. |
Request Body
Example Request:
{
"accountName": "0000123456-00001",
"customFields": [
{
"key": "CustomField2",
"value": "SuperVend"
}
],
"devicesToAdd": [
{
"deviceIds": [
{
"kind": "imei",
"id": "15-digit IMEI"
},
{
"kind": "iccid",
"id": "20-digit ICCID"
}
]
},
{
"deviceIds": [
{
"kind": "imei",
"id": "15-digit IMEI"
},
{
"kind": "iccid",
"id": "20-digit ICCID"
}
]
}
],
"groupName": "West Region",
"state": "preactive"
}Success Response
Status 200
A successful response will show the ICCID of the device added with a response of Success.
Example Response:
[
{
"deviceIds": [
{
"id": "20-digit ICCID",
"kind": "iccid"
}
],
"response": "Success"
}
]Note: The end of a code block must be followed with a ``` to keep formatting from bleeding into other sections.
Success Parameters
| Parameter | Data Type | Description |
|---|---|---|
| deviceIds | array | An array of kind/id object pairs with the ICCID of the device. |
| response | string | A flag showing the status of the request. This will show Success for a successful request and Failed for an unsuccessful request. |
Failure Responses
Example Response:
{
"errorCode": "The 3-digit HTML error code",
"errorMessage": "string"
}
