Activate Devices

Activate Service for Devices:
POST /devices/actions/activate

Activates service for one or more devices so that they can send and receive data. If the devices do not already exist in the account, this request adds them before activation.

Contents

See also:
About Device States
Service Provisioning Rules
Retrieve Service Plans
Retrieve Account Leads
Add Devices
Suspend Service for Devices
Restore Service for Devices
Deactivate Service for Devices

Uses and Requirements

You should be familiar with the M2M Service Provisioning Rules before activating devices. The devices that you want to add must already exist in the Verizon Device Management Database (DMD).

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 activated and devices of the other type will fail. If the devices have previously been added to the account and have custom field values, you can use a custom field filter to only activate devices with specific values.

ThingSpace sends an asynchronous CarrierService callback message for each device in the request when service for the device has been activated, or if there was a problem and the activation failed.

NOTE: Devices will be assigned non-geographic MDNs if the account and device both support this feature.

NOTE: There is a limit on the number of Activate requests that can be submitted every minute. To avoid encountering this limit when you need to activate a large number of devices, put multiple devices in each request. You can submit up to 10,000 devices per request.

Best Practices

The Best Practice for activation is to verify that the devices are ready to be activated before sending a POST /devices/actions/activate request:

  • Send a POST /devices/actions/list request to check the state of the devices before service activation.
    • New devices that have not been added to the account should return “DeviceNotFound” (which is good).
    • Devices that have already been added to the account must be in the pre-active or deactive state before service can be activated.
  • Send a POST /devices/actions/activate request to activate service for the device.
  • Register a URL to receive CarrierService callback messages and run a callback listening service at that URL. ThingSpace will send a callback message when each device has been fully activated, or if there was a problem and the device was not activated.

Activations usually complete within a few minutes.* If you receive a general error in a callback, you should open a support ticket. Other errors indicate a problem with the request parameters, so please verify the device identifiers and other values and then resend the request.

In addition to receiving CarrierService callback messages, You can use POST /devices/actions/list to check the status of the device and POST /devices/history/actions/list to see details of completed activation requests.

* Activations may take up to 12 hours to complete if there are major network or technology updates occurring at the same time.

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/m2m/v1/devices/actions/activate

Resource Path and Query Parameters

None.

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 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.

Request Body

The request body identifies the devices that you want to activate, and other information about the activation. You can either list individual devices, or work with all devices in a device group and/or all devices that have specific custom field values.

Parameter Name Data Type Description
devices
required
array of deviceIds objects Up to 10,000 devices for which you want to activate service, specified by device identifier.
NOTES
  • Specify either 4G devices or 2G/3G devices in each request. You cannot activate 4G devices and 2G/3G devices in the same request.
  • Do not include this parameter if you want to use the deviceGroup parameter to activate all devices in a device group.
kind,
id

required for devices
strings The type and value of the device identifier.
  • For 2G or 3G devices: ESN (decimal, 11 digits) or MEID (hexadecimal, 14 digits)
  • For 4G devices: IMEI (decimal, up to 15 digits) and ICCID (decimal, up to 20 digits), in that order
NOTE: If you are using a skuNumber to add 4G devices, you must provide only the ICCID identifier.
ipAddress
optional
string The IP address to assign to the device in the following format: 1-255.0-255.0-255.0-255.
accountName
optional
string The name of a billing account.
This parameter is only required if the UWS account used for the current API session has access to multiple billing accounts.
An account name is usually numeric, and must include any leading zeros.
servicePlan
required
string The service plan code that you want to assign to all specified devices. Set this parameter to one of the code values returned by GET /plans/{accountname}.
Verizon Wireless provides service plan codes at the time of on-boarding and subsequently whenever there are any changes to the service plan.
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 activation request will fail.
mdnZipCode
required
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.
NOTE: If you include leadId in an activation request, you should set the mdnZipCode value to match the AddressZipCode value defined for the lead.
groupName
optional
string This parameter can serve either of two purposes:
  • If you specify devices by ID in the devices paramters, this is the name of a device group that the devices should be added to. (They will be in the default device group if you don’t specify one.)
  • If you don’t specify individual devices with the devices parameter, you can provide the name of a device group to activate all devices in that group.
