GET /accounts/{accountname}/stateandservices
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.
See also:
Set Device to a Custom State
GET https://thingspace.verizon.com/api/m2m/v1/accounts/{accountname}/stateandservices
You must include the account name in the path.
Parameter Name | Data Type | Description |
---|---|---|
accountname required |
string | The 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. |
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 POST /session/login. |
Content-Type required |
string | Must be application/json . |
None.
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:
Parameter Name | Data Type | Description |
---|---|---|
engagement | array | The engagements associated with the account. |
engagement.engagementId | string | The engagement ID. |
engagement.chargingGroup | string | The Charging Group name. |
engagement.services | array | The services associated with the account. |
.services.name | string | The name of the service. |
.services.description | string | The description of the service. |
.services.states | array | The states defined for the service (may be none). |
.states.name | string | The name of the state. |
.states.workflowSequenceNumber | integer | The workflow sequence number of this state. |
.states.ratingGroups | array | The rating groups defined for the service (may be none). |
.ratingGroups.code | string | The rating group code. |
.ratingGroups.ratingGroupMinValue | string | |
.ratingGroups.ratingGroupMaxValue | string | |
.states.servicePlans | array | The service plans that can be used to charge for services for devices in this state. |
{
"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"
]
}
]
}
]
}
]
}
Status 400
All error messages are returned in this format:
{
"errorCode": "error code string",
"errorMessage": "error message string"
}
Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.