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 A list containing the reserved endpoint(s).
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.
stateProvince STRING The endpoint’s State/Province.
hasMore BOOLEAN

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

Note: Sequential queries always indicate "hasMore": false.

Success Response

Copy
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

}

Error

Name Type Description
code INTEGER Error code
error STRING Error description

Code 401 Response

Copy
HTTP/1.1 401 Unauthorized

{

      "code": 401,

      "error": "Unauthorized"

}

 

Copy
HTTP/1.1 401 Unauthorized

{

      "code": 401,

      "error": "Session Expired"

}

Code 406 Response

Copy
HTTP/1.1 406 Not Acceptable

{

      "code": 406,

      "error": "Not Acceptable"

}

Code 422 Response

Copy
HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

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

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

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

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

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

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

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

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

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

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

      "code": 422,

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

}