Get NANPA Prefixes

Description

Returns a collection of NANPA Prefixes.

Request

HTTP Method: GET

URI Path: /v3/nanpa_prefixes

URI Query Parameters:

Name

Type

Is Required?

Description

filter[<filter_name>]

string, boolean

Optional

Filtering

include

string

Optional

Inclusion

sort

string

Optional

Sorting

Includes:

Value

Description

country

Country Object

region

Region Object

Filters:

Filter Name

Type

Allow Blank

Allow Array

Filters by:

id

string

No

Yes

NANPA Prefixes id field.

npa

string

Yes

Yes

NANPA Prefixes npa field.

nxx

string

Yes

Yes

NANPA Prefixes nxx field.

npanxx

string

No

No

NANPA Prefixes npa / nxx fields.

country.id

string

Yes

Yes

A country.id field.

region.id

string

Yes

Yes

A region.id field.

did_group.is_available

boolean

No

No

Availability of DIDs in stock for prefix.

did_group.features

string

No

Yes

Availability of DIDs in stock with features for prefix. Can be one/several/all of “voice_in”, “voice_out”, “t38”, “sms_in”, “sms_out”. example: “voice_in,sms_in”

Sorting:

Value

Sorts by:

npa

NANPA Prefixes npa field.

nxx

NANPA Prefixes nxx field.

Fielding:

Value

Returns:

id

The id field.

npa

The npa field.

nxx

The nxx field.

country

The country field.

region

The region field.

Examples

http

GET /v3/nanpa_prefixes HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API Token]

curl

curl -i -X GET https://api.didww.com/v3/nanpa_prefixes -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"

response

HTTP/2 200 OK
Content-Type: application/vnd.api+json

 {
     "data": [
         {
             "id": "1d968dcf-8ee7-40fa-8073-cdbc027bc3b3",
             "type": "nanpa_prefixes",
             "attributes": {
                 "npa": "201",
                 "nxx": "221"
             },
             "relationships": {
                 "country": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/1d968dcf-8ee7-40fa-8073-cdbc027bc3b3/relationships/country",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/1d968dcf-8ee7-40fa-8073-cdbc027bc3b3/country"
                     }
                 },
                 "region": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/1d968dcf-8ee7-40fa-8073-cdbc027bc3b3/relationships/region",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/1d968dcf-8ee7-40fa-8073-cdbc027bc3b3/region"
                     }
                 }
             }
         },
         {
             "id": "c8770990-8a6f-4e11-8b88-420cc9375931",
             "type": "nanpa_prefixes",
             "attributes": {
                 "npa": "201",
                 "nxx": "234"
             },
             "relationships": {
                 "country": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/c8770990-8a6f-4e11-8b88-420cc9375931/relationships/country",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/c8770990-8a6f-4e11-8b88-420cc9375931/country"
                     }
                 },
                 "region": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/c8770990-8a6f-4e11-8b88-420cc9375931/relationships/region",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/c8770990-8a6f-4e11-8b88-420cc9375931/region"
                     }
                 }
             }
         },
         {
             "id": "a5958064-96d7-4594-b9bc-a5b9c3bba01f",
             "type": "nanpa_prefixes",
             "attributes": {
                 "npa": "201",
                 "nxx": "275"
             },
             "relationships": {
                 "country": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/a5958064-96d7-4594-b9bc-a5b9c3bba01f/relationships/country",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/a5958064-96d7-4594-b9bc-a5b9c3bba01f/country"
                     }
                 },
                 "region": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/a5958064-96d7-4594-b9bc-a5b9c3bba01f/relationships/region",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/a5958064-96d7-4594-b9bc-a5b9c3bba01f/region"
                     }
                 }
             }
         },
         {
             "id": "fcd178f8-3085-42c2-9831-7ca30fc01789",
             "type": "nanpa_prefixes",
             "attributes": {
                 "npa": "201",
                 "nxx": "301"
             },
             "relationships": {
                 "country": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/fcd178f8-3085-42c2-9831-7ca30fc01789/relationships/country",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/fcd178f8-3085-42c2-9831-7ca30fc01789/country"
                     }
                 },
                 "region": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/fcd178f8-3085-42c2-9831-7ca30fc01789/relationships/region",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/fcd178f8-3085-42c2-9831-7ca30fc01789/region"
                     }
                 }
             }
         },
         {
             "id": "1ff532b2-fec0-4f13-b661-d688ac29dfb0",
             "type": "nanpa_prefixes",
             "attributes": {
                 "npa": "201",
                 "nxx": "345"
             },
             "relationships": {
                 "country": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/1ff532b2-fec0-4f13-b661-d688ac29dfb0/relationships/country",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/1ff532b2-fec0-4f13-b661-d688ac29dfb0/country"
                     }
                 },
                 "region": {
                     "links": {
                         "self": "https://api.didww.com/v3/nanpa_prefixes/1ff532b2-fec0-4f13-b661-d688ac29dfb0/relationships/region",
                         "related": "https://api.didww.com/v3/nanpa_prefixes/1ff532b2-fec0-4f13-b661-d688ac29dfb0/region"
                     }
                 }
             }
         }
     ],
     "meta": {
         "total_records": 4330,
         "api_version": "2022-05-10"
     },
     "links": {
         "first": "https://api.didww.com/v3/nanpa_prefixes?page%5Bnumber%5D=1&page%5Bsize%5D=5",
         "next": "https://api.didww.com/v3/nanpa_prefixes?page%5Bnumber%5D=2&page%5Bsize%5D=5",
         "last": "https://api.didww.com/v3/nanpa_prefixes?page%5Bnumber%5D=866&page%5Bsize%5D=5"
     }
 }

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized