Register a Callback Listener

POST /callbacks

Registers a URL at which an account receives asynchronous responses and other messages from a ThingSpace Platform callback service. The messages are REST messages. You are responsible for creating and running a listening process on your server at that URL to receive and parse the messages.

Contents

See also:

Request Components

A vz-m2m-token is required to use these APIs. To obtain a token, please visit Getting Started to get a token.

HTTP Request

POST https://thingspace.verizon.com/api/hyper-precise/v1/callbacks?accountNumber={accountNumber}

Request Parameters

td>string td>string

Parameter Data Type Description
name
required
string The name to be assigned to the listener service.
url
required
string Universal Resource Locator. The address of the listener service.
accountNumber
required
string A unique identifier for an account.

Request Body

Example request:

[
  {
    "aname": "string",
    "name": "string",
    "url": "string"
  }
]

Success Response

Status 200

A successful response will display the billing account number (aname), the name of the callback service (name) and the address of the callback listening service (url).

Example response:

[
  {
    "aname": "string",
    "name": "string",
    "url": "string"
  }
]

Failure Responses

Code and Meaning Format
400 - Bad Request.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device Not Found, Request will be queued"
}
401 - Unauthorized request. Access token is missing or invalid.
{
  "errorCode": "INVALID_ACCESS",
  "errorMessage": "The access policy denied the resource operation for this user"
}
403 - Forbidden request.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device Not Certified"
}
404 - Bad request. Not found.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device inactive"
}
409 - Bad request. Conflict state.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Service Not Purchased"
}

500 - Internal Server Error.

{
  "errorCode": "INTERNAL_ERROR",
  "errorMessage": "Device is active in several accounts"
}