Premium APIsDevice LocationAPI Reference

Get Usage Trigger

GET /usage/accounts/{accountName}/triggers

GET /usage/accounts/{accountName}/triggers/{triggerId}

Retrieve trigger information about a specific trigger or all triggers in a given account.

HTTP Request

GET https://thingspace.verizon.com/api/subsc/v1/usage/accounts/{accountName}/triggers
GET https://thingspace.verizon.com/api/subsc/v1/usage/accounts/{accountName}/triggers/{triggerId}

Resource and Query Parameters

Use the triggers endpoint to get all triggers in an account, or specify a trigger ID to get a single trigger.

Parameter NameData TypeDescription
accountName (required)stringA Verizon billing account name, to retrieve all triggers that belong to that account. An account name is numeric, and must include any leading zeros.
triggerId (optional)stringThe UUID of a specific trigger to get information about that trigger.

Header Parameters

The request header must 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)stringHHTTP Authorization bearer token:
Authorization: Bearer {token}.
VZ-M2M-Token (required)stringA valid session token returned by POST /api/m2m/v1/session/login using the primary account’s credentials.
Content-Type (required)stringMust be application/json Content-Type: application/json

Request Body

None.

Success Responses

Status 200

A success response includes a single object for one trigger, or an array of objects, each describing a single trigger.

Parameter NameData TypeDescription
triggerIdstringUnique ID of the new trigger.
triggerNamestringThe name for the trigger.
accountNamestringThe name of the billing account that the trigger is associated with.
serviceNamestringThe name of the service that the trigger monitors, either location or fota.
thresholdValuestringThe percent of subscribed usage required to activate the trigger.
allowExcessbooleanTrue if use of the service is allowed after reaching 100% of subscribed usage.
sendSmsNotificationbooleanTrue to send SMS text alerts to the specified smsPhoneNumbers.
smsPhoneNumbersstringA comma-separated list of phone numbers to send SMS alerts to.
sendEmailNotificationbooleanTrue to send email alerts to the specified emailAddresses.
emailAddressesstringA comma-separated list of email addresses to send email alerts to.

Example Success Response

A response for an account that has two triggers:

[
    {
        "triggerId": "595f5c44-eeee-ffff-gggg-020a1545a84d",
        "triggerName": "Location usage warning",
        "accountName": "1234567890-00001",
        "serviceName": "Location",
        "thresholdValue": "90",
        "allowExcess": true,
        "sendSmsNotification": true,
        "smsPhoneNumbers": "10-digit phone number",
        "sendEmailNotification": false,
        "emailAddresses": ""
    },
    {
        "triggerId": "b56f3d7a-eeee-ffff-gggg-012d1545b123",
        "triggerName": "Location usage limit",
        "accountName": "1234567890-00001",
        "serviceName": "Location",
        "thresholdValue": "100",
        "allowExcess": false,
        "sendSmsNotification": true,
        "smsPhoneNumbers": "10-digit phone number",
        "sendEmailNotification": false,
        "emailAddresses": ""
    }
]

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