Skip to main content

Get Localities

This endpoint retrieves the list of available localities.

info

This operation does not require authentication

HTTP Request

GET /api/v2/locality/

Parameters

NameInTypeRequiredDescription
limitqueryintegerfalseNumber of results to return per page.
offsetqueryintegerfalseThe initial index from which to return the results.
searchquerystringfalseA search term.

Example Request

const headers = {
'Accept':'application/json'
};

fetch('/api/v2/locality/',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKnoneInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» countintegerfalsenoneTotal number of results
» nextstring(uri)¦nullfalsenonenone
» previousstring(uri)¦nullfalsenonenone
» resultslist(Locality)falsenonenone

Example responses

{
"count": 123,
"next": "string",
"previous": "string",
"results": [
{
"full_address": "string",
"postal_code": "string",
"town": "string",
"province": "string",
"province_short": "string",
"region": "string",
"country": "string",
"lat": 0,
"lng": 0
}
]
}