Suspend Devices

Suspend Service for Devices:
POST /devices/actions/suspend

Suspends service for one or more devices.

Contents

See also:
About Device States
Service Provisioning Rules
Activate 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 suspending and restoring service for devices.

A suspended device continues to be billed in accordance with the contract terms associated with that device.

A device cannot be suspended indefinitely, and the CarrierService callback message for this API includes information about when the device will automatically return to the Active state due to reaching the maximum number of days allowed by the account contract. You can register for the ResumeTrackingNotification callback to be notified 7 days before a suspended device will automatically be returned to Active status.

You can specify a list of individual devices, or work with all devices in an account or device group. You can filter the account or device group by service plan or custom field value to limit the devices affected. ThingSpace sends an asynchronous CarrierService callback message for each device in the request when service for the device has been suspended, or if there was a problem and service could not be suspended.

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

NOTE: Most accounts allow two service provisioning actions (Activate, Suspend, Restore, Deactivate) per line per day. For example, you can suspend service for a device and restore it in a 24-hour period, but you cannot activate service for a device, suspend the service and restore the service in the same 24-hour period. If you require the ability to perform up to 25 Suspend or Restore transactions per line per day, contact your account representative or customer support.

Request Components

HTTP Request

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

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 to suspend. 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 suspend 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
strings 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 suspend 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*
array 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.

* 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

Suspend service for a single device

{
  "devices": [
    {
      "deviceIds": [
        {
          "id": "89148000000800139708",
          "kind": "iccid"
        }
      ]
    }
  ]
}

Suspend 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"
        }
      ]
    }
  ]
}

Suspend service for all devices in a specified device group that have a specified service plan

{
  "accountName": "1023456-0001",
  "groupName": "southwest",
  "servicePlan": "m2m4G"
}

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":"5b645698-162f-4897-889d-c61275ab1afc",
  "deviceIds":[
    {
      "id":"A100001F702731",
      "kind":"MEID"
    },
    {
      "id":"9083074681",
      "kind":"MDN"
    }
  ],
  "deviceResponse":{
    "suspendResponse":{
      "expectedResumeDate":"05/25/2018",
      "maxSuspendDaysAllowed":180,
      "numDaysSuspendedLast12Months":93,
      "numDaysSuspendAllowedCurrent12Months":87
    }
  },
  "comment":"Device Suspended - Applicable Charges Will Continue",
  "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!