Premium APIsDevice LocationAPI Reference

Get Excluded Devices List

Get a list of devices excluded from location service

GET /consents/{accountName}/index/{startIndex}

Returns the list of devices in the account that have been excluded from location services. (A POST /locations request will return an error for excluded devices.) All IoT devices in an account are eligible for location services by default, but devices can be exclude (and included again) with a POST /consents request. Each response includes a maximum of 2,000 devices. If the account has more than 2,000 excluded devices (indicated by the hasMoreData parameter in each response), additional requests must be sent to retrieve the rest of the list. Use the startIndex parameter to return a different set of devices in each response.

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

GET https://thingspace.verizon.com/api/loc/v1/consents/{accountName}/index/{startIndex}

Request Parameters

You must include the accountName and the startIndex in the path to specify the starting record.

Parameter NameData TypeDescription
accountName (required)stringThe numeric name of the account. Must include any leading zeros.
startIndex (required)integerThe zero-based number of the first record to return. Set startIndex=0 for the first request. If hasMoreData = true in the response, use the startIndex value from the response for the next request.

Request Body

None.

Success Responses

Status 200 Example Success Response

{
  "accountName": "0000123456-00001",
  "allDevice": false,
  "hasMoreData": false,
  "totalCount": 4,
  "updateTime": "2024-07-29 19:20:50.076 +0000 UTC",
  "exclusion": [ 
    "900000000000009",
    "900000000000019",
    "900000000000029",
    "900000000000039"
  ]
}

Success Parameters

A success response includes a JSON array that contains the hardware identifiers of all excluded devices, or a Boolean indicating that all devices in the account are excluded. The identifiers are IMEIs.

Parameter NameData TypeDescription
accountNamestringThe billing account that exclusion information was requested from.
allDevicebooleanThis value will be true if all the devices in the account are excluded.
hasMoreDatabooleanIf there are more excluded devices to retrieve, this will be true.
totalCountintegerThe total number of excluded devices. Note: Each response includes a maximum of 2,000 devices.
exclusionarrayA list of identifiers of the devices that are excluded from location service. These are IMEI values.
updateTimestringThe time that the consent (exclusion) list was last changed.

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