Countries API

Manage countries — retrieve, create, update, and delete

Base URL

https://{tenant}.logzi.com/api/country/

Every request returns a JSON response. On success result.code == 1, on failure result.code == 0.

GET /api/country/get

Retrieve a single country — by ID or ISO code.

Query parameters

ParameterTypeRequiredDescription
idintUnique identifier of the country
country_iso2stringTwo-letter ISO 3166-1 code (e.g. "HU", "DE")
language_idintLanguage ID for the localized name

Example request

GET /api/country/get?country_iso2=HU
X-API-KEY: {your_api_key}
GET /api/country/list

Retrieve the list of all countries, optionally in a given language.

Query parameters

ParameterTypeRequiredDescription
language_idintLanguage ID for localized names

Example request

GET /api/country/list
X-API-KEY: {your_api_key}
POST /api/country/save

Create or update a country. Use data[id] = 0 for a new record.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new country, >0 = update
country_namestringCountry name (e.g. "Hungary")
country_iso2stringTwo-letter ISO 3166-1 code (e.g. "HU")
country_iso3stringThree-letter ISO 3166-1 code (e.g. "HUN")

Example request

POST /api/country/save
X-API-KEY: {your_api_key}
Content-Type: application/json

{
  "data": {
    "id": 0,
    "country_name": "Magyarország",
    "country_iso2": "HU"
  }
}
POST /api/country/delete

Delete a country by ID.

POST fields — data object

FieldTypeRequiredDescription
idintID of the country to delete

Example request

POST /api/country/delete
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "id": 5 } }

Get in touch with us

Interested in our software? Feel free to write to us!

Need help?

If you can't find the answer and need assistance

Create your account now,
pay later!

Try it free for 3 days, no risk, no obligation!