Get Countries
GET https://{{host}}/v3/countries
Returns a list of countries. Pagination is disabled.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
filter[id] | null | string - Filters by country id field. |
-
Allow blank - No.
-
Allow array - Yes. | |
filter[name]
| null | |string
- Filters by country name field. -
Allow blank - Yes.
-
Allow array - Yes. | |
filter[prefix]
| null | |string
- Filters by country prefix field. -
Allow blank - Yes.
-
Allow array - Yes. | |
filter[iso]
| null | |string
- Filters by country iso field. -
Allow blank - Yes.
-
Allow array - Yes. | |
filter[is_available]
| null | |boolean
- When true, shows countries which have DID groups in coverage with DID numbers available for purchase. When false shows countries which have DID groups without DID numbers available for purchase. -
Allow blank - No.
-
Allow array - No. | |
sort
| null | | Used for sorting the fields returned by the request, with a comma,
separating the included fields. Details in Sorting Article.
name - Country name
field
prefix - Country prefix
field
iso - Country iso
field
*** |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string | ||
Content-Type | string | ||
Api-Key | string |
RESPONSES
status: OK
{"data":[{"id":"9c56fe0f-eff0-4742-85f6-24868959344a","type":"countries","attributes":{"name":"United Kingdom","prefix":"44","iso":"GB"},"relationships":{"regions":{"links":{"self":"https://api.didww.com/v3/countries/9c56fe0f-eff0-4742-85f6-24868959344a/relationships/regions","related":"https://api.didww.com/v3/countries/9c56fe0f-eff0-4742-85f6-24868959344a/regions"}}}},{"id":"5d3d7640-16d2-4dc0-9aca-408789fbefc6","type":"countries","attributes":{"name":"United States","prefix":"1","iso":"US"},"relationships":{"regions":{"links":{"self":"https://api.didww.com/v3/countries/5d3d7640-16d2-4dc0-9aca-408789fbefc6/relationships/regions","related":"https://api.didww.com/v3/countries/5d3d7640-16d2-4dc0-9aca-408789fbefc6/regions"}}}}],"meta":{"api_version":"2017-09-18"}}