Search DID Inventory

With IntelePeer Direct Inward Dialing (DID) APIs you can manage domestic voice traffic.

 

Use Search DID Inventory to locate numbers that allow customers to call you for free. Provides the ability to search and enumerate customer inventory.

 

Note: You cannot purchase or port numbers from this resource.

Endpoints and methods
  • GET /_rest/v4/carrier/did
Parameters

Path

 

Field

Type

Description

City (optional)

String[]

The city of the desired endpoint(s).

 

  • Requires stateProvince

 
Contains (optional)

E.164

All or part of an endpoint to search for.

 

  • Must be scalar.

  • Mutually exclusive with sequential.

 
Npa (optional)

Numeric[]

The NPA (area code) of the desired endpoint(s).

 

  • Either like, npa or stateProvince is required.

 
Nxx (optional)

Numeric[]

The NXX (local prefix) of the desired endpoint(s).

 

  • Requires npa.

 
Page (optional)

Integer

Which page of results to retrieve.

 

  • Note: This parameter is ignored for sequential queries.

  • Default value: 1.

  • Must be scalar.

 
pageSize (optional)

Integer

The quantity of endpoints to return per page.

 

  • Between 1 and 250.

  • Default value: 100.

  • Must be scalar.

 
Sequential (optional)

Boolean

Whether or not the desired endpoints must be sequential (contiguous).

 

  • Sequential searches are limited to a maximum pageSize of 100.
  • May cause more than pageSize records to be returned.
  • Must be scalar.
  • Allowed values: 0, 1.
 
Starts-with (optional)

String

All or part of an endpoint to search for.

 

  • Must be scalar.

 

stateProvince (optional)

String[]

The state/province of the desired endpoint(s).

 

  • Two-character abbreviation.

 

 

NPA-NXX request

GET /_rest/v4/carrier/did?npa=303&nxx=729

 

Sequential request

GET /_rest/v4/carrier/did?stateProvince=CO&sequential=1&pageSize=20
Response examples and schema 

 

Success 200

 

Field

Type

Description

endpoints

Array

An array of endpoints matching the search terms.

 

endpoint

Numeric

The e.164 representation of the endpoint.

 

geo

Object

Geographical information about the endpoint.

 

city

String

The endpoint’s city.

 

country

String

The endpoint’s country (2-char abbreviation).

 

stateProvince

String

The endpoint’s state/province (2-char abbreviation).

 

hasMore

Boolean

Whether or not more results are available on the next page.

Note: sequential queries will always indicate “hasMore”: false.

 

 
HTTP/1.1 200 OK

{

      "endpoints": [

            {

                  "endpoint": "+13037293863",

                  "geo": {

                        "city": "AURORA",

                        "country": "US",

                        "stateProvince": "CO"

                  }

            },

            {

                  "endpoint": "+13037293864",

                  "geo": {

                        "city": "AURORA",

                        "country": "US",

                        "stateProvince": "CO"

                  }

            }

      ],

      "hasMore": true

}
Response example and schema 

 

Error 

 

Name

Type

Description

code

Integer

Error code

error

String

Error description


HTTP/1.1 401 Unauthorized

{

      "code": 401,

      "error": "Unauthorized"

}




HTTP/1.1 401 Unauthorized

{

      "code": 401,

      "error": "Session Expired"

}
HTTP/1.1 406 Not Acceptable

{

      "code": 406,

      "error": "Not Acceptable"

}
HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

      "error": "At least one of the following parameters is required: 'npa', 'stateProvince'"

}




HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

      "error": "The '%s' parameter must be scalar."

}




HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

      "error": "The '%s' parameter must be formatted as a(n) boolean."

}




HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

      "error": "The '%s' parameter must be formatted as a(n) integer."

}




HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

      "error": "The '%s' parameter must be formatted as a(n) numeric."

}




HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

      "error": "The '%s' parameter must be formatted as a(n) string."

}