Exclude Devices
Exclude Devices from Location Service
POST /consents
Creates or appends to a list of devices to be excluded from the location service, or excludes all devices in an account. Attempting to locate an excluded device with a POST /locations or a POST /locationreports request will return an error. To remove devices from the exclusion list, send a request that does not include those devices and that does not include "type": "append". The list of devices in that request will replace the current list. The maximum number of devices that can be excluded is 2,000. Exclude all devices in an account by setting "allDevice": true.
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 Started.
| Parameter Name | Data Type | Description |
|---|---|---|
| Authorization (required) | string | HTTP Authorization bearer token: Authorization: Bearer {token} |
| VZ-M2M-Token (required) | string | A valid session token: VZ-M2M-Token: {M2Mtoken} |
| Content-Type (required) | string | Must be application/json Content-Type: application/json |
HTTP Request
POST https://thingspace.verizon.com/api/loc/v1/consents
Request Parameters
| Parameter Name | Data Type | Description |
|---|---|---|
| accountName (required) | string | The numeric name of a billing account. Must include any leading zeros. |
| type (optional) | string | Set to “append” to append the devices in the current request to the existing list. If there is no existing list then it will be created with these devices. Set to “replace” to replace the existing list with the devices in the current request. |
| allDevice (optional) | boolean | Set to true to exclude all devices in the account. To re-enable all devices for location service, set allDevice to false and pass in an empty array for the exclusion list. |
| exclusion (optional) | array | A list of one hardware identifier for each device that to be excluded from location service. Use the International Mobile Equipment ID (IMEI). |
Request Body
The body contains the the accountName and list of devices to be excluded.
Example Request Body
{
"accountName": "0000123456-00001",
"type": "replace",
"allDevice": false,
"exclusion":[
"900000000000009",
"900000000000019",
"900000000000029"
]
}Success Responses
Status 200 A response to a successful request contains a single Boolean value:
{
"success": true
}Success Parameters
| Parameter Name | Data Type | Description |
|---|---|---|
| success | boolean | This response indicates if the request was successful (true) or failed (false). |
Failure Responses
All error messages are returned in this format:
{
"errorCode": "The 3-digit HTML error code",
"errorMessage": "string"
}Error codes and messages are listed on the Error Codes page, along with explanations and suggestions for corrective actions.

