Department Numbers API

Manage company department numbers (cost centers) — retrieve, create, modify, and close

Base URL

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

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

GET /api/departmentnumber/get

Retrieve a single department number by identifier, with full details.

Query parameters

ParameterTypeRequiredDescription
idintDepartment number unique identifier

Example request

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

Paginated retrieval of the department numbers list with filtering options.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_conditionarrayFilter criteria as an associative array

Example request

GET /api/departmentnumber/list?list_offset=0
X-API-KEY: {your_api_key}
POST /api/departmentnumber/save

Create or modify a department number. For a new record use data[id] = 0.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new department number, >0 = update
company_idintCompany identifier
company_user_idintIdentifier of the responsible staff member
namestringDepartment number name
descriptionstringDescription, note
partner_idintLinked partner identifier
invoice_type_cr_idintInvoice type relation identifier

Example request

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

{
  "data": {
    "id": 0,
    "company_id": 1,
    "company_user_id": 3,
    "name": "Marketing",
    "description": "Marketing osztály"
  }
}
POST /api/departmentnumber/delete

Delete a department number by identifier.

POST fields — data object

FieldTypeRequiredDescription
idintIdentifier of the department number to delete

Example request

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

{ "data": { "id": 7 } }
POST /api/departmentnumber/close

Close a department number. A closed department number can no longer be assigned to new documents.

POST fields — data object

FieldTypeRequiredDescription
idintIdentifier of the department number to close

Example request

POST /api/departmentnumber/close
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "id": 7 } }

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!