Deactivate Devices

Deactivate Service for Devices:
POST /devices/actions/deactivate

Deactivates service for one or more devices.

NOTE: Deactivating service for a device may result in an early termination fee (ETF) being charged to the account, depending on the terms of the contract with Verizon. If your contract allows ETF waivers and if you want to use one for a particular deactivation, set the EtfWaiver value to True.

Contents

See also:
About Device States
Service Provisioning Rules
Activate Service for Devices
Suspend Service for Devices
Restore Service for Devices

Uses and Requirements

You should be familiar with the M2M Service Provisioning Rules before deactivating devices.

You can specify a list of individual devices, or work with all devices in an account or device group. You can limit the devices affected by applying service plan or custom field filters.

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

Request Components

HTTP Request

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

Query Parameters

None.

Header Parameters

The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token.

Parameter Name Data Type Description
VZ-M2M-Token
required
string A valid session token returned by POST /session/login.
Authorization
required
string HTTP Authorization bearer token.

Request Body

The request body identifies the devices to deactivate. You can either list individual devices, or work with all devices in an account or device group, and optionally filter by service plan or custom field values.

Parameter Name Data Type Description
devices
optional*
array of deviceIds objects The devices for which you want to deactivate service, specified by device identifier. You only need to provide one identifier per device. Do not use accountName, groupName, or customFields if you use this parameter.
kind,
id

required for devices
string The type and value of the device identifier.
  • ESN - decimal, 11 digits
  • ICCID - decimal, up to 20 digits
  • IMEI - decimal, up to 15 digits
  • MDN - decimal, 10 digits
  • MEID - hexadecimal, 14 characters
  • MSISDN - decimal, 11 digits
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.
groupName
optional*
string The name of a device group, if you want to deactivate all devices in that group.
servicePlan
optional*
string The name of a service plan, if you want to only include devices that have that service plan.
customFields
optional*
list of customField objects Custom field names and values, if you want to only include devices that have matching values.
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. The value is not case-sensitive, but other than that it must match exactly with the value set for a device. Wildcards and partial matches are not supported.
reasonCode
optional
string code identifying the reason for the deactivation. Currently the only valid reason code is “FF”, which corresponds to General Admin/Maintenance.
etfWaiver
optional
boolean Fees may be assessed for deactivating Verizon Wireless devices, depending on the account contract. The etfWaiver parameter waives the Early Termination Fee (ETF), if applicable.
  • When etfWaiver is set to true, the fee will be waived, assuming that waivers are allowed in the contract and they have not all been used.
  • When etfWaiver is set to false, the fee will not be waived via this mechanism. If you use a business process where you deactivate devices and apply ETF waivers through some other mechanism, you may continue to follow that process,and simply set etfWaiver to false.
If your account does not have ETF waivers at all, set etfWaiver to False. The Deactivate request will fail if you set etfWaiter to true and there are no waivers available based on the contract.

* You can either specify up to 10,000 individual devices with the devices parameter, or you can use any combination of groupName, servicePlan, and customFields to run the request on all devices that match all criteria.

Example Request Body

Deactivate a single device

{
  "devices": [
    {
      "deviceIds": [
        {
          "id": "89148000000800139708",
          "kind": "iccid"
        }
      ]
    }
  ],
  "reasonCode": "FF",
  "etfWaiver": true
}

Deactivate service for two 4G devices

The accountName is only needed if the user has access to more than one account.

{
  "accountName": "0868924207-00001",
  "devices": [
    {
      "deviceIds": [
        {
          "id": "89141390780800784259",
          "kind": "iccid"
        }
      ]
    },
    {
      "deviceIds": [
        {
          "id": "89141390780800735573",
          "kind": "iccid"
        }
      ]
    }
  ],
  "reasonCode": "FF",
  "etfWaiver": true
}

Deactivate all devices in a specified device group that have a specified service plan

{
  "accountName": "1023456-0001",
  "groupName": "southwest",
  "servicePlan": "m2m4G",
   "reasonCode": "FF",
   "etfWaiver": false
}

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":"eb3406b0-15fc-4473-8e84-b92cfb67f22d",
  "deviceIds":[  
    {  
      "id":"990003420535573",
      "kind":"imei"
    },
    {  
      "id":"89148000000800784259",
      "kind":"iccid"
    }
  ],
  "deviceResponse":{  
    "deactivateResponse":{  
      "deactivated":true
    }
  },
  "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!