Standard APIsConnectivity ManagementAPI EndpointsAccountsList Account States and Services

API Reference

Get Services And States

GET /accounts/{accountname}/stateandservices

Uses and Requirements

Returns a list and details of all custom services and states defined for a specified account.

NOTE: This API is currently in limited release, and is not yet available to all customer accounts.

Request Components

HTTP Request:

GET https://thingspace.verizon.com/api/m2m/v1/accounts/{accountname}/stateandservices

Resource Path and Query Parameters

Resource Path and Query Parameters

You must include the account name in the path.

Parameter NameData TypeDescription
accountname requiredstringThe name of the account for which you want a list of states and services. An account name is usually numeric, and must include any leading zeros.

Header Parameters

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 NameData TypeDescription
Authorization requiredstringHTTP Authorization bearer token.
VZ-M2M-Token requiredstringA valid session token returned by POST /session/login.
Content-Type requiredstringMust be application/json.

Request Body

None.

Success Responses

Status 200 A successful request returns an array of engagements. Each engagement includes an array of custom services, and each service includes an array of custom states:

Status 200

Parameter NameData TypeDescription
engagementarrayThe engagements associated with the account.
 engagement.engagementIdstringThe engagement ID.
 engagement.chargingGroupstringThe Charging Group name.
 engagement.servicesarrayThe services associated with the account.
  .services.namestringThe name of the service.
  .services.descriptionstringThe description of the service.
  .services.statesarrayThe states defined for the service (may be none).
   .states.namestringThe name of the state.
   .states.workflowSequenceNumberintegerThe workflow sequence number of this state.
   .states.ratingGroupsarrayThe rating groups defined for the service (may be none).
    .ratingGroups.codestringThe rating group code.
    .ratingGroups.ratingGroupMinValuestring
    .ratingGroups.ratingGroupMaxValuestring
   .states.servicePlansarrayThe service plans that can be used to charge for services for devices in this state.

Example Success Response

{
  "engagement":[
    {
      "engagementId":"1234",
      "chargingGroup":"Engagement1234",
      "services":[
        {
          "name":"Svc1",
          "description":"Usage Segmentation - Main Line",
          "states":[
            {
              "name":"Svc1 Activate",
              "workflowSequenceNumber":1,
              "servicePlans":[
                "4523aef7250f67205fd5",
                "4d4090c0f2d48814c94d"
              ]
            },
            {
              "name":"Svc1 No Telematics",
              "workflowSequenceNumber":3,
              "servicePlans":[
                "4523aef7250f67205fd5",
                "4d4090c0f2d48814c94d"
              ]
            },
            {
              "name":"Svc1 Deactivate",
              "workflowSequenceNumber":2,
              "servicePlans":[
                "4523aef7250f67205fd5",
                "4d4090c0f2d48814c94d"
              ]
            }
          ]
        },
        {
          "name":"WIFI",
          "description":"Usage Segmentation - WiFi",
          "states":[
            {
              "name":"WIFI Redirect",
              "workflowSequenceNumber":2,
              "ratingGroups":[
                {
                  "code":"124",
                  "ratingGroupMinValue":"10001",
                  "ratingGroupMaxValue":"10008"
                }
              ],
              "servicePlans":[
                "4d4090c0f2d48814c94d"
              ]
            },
            {
              "name":"WIFI Trial",
              "workflowSequenceNumber":4,
              "ratingGroups":[
                {
                  "code":"126",
                  "ratingGroupMinValue":"10001",
                  "ratingGroupMaxValue":"10008"
                }
              ],
              "servicePlans":[
                "4d4090c0f2d48814c94d"
              ]
            },
            {
              "name":"WIFI Goodwill",
              "workflowSequenceNumber":6,
              "ratingGroups":[
                {
                  "code":"128",
                  "ratingGroupMinValue":"10001",
                  "ratingGroupMaxValue":"10008"
                }
              ],
              "servicePlans":[
                "4d4090c0f2d48814c94d"
              ]
            },
            {
              "name":"WIFI Disable",
              "workflowSequenceNumber":3,
              "ratingGroups":[
                {
                  "code":"125",
                  "ratingGroupMinValue":"10001",
                  "ratingGroupMaxValue":"10008"
                }
              ],
              "servicePlans":[
                "4d4090c0f2d48814c94d"
              ]
            }
          ]
        }
      ]
    }
  ]
}

Failure Responses

Status 400

All error messages are returned in this format:

{
  "errorCode": "error code string",
  "errorMessage": "error message string"
}

On this page