GoToState

Changes the provisioning state of one or more devices to a specified customer-defined service and state.

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

Uses and Requirements

You should be familiar with the M2M Service Provisioning Rules when working with device states.

The M2M Platform sends an asynchronous GoToState callback message for each device in the request when the request has been completed, or if there was a problem and the change failed.

You can specify a list of individual 3G or 4G devices, or work with all 3G or 4G devices in an account or device group. You cannot mix 3G and 4G devices in the same request; only one type will be changed and devices of the other type will fail.

All devices in the request are assumed to be in the same state as the first device in the request. If any of the other devices are not in the same state as the first device, an error will be returned in the callback for that device.

Best Practices

In addition to receiving StateService callback messages, you can use GetDeviceInformation to check the status of the device and GetDeviceProvisioningHistory to see details of completed GoToState requests.

Request Parameters

Parameter Type Description
DeviceList
optional*
DeviceIdentifierCollection

A list of the devices that you want to push to a different state, specified by device identifier. You only need to provide one identifier per device. Do not pass DeviceGroupNameFilter, AccountNameFilter, DeviceCustomFieldFilter, or DeviceServicePlanFilter if you use this parameter.

NOTE: Specify only 4G devices or 2G/3G devices in each request. You cannot change 4G devices and 2G/3G devices in the same request.

You can use GetDeviceList to get a list of all devices in the account.

For each device in DeviceList, use this structure of nested parameters:

<DeviceIdentifierCollection>
  <DeviceIndentifiers>
    <DeviceIdentifier>
      <Kind></Kind>
      <Identifier></Identifier>
    </DeviceIdentifier>
  </DeviceIndentifiers>
</DeviceIdentifierCollection>
Kind
required for DeviceList
string The type of the device identifier. Valid types of identifiers are:

  • ESN (decimal)
  • ICCID (up to 20 digits)
  • IMEI (up to 15 digits)
  • MDN
  • MEID (hexadecimal)
  • MSISDN

For 2G and 3G devices, you only need to include one Kind and Identifier. For 4G devices, you must specify both the IMEI and the ICCID within separate DeviceIdentifier elements, in that order.

Identifier
required for DeviceList
string The value of the device identifier.
AccountNameFilter
optional*
string

The name of a billing account, which can serve one of two purposes:

  • If you want to push all devices in an account.
  • If you are passing DeviceServicePlanFilter or DeviceCustomFieldFilter, you must include the name of the billing account.

An account name is usually numeric, and must include any leading zeros.

DeviceGroupNameFilter
optional*
string

The name of a device group if you want to only include devices in that group.

NOTE: You can use GetDeviceGroupList to get a list of all device groups in the account.

DeviceServicePlanFilter
optional*
string

A service plan code, if you want to only include devices that have that service plan.

NOTE: You can use GetServicePlanList to get a list of all service plans in the account.

DeviceCustomFieldFilter
optional*
CustomFieldFilterObject The names and values of custom fields, if you want to only include devices that have matching custom fields.
Name
required for DeviceCustomFieldFilter
string The name of the custom field. Valid names are CustomField1, CustomField2, CustomField3, CustomField4, and CustomField5.
Value
required for DeviceCustomFieldFilter
string The value of the custom field.

Allowed characters in custom field values

  • Alphanumeric characters
  • / (forward slash)
  • SPACE
  • @ (at sign)
  • . (period)
  • , (comma)
  • : (colon)
  • - (hyphen)
  • _ (underscore)
  • ( (open parenthesis)
  • ) (close parenthesis)
  • [ (open bracket)
  • ] (close bracket)
  • # (number sign or hash)
ServiceName
required
string The name of a customer-defined service to push the devices to.
StateName
required
string The name of a customer-defined stage state to push the devices to.
ServicePlan
required
string

The service plan code that you want to assign to all specified devices in the new state. Set this parameter to one of the Code values returned by GetServicePlanList in the Account Service.

NOTE: Any devices in the request that are not supported by the service plan will not activate. For example, if the service plan is only for 4G devices, any 3G devices included in the GoToState request will fail.

