Units of Measure API

Manage units of measure — retrieve, create, update, and delete

Base URL

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

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

GET /api/unit/get

Retrieve a single unit of measure by ID, with full details.

Query parameters

ParameterTypeRequiredDescription
idintUnique identifier of the unit of measure
language_idintLanguage ID

Example request

GET /api/unit/get?id=1
X-API-KEY: {your_api_key}
GET /api/unit/list

Retrieve the list of all units of measure.

Query parameters

ParameterTypeRequiredDescription
language_idintLanguage ID for localized names

Example request

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

Create or update a unit of measure. Use data[id] = 0 for a new record.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new unit of measure, >0 = update
name_keystringInternal key name (e.g. "db", "kg", "liter")
name_shortstringShort display name (e.g. "db", "kg")

Example request

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

{
  "data": {
    "id": 0,
    "name_key": "kg",
    "name_short": "kg"
  }
}
POST /api/unit/delete

Delete a unit of measure by ID.

POST fields — data object

FieldTypeRequiredDescription
idintID of the unit of measure to delete

Example request

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

{ "data": { "id": 4 } }

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!