Voice Enabled TFN Inventory
The following is an example REST/JSON voice enabled inventory request from the user:
POST /api/v2/tss-voice-ro-inventory-tfn HTTP/1.0
Content-Type: application/json
Content-Length: <num>
{
"id":"user",
"pwd":"password",
"ror":"RespOrgID", // issue this post again for each ROR desired
"partialTfn":"8", // a single “8” means all 8xxXxxXxxx TFNs
"page":"1", // page number (optional)
"sortOrder":"ASC" // sort order (optional)
}
This request asks the TSS to return a list of voice enabled TFNs for the given ror. If any of the TFNs are
enabled for text, the response will include details about the text enabled TFNs. The user can provide more
digits in the partialTfn to narrow the request (see table below for examples).
If the id does not have permissions for the given ror, then a failure results. The maximum size in the
response is 10,000 TFNs. If the response includes more than 10,000 TFNs, the remaining set of TFNs
can be retrieved by sending another request specifying the page number in the page field.
The response list is ordered by TFN based on the sortOrder field in the request. A response similar to the
following is issued by TSS to the user on success:
// The HTTP header is omitted for brevity. The JSON portion follows:
{
"url": "/api/v2/tss-voice-ro-inventory-tfn", // positive confirmation
"totalRecords":"624953", // total TFNs matching request criteria
"totalPages":"63", // total number of pages
"currentPage":"1 // current page
"tfns":[ // an array of responses containing tfns
{ // the first response
"tfn":"8005001212",
"status":"Voice Enabled", // see status table below
"ownerTspid":null,
"date":null, // GMT, the only timezone
"businessName":null
}, // the end of the first response
{ // start of the second response
"tfn":"8005001213",
"status":"Text Enabled", // see status table below
"ownerTspid":"12345",
"date":"04/09/2015 07:49:06 GMT", // GMT, the only timezone
"businessName":"Subscriber Business Name"
} // end of the second response
] // end of the response array
}
Failure responses are discussed in the Error section.
The following table enumerates the possible values for the status field on a successful request.
The following table describes the fields in the response.
The following table describes the possible response HTTP status codes.