Returns a list of all Numbering Plan Area (NPA) codes containing purchasable phone numbers. All request parameters are optional. If you don't specify a limit, results are limited to the first 10 items.
Endpoint
GET /available/areacodesQuery Parameters
-
limit
integerLimits the number of area codes to retrieve. A maximum of 400 items can be retrieved with 10 being the default value if not specified.
-
offset
integerOffsets the list of area codes to retrieve by your specified value.
-
max_setup_cost
floatRestricts the results to area codes that include at least one telephone number with a setup fee below or equal to the specified max_setup_cost. For more details around pricing, please see Flowroute Pricing Details.
Response Fields
On success, the HTTP status code in the response header is 200 OK and the response body contains an array of area code objects in JSON format. On error, the header status code is an error code and the response body contains an array of error objects.
-
data
arrayAn array of area code objects that satisfy your query individually composed of:
-
id
integerUnique identifier of the area code.
-
links
objectLinks object pointing to the related exchanges to the returned area code. For example, https://api.flowroute.com/v2/numbers/available/exchanges?areacode=201.
-
type
stringThis will always be areacode.
-
links
objectLinks object pointing to your search and a link to the next page if any. For example, https://api.flowroute.com/v2/numbers/available/areacodes?limit=2&offset=0.
Example Request
GET /v2/numbers/available/areacodes?limit=2 HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Example Request
curl https://api.flowroute.com/v2/numbers/available/areacodes?limit=2 -u accessKey:secretKey
Example Responses
200 OK
{
"data": [
{
"id": "201",
"links": {
"related": "https://api.flowroute.com/v2/numbers/available/exchanges?areacode=201"
},
"type": "areacode"
},
{
"id": "202",
"links": {
"related": "https://api.flowroute.com/v2/numbers/available/exchanges?areacode=202"
},
"type": "areacode"
}
],
"links": {
"next": "https://api.flowroute.com/v2/numbers/available/areacodes?limit=2&offset=2",
"self": "https://api.flowroute.com/v2/numbers/available/areacodes?limit=2&offset=0"
}
}
422 UNPROCESSABLE ENTITY
{
"errors": [
{
"detail": "could not convert string to float: *",
"id": "5c4c0ea0-4ef3-434a-b6c5-31861954c127",
"status": 422
}
]
}