List Numbers is a method related to your own inventory. This method allows you to search for numbers within your own inventory. This method can be useful to get the current configuration of one or multiple numbers.
To use the List Numbers API:
#!/bin/bash
curl -X GET --header 'Content-Type: application/json' 'https://fax.to/api/v2/numbers?api_key=API_KEY'
<?php
$defaults = [
CURLOPT_URL => 'https://fax.to/api/v2/numbers?api_key=API_KEY'
];
$ch = curl_init();
curl_setopt_array($ch, $defaults);
$response = curl_exec($ch);
// Decode the json object you retrieved when you ran the request.
$decodedResponse = json_decode($response, true);
var_dump($decodedResponse);
import urllib
params = {
'api_key': 'API_KEY'
}
url = 'https://fax.to/api/v2/numbers?' + urllib.urlencode(params)
response = urllib.urlopen(url)
print response.read()
require "net/http"
require "uri"
uri = URI.parse("https://fax.to/api/v2/numbers?api_key=API_KEY")
response = Net::HTTP.get(uri)
puts response
// Sample Output.
{
"status": "success",
"numbers": [
{
"id": 775,
"order_reference": null,
"country_code": "CAN",
"country": "CANADA",
"city_name": null,
"area_code": "204",
"did_group_id": 67,
"did_number": "+12048134699",
"expiration_date": "2017-07-30",
"status": "Active"
},
{
"id": 776,
"order_reference": null,
"country_code": "CAN",
"country": "CANADA",
"city_name": null,
"area_code": "204",
"did_group_id": 67,
"did_number": "+12048134700",
"expiration_date": "2017-07-30",
"status": "Active"
}
],
"meta": {
"pagination": {
"total": 7,
"count": 2,
"per_page": 2,
"current_page": 2,
"total_pages": 4,
"links": {
"previous": "https://fax.to/api/v2/numbers?page=1",
"next": "https://fax.to/api/v2/numbers?page=3"
}
}
}
}