Skip to content

generic_countries_list

GET
/api/generic/countries/
curl --request GET \
--url https://example.com/api/generic/countries/ \
--header 'Authorization: <Authorization>'

List countries with optional filtering.

alpha_2
string

Filter by alpha-2 code (exact match)

alpha_3
string

Filter by alpha-3 code (exact match)

name
string

Filter by country name (contains, case-insensitive)

ordering
string

Which field to use when ordering the results.

page
integer

A page number within the paginated result set.

region
string

Filter by region (contains)

search
string

A search term.

Media typeapplication/json
object
count
required
integer
next
string format: uri
nullable
previous
string format: uri
nullable
results
required
Array<object>

Serializer for representing country information according to ISO 3166 standards.

Fields: name (CharField): The name of the country. alpha_2 (CharField): The ISO 3166-1 alpha-2 code for the country. alpha_3 (CharField): The ISO 3166-1 alpha-3 code for the country. country_code (CharField): The ISO 3166-1 numeric country code. iso_3166_2 (CharField): The ISO 3166-2 code for the country. region (CharField): The region in which the country is located. sub_region (CharField): The sub-region in which the country is located. intermediate_region (CharField): The intermediate region, if applicable. May be blank. region_code (CharField): The code for the region. sub_region_code (CharField): The code for the sub-region. intermediate_region_code (CharField): The code for the intermediate region, if applicable. May be blank.

object
name
required
string
alpha_2
required
string
alpha_3
required
string
country_code
required
string
iso_3166_2
required
string
region
required
string
sub_region
required
string
intermediate_region
required
string
region_code
required
string
sub_region_code
required
string
intermediate_region_code
required
string

Example

{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}