Get Countries#
Returns a list of countries. Pagination is disabled.
Request#
HTTP Method: GET
URI Path: /v3/countries
URI Query Parameters#
Filters#
Filter Name |
Type |
Allow Blank |
Allow Array |
Filters by: |
|---|---|---|---|---|
id |
|
No |
Yes |
Country |
name |
|
Yes |
Yes |
Country |
prefix |
|
Yes |
Yes |
Country |
iso |
|
Yes |
Yes |
Country |
is_available |
|
No |
No |
Indicates if DID numbers in the specified country are currently available for purchase. |
Sorting#
Value |
Sorts by |
|---|---|
name |
Country |
prefix |
Country |
iso |
Country |
Sparse Fieldsets#
Value |
Returns |
|---|---|
name |
Country |
prefix |
Country |
iso |
Country |
Example#
http
1GET /v3/countries HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
curl
1curl -i -X GET https://api.didww.com/v3/countries -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": [
6 {
7 "id": "9c56fe0f-eff0-4742-85f6-24868959344a",
8 "type": "countries",
9 "attributes": {
10 "name": "United Kingdom",
11 "prefix": "44",
12 "iso": "GB"
13 }
14 },
15 {
16 "id": "5d3d7640-16d2-4dc0-9aca-408789fbefc6",
17 "type": "countries",
18 "attributes": {
19 "name": "United States",
20 "prefix": "1",
21 "iso": "US"
22 }
23 }
24 ]
25}
Other Responses#
Code |
Success |
Description |
|---|---|---|
401 |
No |