CarrierIpPoolName
optional
string The pool from which your device IP addresses will be derived if the service or state change requires new IP addresses. If you do not include this element, the default pool will be used.
MdnZipCode
optional
string The Zip code of the location where the line of service will primarily be used, or a Zip code that you have been told to use with these devices. For accounts that are configured for geographic numbering, this is the ZIP code from which the MDN will be derived.
CustomFields
optional
CustomField The names and values of any custom fields that you want to set for the devices after the state change.
Name
required
string The name of the custom field. Valid names are CustomField1, CustomField2, CustomField3, CustomField4, and CustomField5.
Value
required
string The value of the custom field.

Allowed characters in custom field values:

  • Alphanumeric characters
  • / (forward slash)
  • SPACE
  • @ (at sign)
  • . (period)
  • , (comma)
  • : (colon)
  • - (hyphen)
  • _ (underscore)
  • ( (open parenthesis)
  • ) (close parenthesis)
  • [ (open bracket)
  • ] (close bracket)
  • # (number sign or hash)
DeviceGroupNames
optional
string The name of a device group that the devices should be added to after the state change.
PublicIPRestriction
optional
string

For 3G devices with static IP addresses on the public network, this specifies whether the devices have general access to the Internet. Valid values are "restricted" or "unrestricted".

  • Unrestricted = The devices will have full access to the Internet.
  • Restricted = The devices will have access to any content provided by Verizon Wireless but will be restricted from access to the Internet.

If left blank, the devices will get the default value set for the account. Public network devices with dynamic IP addresses are always unrestricted.

SkuNumber
optional
string

The Stock Keeping Unit (SKU) number of a 4G device type with an embedded SIM. Can be used with ICCID device identifiers in lieu of an IMEI when activating 4G devices. The SkuNumber will be used with all devices in the request, so all devices must be of the same type.

NOTE: Only 4G devices with embedded SIMs can be activated by SKU at this time.

* You can either specify individual devices with the DeviceList parameter, or you can run the request on all devices that have a specified account name, device group name, or custom field value. You can specify an AccountName or a DeviceGroupName, plus the DeviceCustomFieldFilter to identify only those devices that are in that account or group AND have the specified custom field value.

Response Parameters

Parameter Type Description
RequestId string

A unique string that associates the request with the results that are sent via a callback service.

The M2M Platform will send a separate callback message for each device that matched the request criteria, indicating whether the operation succeeded for that device and containing any requested information. All of the callback messages will have the same RequestId.

Callback Response Parameters

Parameter Type Description
CallbackRequest CallbackRequest Wrapper element for all callback elements.
Username string The username defined when a URL was registered for the callback service, or an empty element if no username was defined.
Password string The password defined when a registered for the callback service, or an empty element if no password was defined.
RequestId string A unique string that matches the RequestId returned in the synchronous response to the original API request.

A separate callback message is sent for each device that matched the request criteria, indicating whether the operation succeeded for that device. All of the callback messages will have the same RequestId.

Device DeviceIdentifier The device that was changed.
Kind string The type of the device identifier. Valid types of identifiers are:
  • ESN (decimal)
  • ICCID (up to 20 digits)
  • IMEI (up to 15 digits)
  • MDN
  • MEID (hexadecimal)
  • MIN
  • MSISDN
Identifier string The value of the device identifier.
Data CallbackData The data elements for this callback.
CarrierService CarrierServiceCallbackRequest Null for this callback service.
ExternalProvisioningChange ExternalProvisioningChange Null for this callback service.
PromoChange PromoChange Null for this callback service.
SMSDelivery SMSDelivery Null for this callback service.
PRLInformation PRLInformation Null for this callback service.
DeviceSuspendStatus DeviceSuspendStatus Null for this callback service.
GoToState GoToStateCallbackRequest The updated information for the device that was pushed to a new state.
Device DeviceIdentifier Identifiers for the device that was pushed to a new state. The callback may include multiple identifiers for the same device, such as the ESN and the MDN.
Kind string The type of the device identifier. Valid types are:
  • ESN (decimal)
  • ICCID (up to 20 digits)
  • IMEI (up to 15 digits)
  • MDN
  • MEID (hexadecimal)
  • MIN
  • MSISDN
