[POST] .../v1/docinventory/get
Returns information about inventory document. Use this method to retrieve inventory documents for stock counting, reconciliation screens, reporting and follow-up workflows that need document header state. The request requires the inventory select permission, the stock inventory tariff option must be enabled and the query supports filters such as id, stock_id, attached_user_id, date/start_date/end_date, closed, blocked, deleted_mark, compare_type and search, plus sort_orders and pagination. The response returns a paged list with inventory document metadata, stock, responsible user, price type, full/create_docinout flags, lock state, deletion mark, next_offset and total; visible stocks are limited by the current request user's allowed stock list. Business errors such as a missing request body, denied access, disabled tariff option, invalid filters, database failures or persistent lookup errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| limit | Int32 | Optional | Maximum number of records to return. The default and maximum values are defined by server settings. |
| offset | Int32 | Optional | Offset from the beginning of the result set. |
| search | String | Optional | Search by field values: code, firm->name, firm->inn, stock_name, attached_user_name. |
| sort_orders | Array of DocInventoryColumn | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| attached_user_id | int | Responsible user IDs. |
| blocked | bool | Indicates whether the document is locked: true - locked, false - not locked. |
| closed | bool | Indicates whether the document is closed: true - closed, false - not closed. |
| compare_type | string | Matching type: open_date - by opening date, close_date - by closing date, operation_date - by operation date. |
| date | int | |
| deleted_mark | bool | Deletion mark. |
| end_date | int | Period end date as Unix time in seconds. |
| id | int | Inventory document IDs. |
| start_date | int | Period start date as Unix time in seconds. |
| stock_id | int | Stock IDs. |
Sortable Fields
| Field |
|---|
| attached_user.name |
| blocked |
| closed |
| close_date |
| code |
| compare_type |
| deleted_mark |
| id |
| last_update |
| open_date |
| stock.name |
Request Example
{
"filters": [
{
"Field": "attached_user_id",
"Operator": "Equal",
"Value": "string"
}
],
"limit": 1,
"offset": 1,
"search": "string",
"sort_orders": [
{
"column": "id",
"direction": "ASC"
}
]
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| next_offset | Int32 | Offset for the next data page. |
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of DocInventory | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"next_offset": 1,
"ok": true,
"result": [
{
"attached_user": {
"active": true,
"address": "string",
"can_authorize": true,
"date_of_birth": "string",
"description": "string",
"email": "string",
"enable_hints": true,
"fields": [
{
"data_type": "string",
"is_custom": true,
"key": "string",
"metadata": "string",
"name": "string",
"required": true,
"value": "string"
}
],
"first_name": "string",
"full_name": "string",
"id": 1,
"internal_phone": "string",
"language_code": "string",
"last_name": "string",
"last_update": 1,
"login": "string",
"main_phone": "string",
"middle_name": "string",
"phones": "string",
"photo_url": "string",
"seller_barcode": "string",
"sex": "none",
"sub": "string",
"system": true,
"user_group": {
"child_count": 1,
"id": 1,
"last_update": 1,
"name": "string",
"parent_id": 1
}
},
"blocked": true,
"close_date": 1,
"closed": true,
"code": "string",
"compare_type": "open_date",
"create_docinout": true,
"current_user_blocked": true,
"deleted_mark": true,
"description": "string",
"external_id": "string",
"full": true,
"id": 1,
"last_update": 1,
"open_date": 1,
"price_type": {
"currency": {
"code_chr": "string",
"code_num": 1,
"deleted": true,
"exchange_rate": 1.0,
"id": 1,
"is_base": true,
"last_update": 1,
"name": "string"
},
"currency_additional": {
"code_chr": "string",
"code_num": 1,
"deleted": true,
"exchange_rate": 1.0,
"id": 1,
"is_base": true,
"last_update": 1,
"name": "string"
},
"id": 1,
"last_update": 1,
"markup": 1.0,
"max_discount": 1.0,
"name": "string",
"round_to": 1.0
},
"stock": {
"address": "string",
"area": 1.0,
"deleted_mark": true,
"description": "string",
"firm": {
"address": "string",
"bank_name": "string",
"boss_name": "string",
"deleted_mark": true,
"description": "string",
"fullname": "string",
"group": {
"child_count": 1,
"id": 1,
"last_update": 1,
"name": "string",
"parent_id": 1
},
"id": 1,
"inn": "string",
"last_update": 1,
"mfo": "string",
"name": "string",
"oked": "string",
"phones": "string",
"rs": "string",
"vat_index": "string"
},
"id": 1,
"last_update": 1,
"name": "string"
}
}
],
"total": 1
}