skuNumber
optional
string (20 characters max) The Stock Keeping Unit (SKU) of a 4G device type 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: When using SKU based activations, SIM OTA must be performed prior to performing maintenance transactions (Service Plan change, feature change, ICCID change.)
carrierName
optional
string The carrier that will perform the activation. This parameter is only required if you have more than one carrier. If you have only one carrier you do not need to specify the carrierName; your carrier will be used by default.
carrierIpPoolName
optional
string The pool from which your device IP addresses will be derived. If you do not include this element, the default pool will be used.
customFields
optional
list of customField objects The names and values of any custom fields that you want to set during activation.
key
required for customFields
string The name of the custom field. Valid names are CustomField1, CustomField2, CustomField3, CustomField4, and CustomField5.
value
required for customFields
string The value of the custom field.
leadId
optional
string The ID of a “Qualified” or “Closed - Won” VPP customer lead, which is used with other values to determine MDN assignment, taxation, and compensation. Use GET /leads to get a list of valid Lead IDs.
LeadId is not allowed for non-VPP activations.
NOTE: If you include leadId in an activation request, you should set the mdnZipCode value to match the zip value in the address returned for the lead.
costCenterCode
optional
string A string to identify the cost center that the device is associated with. This value will be applied to all devices in the activation request. Valid values are any string of up to 25 alphanumeric characters, space, dash, exclamation point, and pound sign.
publicIpRestriction
optional
string For 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 device will have full access to the Internet.
  • Restricted = The device will have access to any content provided by Verizon Wireless but will be restricted from access to the Internet.
If left blank, the device will get the default value set for the account. Public network devices with dynamic IP addresses are always unrestricted.
primaryPlaceOfUse
optional
object The customer name and the address of the device’s primary place of use. Leave these fields empty to use the account profile address as the primary place of use. These values will be applied to all devices in the activation request.
If the account is enabled for non-geographic MDNs and the device supports it, the primaryPlaceOfUse address will also be used to derive the MDN for the device.
The Primary Place of Use location may affect taxation or have other legal implications. You may want to speak with legal and/or financial advisers before entering values for these fields.
NOTE: primaryPlaceOfUse cannot be used with leadId. VPP partners should enter a leadId value for a customer lead, and the AddressZipCode in the lead record will be used for taxation. VPP partners can use primaryPlaceOfUse fields without a leadId to associate customer-specific data with devices.
customerName
required for primaryPlaceOfUse
object The customer name to be used for line usage taxation.
title
optional for customerName
string An optional title for the customer, such as “Mr.” or “Dr.”
firstName
required for customerName
string The customer’s first name. Valid values are any string of up to 20 alphanumeric characters, space, dash, exclamation point, and pound sign.
middleName
optional for customerName
string The customer’s middle name.
lastName
required for customerName
string The customer’s last name. Valid values are any string of up to 25 alphanumeric characters, space, dash, exclamation point, and pound sign.
suffix
optional
string An optional suffix for the customer name, such as “Jr.” or “III.”
address
required for primaryPlaceOfUse
object The customer address for the line’s primary place of use, for line usage taxation.
addresLine1
required for address
string The street address for the line’s primary place of use. This must be a physical address for taxation; it cannot be a P.O. box.
addressLine2
optional for address
string Optional additional street address information.
city
required for address
string The city for the line’s primary place of use.
state
required for address
string The state for the line’s primary place of use.
zip
required for address
string The Zip code for the line’s primary place of use.
zip4
optional
string The ZIP+4 for the line’s primary place of use.
country
required for address
string Either “US” or “USA” for the country of the line’s primary place of use.
phone
optional
string A phone number where the customer can be reached.
phoneType
optional
string A single letter to indicate the customer phone type:
  • M = Mobile
  • H = Home
  • F = Fax
  • W = Work/Business
  • P = Pager
