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>] |
|
No |
|
include |
|
No |
|
sort |
|
No |
Includes:
Value |
Description |
---|---|
country |
|
region |
Filters:
Filter Name |
Type |
Allow Blank |
Allow Array |
Filters by: |
---|---|---|---|---|
id |
|
No |
Yes |
NANPA Prefixes |
npa |
|
Yes |
Yes |
NANPA Prefixes |
nxx |
|
Yes |
Yes |
NANPA Prefixes |
npanxx |
|
No |
No |
NANPA Prefixes |
country.id |
|
Yes |
Yes |
A |
region.id |
|
Yes |
Yes |
A |
did_group.is_available |
|
No |
No |
Availability of DIDs in stock for prefix. |
did_group.features |
|
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’. |
Sorting:
Value |
Sorts by: |
---|---|
npa |
NANPA Prefixes |
nxx |
NANPA Prefixes |
Fielding:
Value |
Returns: |
---|---|
id |
The |
npa |
The |
nxx |
The |
country |
The |
region |
The |
Examples
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 -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"
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"
}
}
GET /v3/nanpa_prefixes?filter%5Bcountry.id%5D=1f6fc2bd-f081-4202-9b1a-d9cb88d942b9 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API Token]
curl -i -X GET 'https://api.didww.com/v3/nanpa_prefixes?filter%5Bcountry.id%5D=1f6fc2bd-f081-4202-9b1a-d9cb88d942b9' -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"
HTTP/1.1 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": 1609,
"api_version": "2022-05-10"
},
"links": {
"first": "https://api.didww.com/v3/nanpa_prefixes?filter%5Bcountry.id%5D=1f6fc2bd-f081-4202-9b1a-d9cb88d942b9&page%5Bnumber%5D=1&page%5Bsize%5D=5",
"next": "https://api.didww.com/v3/nanpa_prefixes?filter%5Bcountry.id%5D=1f6fc2bd-f081-4202-9b1a-d9cb88d942b9&page%5Bnumber%5D=2&page%5Bsize%5D=5",
"last": "https://api.didww.com/v3/nanpa_prefixes?filter%5Bcountry.id%5D=1f6fc2bd-f081-4202-9b1a-d9cb88d942b9&page%5Bnumber%5D=322&page%5Bsize%5D=5"
}
}
GET /v3/nanpa_prefixes?include=country HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API Token]
curl -i -X GET 'https://api.didww.com/v3/nanpa_prefixes?include=country' -H "Accept: application/vnd.api+json" -H "Api-Key: [API Token]" -H "Content-Type: application/vnd.api+json"
HTTP/1.1 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"
},
"data": {
"type": "countries",
"id": "1f6fc2bd-f081-4202-9b1a-d9cb88d942b9"
}
},
"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"
},
"data": {
"type": "countries",
"id": "1f6fc2bd-f081-4202-9b1a-d9cb88d942b9"
}
},
"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"
},
"data": {
"type": "countries",
"id": "1f6fc2bd-f081-4202-9b1a-d9cb88d942b9"
}
},
"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"
},
"data": {
"type": "countries",
"id": "1f6fc2bd-f081-4202-9b1a-d9cb88d942b9"
}
},
"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"
},
"data": {
"type": "countries",
"id": "1f6fc2bd-f081-4202-9b1a-d9cb88d942b9"
}
},
"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"
}
}
}
}
],
"included": [
{
"id": "1f6fc2bd-f081-4202-9b1a-d9cb88d942b9",
"type": "countries",
"attributes": {
"name": "United States",
"prefix": "1",
"iso": "US"
},
"relationships": {
"regions": {
"links": {
"self": "https://api.didww.com/v3/countries/1f6fc2bd-f081-4202-9b1a-d9cb88d942b9/relationships/regions",
"related": "https://api.didww.com/v3/countries/1f6fc2bd-f081-4202-9b1a-d9cb88d942b9/regions"
}
}
}
}
],
"meta": {
"total_records": 4330,
"api_version": "2022-05-10"
},
"links": {
"first": "https://api.didww.com/v3/nanpa_prefixes?include=country&page%5Bnumber%5D=1&page%5Bsize%5D=5",
"next": "https://api.didww.com/v3/nanpa_prefixes?include=country&page%5Bnumber%5D=2&page%5Bsize%5D=5",
"last": "https://api.didww.com/v3/nanpa_prefixes?include=country&page%5Bnumber%5D=866&page%5Bsize%5D=5"
}
}
Other Responses
Code |
Success |
Description |
---|---|---|
404 |
No |
|
401 |
No |