Standard APIsConnectivity ManagementAPI EndpointsDevice ManagementUpdate Device Cost Center Code

API Reference

Change Device Cost Center

Uses and Requirements

ThingSpace sends an asynchronous CarrierService callback message for each device in the request when the device has been changed, or if there was a problem and the change could not be completed.

Request Components

HTTP Request

PUT https://thingspace.verizon.com/api/m2m/v1/devices/costCenter

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 NameData TypeDescription
Authorization requiredstringHTTP Authorization bearer token.
VZ-M2M-Token requiredstringA valid session token returned by POST /session/login.
Content-Type requiredstringMust be application/json.

Request Body

The request body identifies the devices to change and also the type of change you want to make.

Select the devices to change:

Parameter NameData TypeDescription
devices (optional)array of deviceIds objectsA list of the devices that you want to change, specified by device identifier. Do not include accountName, groupName, customFields, or servicePlan if you use this parameter.
kind, id (required) for devicesstringThe type and value of the device identifier. ESN - decimal, 11 digits ICCID - decimal, up to 20 digits IMEI - decimal, up to 16 digits MDN - decimal, 10 digits MEID - hexadecimal, 14 characters MSISDN - decimal, 11 digits
accountName (optional) RecommendedstringThe 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. *By coding for the account number today, you prevent future code from breaking if you ever add a new sub-account.
groupName (optional)stringThe name of a device group, if you want to only include devices in that group.
servicePlan (optional)stringThe name of a service plan, if you want to only include devices that have that service plan.
customFields (optional)list of customField objectsCustom field names and values, if you want to only include devices that have matching values.
key (required) for customFieldsstringThe name of the custom field. Valid names are CustomField1, CustomField2, CustomField3, CustomField4, and CustomField5.
value (required) for customFieldsstringThe 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.

Change or remove the cost center code:

Parameter NameData TypeDescription
filterobjectThe filter criteria for cost centers to be removed or changed.
customFields (required)arrayCustom field keys and values to only include devices that have matching values.
costCenter (optional)stringThe new cost center code. Valid values are any string of up to 36 alphanumeric characters, space, dash, exclamation point, and pound sign.
removeCostCenter (optional)BooleanSet to true to remove the cost center code value. This flag takes precedence over a new costCenter value. If this flag is true and costCenter has a value, the cost center code is removed. Do not include this parameter, or set it to false to change the costCenter value.
accountName (optional)stringThe name of a billing account. An account name is usually numeric, and must include any leading zeros.
servicePlan (optional)stringThe name of a service plan that is being changed to. If removing service plans, this value is ignored.

Change the customer name and/or address:

Parameter NameData TypeDescription
primaryPlaceOfUse requiredobjectThe customer name and the address of the device’s primary place of use. These values are applied to all devices in the request. 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.
customerName required for primaryPlaceOfUseobjectThe customer name to be used for line usage taxation.
title (optional)stringAn optional title for the customer, such as “Mr.” or “Dr.”
firstName required for customerNamestringThe customer’s first name. Valid values are any string of up to 20 alphanumeric characters, space, dash, exclamation point, and pound sign.
middleName (optional)stringThe customer’s middle name.
lastName required for customerNamestringThe customer’s last name. Valid values are any string of up to 25 alphanumeric characters, space, dash, exclamation point, and pound sign.
suffix (optional)stringAn optional suffix for the customer name, such as “Jr.” or “III.”
address required for primaryPlaceOfUseobjectThe customer address for the line’s primary place of use, for line usage taxation.
addressLine1 required for addressstringThe 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)stringOptional additional street address information.
city required for addressstringThe city for the line’s primary place of use.
state required for addressstringThe state for the line’s primary place of use.
zip required for addressstringThe ZIP code for the line’s primary place of use.
zip4 (optional)stringThe ZIP+4 for the line’s primary place of use.
country required for addressstringEither “US” or “USA” for the country of the line’s primary place of use.
phone (optional)stringA phone number where the customer can be reached.
phoneType (optional)stringA single letter to indicate the customer phone type: M = Mobile H = Home F = Fax W = Work/Business P = Pager
emailAddress (optional)stringAn email address for the customer.

Example Request Body

Change the cost center code for a single device

{
    "costCenter": "cc12345",
    "devices": [
    {
        "deviceIds": [
        {
            "id": "20-digit ICCID",
            "kind": "iccid"
        }
        ]
    }
    ]
}

Change the cost center code for multiple devices

{
    "costCenter": "cc12345",
    "devices": [
    {
        "deviceIds": [
        {
            "id": "20-digit ICCID",
            "kind": "iccid"
        }
        ]
    },
    {
        "deviceIds": [
        {
            "id": "20-digit ICCID",
            "kind": "iccid"
        }
        ]
    }
    ]
}

Remove the cost center code from all devices in an account that have a specified custom field value

{
   "filter":{
      "customFields":[
         {
            "key":"string",
            "value":"string"
         }
      ]
   },
   "costCenter":"string",
   "removeCostCenter":true,
   "accountName":"string",
   "servicePlan":"string"
} 

Change the name and address for a device

{
    "devices":[
    {
        "deviceIds":[
        {
            "kind":"imei",
            "id":"15-digit IMEI"
        }
        ]
    }
    ],
    "accountName": "0000123456-00001",
    "primaryPlaceOfUse":{
    "customerName":{
        "title":"President",
        "firstName":"Zaffod",
        "lastName":"Beeblebrox"
    },
    "address":{
        "addressLine1":"1600 Pennsylvania Ave NW",
        "city":"Washington",
        "state":"DC",
        "zip":"20500",
        "country":"USA"
    }
    }
}

Success Responses

Status 200

Parameter NameData TypeDescription
requestIdstringA unique string that associates the request with the results that are sent via a callback service. The ThingSpace Platform sends 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 have the same requestId.

Example Success Response

{
    "requestId": "595f5c44-eeee-ffff-gggg-020a1545a84d"
}

Example Success Callback Response

Callback for changing a cost center

{
    "username":"",
    "password":"",
    "requestId":"c8de7c1d-eeee-ffff-gggg-db76cb2ce509",
    "deviceIds":[  
    {  
        "id":"10-digit phone number",
        "kind":"mdn"
    }
    ],
    "deviceResponse":{
    "deviceCostCenterResponse": {
        "costCenterCode": "VZW103"
    }
    }
}

Callback for removing a cost center

{
    "username":"user name",
    "password":"user's password",
    "requestId":"c8de7c1d-eeee-ffff-gggg-db76cb2ce509",
    "deviceIds":[  
    {  
        "id":"10-digit phone number",
        "kind":"mdn"
    }
    ],
    "deviceResponse":{
    "deviceCostCenterResponse": {}
    }
}

Callback for changing Primary Place of Use

{
      "username": "",
      "password": "",
      "requestId": "c8de7c1d-eeee-ffff-gggg-db76cb2ce509",
      "deviceIds": [
        {
          "id": "15-digit IMEI",
          "kind": "imei"
        }
      ],
      "deviceResponse": {
        "deviceCostCenterResponse": {
          "primaryPlaceOfUse": {
            "address": {
              "addressLine1": "9808",
              "addressLine2": "Scranton Road",
              "city": "San Diego",
              "state": "CA",
              "country": "US",
              "zip": "92121",
              "zip4": "01234",
              "phone": "1234567890",
              "phoneType": "M",
              "emailAddress": "zaffod@theinternet.com"
            },
            "customerName": {
              "firstName": "Zaffod",
              "lastName": "Beeblebrox",
              "middleName": "Q",
              "title": "President",
              "suffix": "I"
            }
          }
        }
      },
      "callbackCount": 1,
      "maxCallbackThreshold": 4
    }

On this page