Premium APIsDevice LocationAPI Reference

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 NameData TypeDescription
Authorization (required)stringHTTP Authorization bearer token: Authorization: Bearer {token}
VZ-M2M-Token (required)stringA valid session token: VZ-M2M-Token: {M2Mtoken}
Content-Type (required)stringMust be application/json Content-Type: application/json

HTTP Request

POST https://thingspace.verizon.com/api/loc/v1/consents

Request Parameters

Parameter NameData TypeDescription
accountName (required)stringThe numeric name of a billing account. Must include any leading zeros.
type (optional)stringSet 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)booleanSet 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)arrayA 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 NameData TypeDescription
successbooleanThis 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.

On this page