Base URL
https://{tenant}.logzi.com/api/city/
Every request returns a JSON response. On success result.code == 1; on failure result.code == 0.
/api/city/get
Retrieve a single city / postal code record — by ID, postal code, or country.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Unique ID of the record | |
zip | string | Search by postal code | |
country_id | int | Filter by country ID |
Example request
GET /api/city/get?zip=1234
X-API-KEY: {your_api_key}
/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}
/api/city/save
Create or update a city / postal code record. Use data[id] = 0 for a new record.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | 0 = new record, >0 = update | |
zip | string | Postal code | |
city | string | City name | |
country_id | int | Country 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
}
}
/api/city/delete
Delete a city / postal code record by ID.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id | int | ID of the record to delete |
Example request
POST /api/city/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 10 } }
Create your account now,
pay later!