Text Enabled TFN Inventory
The following is an example REST/JSON text enabled inventory request from the user:
POST /api/v2/tss-text-sr-inventory-tfn HTTP/1.0
Content-Type: application/json
Content-Length: <num>
{
"id":"user",
"pwd":"password",
"tspid":"12345", // looks for owner and routing TSPID
"partialTfn":"8" // a single “8” means all 8xxXxxXxxx TFNs
}
This request asks the TSS to return TFNs where the given tspid is in use as an owner or a routing
TSPID. The user can provide more digits in the partialTfn to narrow the request -- such as “800555”
would provide all 800555xxxx values that match the owner or the routing TSPID.If the id does not have permissions for the given tspid, then a failure results. The maximum size in
the response is 10,000 TFNs. Therefore, if the partialTfn results in more than the maximum, then an error response results and the user must narrow the partialTfn in the request by providing more digits
in the partialTfn.
The response list is ordered, ascending, by TFN. 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-text-sr-inventory-tfn", // positive confirmation
"responses":[ // an array of responses
{ // the first response
"tfn":"8005001212",
"status":"Pending", // see status table below
"routingTspid":"01234",
"ownerTspid":"12345",
"ror":"12345",
"date":"04/21/2015 18:03:56 GMT", // GMT, the only timezone
"businessName":"Subscriber Business Name"
}, // the end of the first response
{ // the start of the second response
"tfn":"8005001213",
"status":"Enabled", // see status table below
"routingTspid":"12121",
"ownerTspid":"12345",
"ror":"ROR12",
"date":"04/09/2015 07:49:06 GMT", // GMT, the only timezone
"businessName":"Subscriber Business Name"
} // the end of the second response
] // the end of the response array
}
Failure responses are discussed in the Error section.