Cities / Postal Codes API

Manage cities and postal codes — retrieve, create, update, and delete

Base URL

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

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

GET /api/city/get

Retrieve a single city / postal code record — by ID, postal code, or country.

Query parameters

ParameterTypeRequiredDescription
idintUnique ID of the record
zipstringSearch by postal code
country_idintFilter by country ID

Example request

GET /api/city/get?zip=1234
X-API-KEY: {your_api_key}
GET /api/city/list

Retrieve the full list of city / postal code records without any filter parameters.

This endpoint does not accept filter parameters — it returns the full list.

Example request

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

Create or update a city / postal code record. Use data[id] = 0 for a new record.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new record, >0 = update
zipstringPostal code
citystringCity name
country_idintCountry ID

Example request

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

{
  "data": {
    "id": 0,
    "zip": "1234",
    "city": "Budapest",
    "country_id": 1
  }
}
POST /api/city/delete

Delete a city / postal code record by ID.

POST fields — data object

FieldTypeRequiredDescription
idintID of the record to delete

Example request

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

{ "data": { "id": 10 } }

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!