emailAddress
optional
string An email address for the customer.

Example Request Body

Request to activate one 3G device with only the required parameters:

{
   "devices":[  
      {  
         "deviceIds":[  
            {  
               "kind":"esn",
               "id":"09611822299"
            }
         ]
      }
   ],
   "accountName":"0868924207-00001",
   "servicePlan":"m2m_3G",
   "mdnZipCode":"98801"
}

Request to activate two 3G device with only the required parameters:

{
   "devices":[  
      {  
         "deviceIds":[  
            {  
               "kind":"MEID",
               "id":"A1000000000123"
            }
         ]
      },
      {  
         "deviceIds":[  
            {  
               "kind":"MEID",
               "id":"A1000000000125"
            }
         ]
      }
   ],
   "accountName":"0868924207-00001",
   "servicePlan":"m2m_3G",
   "mdnZipCode":"98801"
}

Request to activate two 4G devices and set IP Address:

{
  "devices":[
    {
      "deviceIds":[
        {
          "kind":"imei",
          "id":"990013907835573"
        },
        {
          "kind":"iccid",
          "id":"89141390780800784259"
        }
      ]
      "ipAddress" : "100.127.22.33"
    },
    {
      "deviceIds":[
        {
          "kind":"imei",
          "id":"990013907884259"
        },
        {
          "kind":"iccid",
          "id":"89141390780800735573"
        }
      ]
      "ipAddress" : "100.127.22.34"
    }
  ],
  "accountName":"0868924207-00001",
  "servicePlan":"m2m_4G",
  "mdnZipCode":"98801",
  "customFields":[
    {
      "key":"CustomField2",
      "value":"SuperVend"
    }
  ],
  "groupName":"4G West",
  "primaryPlaceOfUse":{
    "customerName":{
      "title":"President",
      "firstName":"Zaffod",
      "lastName":"Beeblebrox"
    },
    "address":{
      "addressLine1":"1600 Pennsylvania Ave NW",
      "city":"Washington",
      "state":"DC",
      "zip":"20500",
      "country":"USA"
    }
  }
}

Request to activate 4G devices using SKU and ICCID:

{  
   "devices":[  
      {  
         "deviceIds":[  
            {  
               "kind":"iccid",
               "id":"89141390780800784259"
            }
         ]
      },
      {  
         "deviceIds":[  
            {  
               "kind":"iccid",
               "id":"89141390780800735573"
            }
         ]
      }
   ],
   "accountName":"0868924207-00001",
   "servicePlan":"m2m_4G",
   "mdnZipCode":"98801",
   "skuNumber":"7640111922001"
}

Success Responses

Status 200

Parameter Name Data Type Description
requestId string A unique string that associates the request with the results that are sent via a callback service.
The ThingSpace 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.

Example Success Response

{
  "requestId": "595f5c44-c31c-4552-8670-020a1545a84d"
}

Example Success Callback Response

{
  "username":"",
  "password":"",
  "requestId":"595f5c44-c31c-4552-8670-020a1545a84d",
  "deviceIds":[
    {
      "id":"352452060026934",
      "kind":"IMEI"
    }
  ],
  "deviceResponse":{
    "activateResponse":{
      "deviceIds":[
        {
          "id":"5096306081",
          "kind":"mdn"
        },
        {
          "id":"311480104434320",
          "kind":"imsi"
        },
        {
          "id":"89148000001024124378",
          "kind":"iccId"
        },
        {
          "id":"13122379508",
          "kind":"msisdn"
        },
        {
          "id":"2345958183",
          "kind":"min"
        }
      ],
      "ipAddress":"10.224.48.88",
      "state":"Active",
      "servicePlan":"84638",
      "featureCodes":[],
      "deviceCredential":{
        "username":"5096306081@vzw3g.com",
        "password":"5096306081"
      }
    }
  },
  "status":"Success",
  "callbackCount":1,
  "maxCallbackThreshold":4
}

Failure Responses

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.

Try It Out!