Updates the consent for a device on the account. This request returns a synchronous transaction ID and the updated consent information, at device and account level, for each device (returned asynchronously) as a Device Location callback message. For precise location, confirm that the device being used has been certified to work. Your account manager or support contact can provide a list of certified devices.
Update the consent for the location of IoT devices (asynchronous): POST /devicelocations/action/consents
See also:
Register a Callback Listener
About Location Information
About Callback Services
Consent for devices can only be given or updated by the account that owns those devices.
For IoT devices, the device owner must give their consent for the device location information to determined and reported. When a location request is sent for an IoT device, ThingSpace checks to see if there is a current consent for your account to access the specified device’s location. If there isn’t a consent on file or consent is denied, ThingSpace will not proceed further to compute the location information of the device and a callback will be sent with an error. If the account owner gives consent (or if there is already a current consent), the location information will be returned in a callback message.
The account owner can update consent as allowed or denied for either Coarse or Precise location or both of them. Default is Coarse Location Only.
POST https://thingspace.verizon.com/api/loc/v1/devicelocations/action/consents
None.
The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token and must set the content-type to JSON.
Parameter Name |
Data Type |
Description |
Authorization (required) |
string |
HTTP Authorization bearer token. |
VZ-M2M-Token (required) |
string |
A valid session token returned by
|
Content-Type (required) |
string |
Must be |
Property Name |
Data Type |
Description |
accountName (required) |
string |
The name of a billing account which is usually in the format of 10 digits, a hyphen and then five more digits. Any leading zeros must be included |
deviceList (required) |
array of device identifier objects |
Each object in the array identifies a device that you want to enable location consent:
|
Enabling Consent
{
“deviceList”: [
{“id”: “354677790348290”, “kind”: “imei”, “mdn”: “5557337468”,”consent”: “0”}
],
“accountName”: “2234434445-32333”
}
Status 200
A successful response has, within the body of the response, a transaction ID that can be used to correlate the callbacks.
Parameter Name |
Data Type |
Description |
transactionID |
string |
A unique string that associates the request with the location consent enable information that is sent in an asynchronous callback message. ThingSpace will send a separate callback message for each device that was in the request. All of the callback messages will have the same |
status |
enum |
QUEUED (all other values are reserved at this time) |
Example Response, Status 200
{
"transactionID": "e223cc6d-6ff7-4b6b-9f21-1dd7f474bd88",
"status": "QUEUED"
}
Example Response, Status 400
All error messages are returned in this format:
{
"errorCode": "INVALID_PARAMETER",
"errorMessage": "UWS verification failure (Could not find account {account}.)"
}
Error codes and messages are listed on the Error Codes page, along with explanations and suggestions for corrective actions.
Property Name |
Data Type |
Description |
accountName (required) |
string |
The name (number) of the account that originated the device location request. |
transactionID (required) |
string |
A unique string that associates the request with the location consent enable information that is sent in an asynchronous callback message. ThingSpace will send a separate callback message for each device that was in the request. All of the callback messages will have the same |
status (required) |
string |
SUCCESS or FAILED |
deviceList (required) |
array of device identifier objects |
Each object in the array identifies a device that you want to enable location consent:
Note: |
reportType (required) |
string |
A string representing the report the callback is reporting: |
Example callback, SUCCESSS
{
"accountName":"2234434445-32333",
"deviceList":[
{
"consent":"1",
"id":"354677790348290",
"kind":"IMEI",
"mdn":"5557337468"
}
],
"reportType":"CONSENT_RESPONSE",
"status":"SUCCESS",
"transactionID":"ee1e654d-8981-4cdc-962e-4f061f89e144"
}
Example callback, FAILED
{
"accountName":"2234434445-32333",
"deviceList":[
{
"error":{
"info":"error from lwm2m server",
"time":"20200731183948",
"type":"INTERNAL ERROR"
},
"id":"354677790348290",
"kind":"IMEI",
"mdn":"5557337468"
}
],
"reportType":"CONSENT_RESPONSE",
"status":"FAILED",
"transactionID":"3df17f6c-4da9-4137-8476-498b948fd7dd"
}
Status 200
Success Response with no body.
Update the consent for an entire account. This request returns a synchronous transaction ID and the updated consent information, at device and account level, for each device (returned asynchronously) as a Device Location callback message.
Update the consent for an entire account of multiple devices (asynchronous): PUT /devicelocations/action/consents
See also:
Register a Callback Listener
About Location Information
About Callback Services
Consent for devices can only be given or updated by the account that owns those devices.
For IoT devices, the device owner must give their consent for the device location information to be determined and reported. When a location request is sent for an IoT device, ThingSpace checks to see if there is a current consent for your account to access the specified device’s location. If there isn’t a consent on file or consent is denied, ThingSpace will not proceed further to compute the location information of the device and a callback will be sent with an error. If the account owner gives consent (or if there is already a current consent), the location information will be returned in a callback message.
The account owner can update consent as allowed or denied for either Coarse or Precise location or both of them. Default is Coarse Location.
PUT https://thingspace.verizon.com/api/loc/v1/devicelocations/action/consents
None.
The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token and must set the content-type to JSON.
Parameter Name |
Data Type |
Description |
Authorization (required) |
string |
HTTP Authorization bearer token. |
VZ-M2M-Token (required) |
string |
A valid session token returned by
|
Content-Type (required) |
string |
Must be |
Property Name |
Data Type |
Description |
accountName (required) |
string |
The name of a billing account which is usually in the format of 10 digits, a hyphen and then five more digits. Any leading zeros must be included |
allDeviceConsent (required) |
string |
This represents the location request’s consent at the account level. Default is set to 2 (only coarse location allowed):
|
Enable Consent
{
"accountName": "2234434445-32333",
"allDeviceConsent": "0"
}
Status 200
A successful response has, within the body of the response, a transaction ID that can be used to correlate the callbacks.
Parameter Name |
Data Type |
Description |
transactionID |
string |
A unique string that associates the request with the location consent enable information that is sent in an asynchronous callback message. ThingSpace will send a separate callback message for each device that was in the request. All of the callback messages will have the same |
status |
enum |
QUEUED (all other values are reserved at this time) |
Example Response, Status 200
{
"transactionID": "ff8b157a-3843-499f-aefb-c5f70a358597",
"status": "QUEUED"
}
Example Response, Status 400
All error messages are returned in this format:
{
"errorCode": "INVALID_PARAMETER",
"errorMessage": "Invalid JSON"
}
Error codes and messages are listed on the Error Codes page, along with explanations and suggestions for corrective actions.
Property Name |
Data Type |
Description |
accountName (required) |
string |
The name (number) of the account that originated the device location request. |
transactionID (required) |
string |
A unique string that associates the request with the location consent enable information that is sent in an asynchronous callback message. ThingSpace will send a separate callback message for each device that was in the request. All of the callback messages will have the same |
status (required) |
string |
SUCCESS or FAILED |
deviceList (required) |
array of device identifier objects |
Each object in the array identifies a device that you want to enable location consent:
Note: Note: |
reportType (required) |
string |
A string representing the report the callback is reporting: |
allDeviceConsent (optional) |
string |
This represents the location request’s consent at the account level. Default set to 2 (only coarse location allowed):
|
Example callback, SUCCESSS
{
"accountName":"2234434445-32333",
"appName":"DeviceLocation",
"addressScheme":"rest",
"message":{
"accountName":"2234434445-32333",
"transactionID":"c4feeffa-7481-41ad-8cb1-58976ba1ebe0",
"reportType":"CONSENT_RESPONSE",
"status":"SUCCESS",
"allDeviceConsent":"0",
"deviceList":[
{
"id":"354677790348290",
"kind":"IMEI",
"mdn":"5557337468",
"consent":"0"
}
]
}
}
Example callback, FAILED
{
"accountName":"2234434445-32333",
"deviceList":[
{
"consent":"2",
"error":{
"info":"Error returned from LWM2M server",
"type":"INTERNAL ERROR"
},
"id":"354677790348290",
"kind":"IMEI",
"mdn":"5557337468"
}
],
"reportType":"CONSENT_RESPONSE",
"status":"FAILED",
"transactionID":"8ee6b3b4-eb29-4406-98c7-9da54deea199"
}
Status 200
Success Response with no body.
Obtain the consent for an entire account or device list (maximum 100 IDs per request) in an account. This request returns the consent information, at device and account level, for each device in a synchronous response.
Get the consent for the entire account or device list in an account (asynchronous): GET /devicelocations/action/consents
See also:
Register a Callback Listener
About Location Information
The Consent Settings for IoT devices can only be retrieved (or gotten) by the account that owns those devices.
For IoT devices, the device owner must give their consent for the device location information to be determined and reported. When a location request is sent for an IoT device, ThingSpace checks to see if there is a current consent for your account to access the specified device’s location. If there isn’t a consent on file or consent is denied, ThingSpace will not proceed further to compute the location information of the device and a callback will be sent with an error. If the account owner gives consent (or if there is already a current consent), the location information will be returned in a callback message.
GET https://thingspace.verizon.com/api/loc/v1/devicelocations/action/consents?{accountName}&{deviceid}&{deviceid}
GET 'https:// thingspace.verizon.com/api/loc/v1/devicelocations/action/consents?accountName=1123334445-32345&deviceid=354657770354181&deviceid=354657770354942'
Parameter Name |
Data Type |
Description |
accountName (required) |
string |
The name of a billing account which is usually in the format of 10 digits, a hyphen and then five more digits. Any leading zeros must be included |
deviceid (required) |
array of strings |
A list of device ids (IMEI) Note: Maximum of 100 device IDs |
The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token and must set the content-type to JSON.
Parameter Name |
Data Type |
Description |
Authorization (required) |
string |
HTTP Authorization bearer token. |
VZ-M2M-Token (required) |
string |
A valid session token returned by
|
Content-Type (required) |
string |
Must be |
Parameter Name |
Data Type |
Description |
accountName (required) |
string |
The name of a billing account which is usually in the format of 10 digits, a hyphen and then five more digits. Any leading zeros must be included |
deviceList (required) |
array of device identifier objects |
Each object in the array identifies a device that you want to enable location consent:
Note: |
allDeviceConsent (optional) |
string |
This represents the location request’s consent at the account level:
|
Example Response, Status 200
{
"deviceList": [
{
"id": "354658090354181",
"kind": "IMEI",
"mdn": "5883826163",
"consent": "1"
},
{
"id": "354658090355337",
"kind": "IMEI",
"mdn": "5883826191",
"consent": "1"
}
],
"accountName": "2234434445-32333",
"allDeviceConsent": "1"
}
Example Response, Status 400
All error messages are returned in this format:
{
"errorCode": "INVALID_PARAMETER",
"errorMessage": "Invalid account name"
}
Error codes and messages are listed on the Error Codes page, along with explanations and suggestions for corrective actions.
Here are some use cases based on the account level consent settings: