Inventory Level API

Inventory Level API

Create an inventory coverage request

Creates an inventory coverage request. If locality, npa or national_destination_code is used in groupBy, and no region or locality filters are used, the whole paginated set is returned.

SecuritybearerAuth
Request
query Parameters
filter[npa]
integer

Filter by npa

Example: filter[npa]=318
filter[nxx]
integer

Filter by nxx

Example: filter[nxx]=202
filter[administrative_area]
string

Filter by administrative area

Example: filter[administrative_area]=LA
filter[phone_number_type]
string

Filter by phone number type

Enum: "local" "toll_free" "national" "mobile" "landline" "shared_cost"
Example: filter[phone_number_type]=local
filter[country_code]
string

Filter by country. Defaults to US

Enum: "US" "CA" "GB"
Example: filter[country_code]=US
filter[count]
boolean

Include count in the result

Example: filter[count]=true
filter[groupBy]
required
string

Filter to group results

Enum: "locality" "npa" "national_destination_code"
Example: filter[groupBy]=nxx
Responses
200

Successful response with a list of inventory coverage levels

Response Schema: application/json
Array of objects (InventoryCoverage)
object (InventoryCoverageMetadata)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/inventory_coverage
Request samples
const telnyx = require('telnyx')('YOUR_API_KEY');

const {data: inventoryCoverageRequest} = await telnyx.inventoryCoverage.request({
  filter: {
    npa: '318',
    nxx: '202',
    country_code: 'US',
    groupBy: 'nxx'
  }
});
Response samples
application/json
{
  • "data": [
    • {
      • "count": 3,
      • "coverage_type": "number",
      • "group": "318",
      • "group_type": "npa",
      • "number_range": 1,
      • "number_type": "did",
      • "phone_number_type": "local",
      • "record_type": "inventory_coverage_group"
      }
    ],
  • "meta": {
    • "total_results": 25
    }
}