Base URLs
https://{tenant}.logzi.com/api/inventory/
https://{tenant}.logzi.com/api/inventory_item/
Every request returns a JSON response. On success result.code == 1, on error result.code == 0.
/api/inventory/get
Retrieve a single inventory sheet by identifier, together with its item rows.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
int | Unique identifier of the inventory sheet |
Example request
GET /api/inventory/get?id=5
X-API-KEY: {your_api_key}
Example response
{
"result": { "code": 1, "message": "success" },
"data": {
"id": 5,
"identify": "INV-2024-0005",
"date_create": "2024-05-08 09:00:00",
"date_perform": "2024-05-08",
"status_id": 1,
"store_id": 1,
"company_user_name": "Kovács Péter",
"item": [
{
"product_id": 12,
"quantity_stock": 100,
"quantity_found": 97,
"store_locality_id": null
}
]
}
}
/api/inventory/list
Paginated retrieval of the inventory sheet list with filtering options.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset |
int | Pagination offset (default: 0) | |
list_condition[identify] |
string | Filter by identifier (LIKE) | |
list_condition[status_id] |
int | Filter by status (1=open, 2=closed) | |
list_condition[status_ids] |
array | Filter by multiple statuses at once | |
list_condition[company_user_id] |
int | Filter by responsible employee ID | |
list_condition[date_create_from] |
date | Creation date — from (YYYY-MM-DD) | |
list_condition[date_create_to] |
date | Creation date — to (YYYY-MM-DD) | |
list_condition[date_perform_from] |
date | Performance date — from (YYYY-MM-DD) | |
list_condition[date_perform_to] |
date | Performance date — to (YYYY-MM-DD) | |
list_condition[comment_bottom] |
string | Filter by internal comment (LIKE) |
Example request
GET /api/inventory/list?list_offset=0&list_condition[status_id]=1
X-API-KEY: {your_api_key}
Example response
{
"result": { "code": 1, "message": "success" },
"data": [
{
"id": 5,
"identify": "INV-2024-0005",
"date_create": "2024-05-08",
"status_name": "Nyitott",
"company_user_name": "Kovács Péter"
}
],
"params": {
"list_count": 10,
"list_offset": 0,
"list_all": 3
}
}
/api/inventory/save
Create or update an inventory sheet. For each item you must record both the recorded quantity (quantity_stock) and the physically counted quantity (quantity_found). Use data[id] = 0 for a new inventory sheet.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | 0 = new inventory sheet, >0 = update | |
company_id |
int | Company identifier | |
company_user_id |
int | Responsible employee ID | |
store_id |
int | Identifier of the warehouse being counted | |
currency_id |
int | Currency identifier | |
currency_exchange |
decimal | Exchange rate | |
project_id |
int | Project identifier | |
source_receipt_id |
int | Source document identifier | |
source_receipt_type_id |
int | Source document type identifier | |
item |
array | Array of items — at least one item is required (see below) |
Item fields — data[item][]
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | 0 = new item, >0 = update existing item | |
product_id |
int | Product identifier | |
quantity_stock |
decimal | Recorded (system) quantity | |
quantity_found |
decimal | Physically counted quantity | |
store_locality_id |
int | Storage location identifier | |
remove |
int | 1 = delete the item on update |
POST fields — params object (optional)
| Field | Type | Required | Description |
|---|---|---|---|
close |
int | 1 = automatically close after saving |
Example request
POST /api/inventory/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"id": 0,
"company_id": 1,
"company_user_id": 3,
"store_id": 1,
"item": [
{
"id": 0,
"product_id": 12,
"quantity_stock": 100,
"quantity_found": 97
},
{
"id": 0,
"product_id": 15,
"quantity_stock": 50,
"quantity_found": 50,
"store_locality_id": 3
}
]
},
"params": {
"close": 0
}
}
Example response
{
"result": { "code": 1, "message": "success" },
"data": {
"id": 6,
"identify": "INV-2024-0006"
}
}
/api/inventory/delete
Delete an inventory sheet. Only a document with status_id = 1 (open) or status_id = 2 (closed) can be deleted.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
receipt_id |
int | Identifier of the inventory sheet to delete |
Example request
POST /api/inventory/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"receipt_id": 5
}
}
Example response
{
"result": { "code": 1, "message": "success" },
"data": {}
}
/api/inventory/close
Close an open inventory sheet. Closing performs stock reconciliation based on the difference between quantity_stock and quantity_found. Only a document with status_id = 1 (open) can be closed.
POST fields — data object
| Field | Type | Required | Description |
|---|---|---|---|
receipt_id |
int | Identifier of the inventory sheet to close |
Example request
POST /api/inventory/close
X-API-KEY: {your_api_key}
Content-Type: application/json
{
"data": {
"receipt_id": 5
}
}
Example response
{
"result": { "code": 1, "message": "success" },
"data": {}
}
/api/inventory/download
Generate the inventory sheet document in various formats (PDF, base64 string, stream).
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
receipt_id |
int | Identifier of the inventory sheet | |
file_type |
string | Output format (see below) | |
language |
string | Template language folder name (e.g. hungarian) |
|
language_id |
int | Language identifier (default: 1) | |
template_id |
int | Custom print template ID |
file_type possible values
| Value | Description |
|---|---|
pdf |
Returns a base64-encoded PDF with metadata |
pdf-string |
Same as pdf — base64 string + metadata |
pdf-string-sample |
Generates a preview PDF |
stream |
Direct file stream (browser download) |
Example request
GET /api/inventory/download?receipt_id=5&file_type=pdf
X-API-KEY: {your_api_key}
Example response (file_type=pdf)
{
"result": { "code": 1, "message": "success" },
"data": {
"name": "INV-2024-0005.pdf",
"content": "JVBERi0xLjQK...",
"receipt": { ... }
}
}
Item row endpoints
The /api/inventory_item/ endpoints are used for detailed queries of a given inventory sheet's items. Writing and deleting items is done through saving the inventory sheet (/api/inventory/save).
/api/inventory_item/get
Retrieve a single inventory sheet item by identifier.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
int | Unique identifier of the inventory sheet item |
Example request
GET /api/inventory_item/get?id=88
X-API-KEY: {your_api_key}
/api/inventory_item/list
Retrieve all items of an inventory sheet.
| Parameter | Type | Required | Description |
|---|---|---|---|
inventory_sheet_id |
int | Identifier of the inventory sheet |
Example request
GET /api/inventory_item/list?inventory_sheet_id=5
X-API-KEY: {your_api_key}
/api/inventory_item/list_tax
Summarize an inventory sheet's items by VAT rate.
| Parameter | Type | Required | Description |
|---|---|---|---|
inventory_sheet_id |
int | Identifier of the inventory sheet |
Example request
GET /api/inventory_item/list_tax?inventory_sheet_id=5
X-API-KEY: {your_api_key}
/api/inventory_item/list_slim
Paginated, filterable retrieval of inventory sheet items — can also be filtered by warehouse and status.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_offset |
int | Pagination offset (default: 0) | |
list_condition[inventory_sheet_id] |
int | Filter by inventory sheet ID | |
list_condition[store_id] |
int | Filter by warehouse ID | |
list_condition[status_id] |
int | Filter by the inventory sheet's status |
Example request
GET /api/inventory_item/list_slim?list_condition[inventory_sheet_id]=5&list_offset=0
X-API-KEY: {your_api_key}
Create your account now,
pay later!