Identifier string The value of the device identifier.
IpAddress string The IP address of the device.
StateName string The new provisioning state of the device.
ServiceName string The new service name for the device.
ServicePlan string The new service plan for the device.
AccountName string The new account name for the device.
Fault SoapFault Information about any errors that may have occurred.
faultcode QName
faultstring string
faultfactor anyURI
detail
Comment string Null in GoToState callback messages.
Summary SummaryReport Null for this callback service.
Status string Success or Failed.
CallbackCount integer The number of times this callback message has been sent.
MaxCallbackThreshold integer The maximum number of times this callback message will be sent if it is not correctly acknowledged.

Example SOAP Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:v2="http://nphase.com/unifiedwebservice/v2"
 xmlns:nph="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.StateService">
  <soapenv:Header>
    <v2:token>fa59c858-833e-4a4e-a6a8-56f382abcdd5</v2:token>
  </soapenv:Header>
   <soapenv:Body>
      <v2:GoToState>
         <v2:Input>
            <nph:DeviceList>
               <nph1:DeviceIdentifierCollection>
                  <nph1:DeviceIdentifiers>
                     <nph1:DeviceIdentifier>
                        <nph1:Kind>iccid/nph1:Kind>
                        <nph1:Identifier>89144259800000080079</nph1:Identifier>
                     </nph1:DeviceIdentifier>
                  </nph1:DeviceIdentifiers>
               </nph1:DeviceIdentifierCollection>
            </nph:DeviceList>
            <nph:ServiceName>fast1</nph:ServiceName>
            <nph:StateName>inter-active</nph:StateName>
            <nph:ServicePlan>4G East</nph:ServicePlan>
         </v2:Input>
      </v2:GoToState>
   </soapenv:Body>
</soapenv:Envelope>

Example SOAP Response

<GoToStateResponse xmlns="http://nphase.com/unifiedwebservice/v2">
   <Output xmlns:a="http://schemas.datacontract.org/2004/07NPhase.UnifiedWebService.APIs.v2.Contract.StateService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <a:RequestId>2c90bd28-ece4-42ef-9f02-7e3bd4fbff33</a:RequestId>
   </Output>
</GoToStateResponse>

Example SOAP Callback

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <CallbackRequest xmlns="http://nphase.com/unifiedwebservice/v2">
      <Username/>
      <Password/>
      <RequestId>2c90bd28-ece4-42ef-9f02-7e3bd4fbff33</RequestId>
      <Device>
        <Kind>MEID</Kind>
        <Identifier>A1000000444461</Identifier>
      </Device>
      <Data>
        <Data>
          <CarrierService xsi:nil="true" />
          <ExternalProvisioningChange xsi:nil="true" />
          <PromoChange xsi:nil="true" />
          <SMSDelivery xsi:nil="true" />
          <PRLInformation xsi:nil="true" />
          <DeviceSuspendStatus xsi:nil="true" />
          <GoToState>
            <DeviceIdentifierCollection>
              <DeviceIdentifier>
                <Kind>mdn</Kind>
                <Identifier>1234567890</Identifier>
              </DeviceIdentifier>
            </DeviceIdentifierCollection>
            <IpAddress>206.130.128.131</IpAddress>
            <StateName>new active</StateName>
            <ServiceName>sample</ServiceName>
            <ServicePlan>test</ServicePlan>
            <AccountName>0786890242-00001</AccountName>
          </GoToState>
          <Fault xsi:nil="true"/>
          <Comment xsi:nil="true"/>
          <Summary xsi:nil="true"/>
          <Status>Success</Status> 
          <CallbackCount>1</CallbackCount>
          <MaxCallbackThreshold>4</MaxCallbackThreshold/>
        </Data>
      </Data>
    </CallbackRequest>
  </s:Body>
</s:Envelope>

Request Schema Diagram

Response Schema Diagram