[POST] .../v1/docadditionalexpenses/get
Returns documents additional expenses. Use this method to retrieve additional expenses documents for purchase cost allocation, stock cost review, posting workflows and integration reconciliation. The request requires the additional expenses select permission and supports filters id, firm_id, stock_id, partner_id, contract_id, date, parent_doc_type_id, parent_doc_id, performed, blocked, deleted_mark, vat_calculation_type and search. The response returns a paged list with document header data, parent document reference, partner, stock, currency, contract, amount, exchange rate, VAT calculation type, lock state, posting state, deletion mark, next_offset and total; stock visibility is limited by the current request user's allowed stocks. Business errors such as a missing request body, denied access, 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 | Returned data limit for the request. The default and maximum values are defined by the server-side query_limit setting. |
| offset | Int32 | Optional | Offset from the beginning of the result set. |
| search | String | Optional | Search by parameter values: code - additional expenses document code, Partner/name - partner name, Partner/inn - partner TIN, DocContract/code - contract code, Stock/name - stock name, Firm/name - company name, Firm/inn - company TIN. |
| sort_orders | Array of BaseSortColumn | Optional | Sort orders. Supported column names are ID, DATE, CODE, PARENT_DOC_TYPE, PARTNER_NAME, FIRM_NAME, CURRENCY_NAME, CONTRACT, AMOUNT, VAT_CALCULATION_TYPE, BLOCKED, PERFORMED, DELETED_MARK and LAST_UPDATE. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| blocked | bool | Additional expenses document edit lock state: true - locked, false - unlocked. |
| contract_id | int | Contract IDs. |
| date | int | |
| deleted_mark | bool | Additional expenses document deletion mark state: true - marked for deletion, false - not marked for deletion. |
| end_date | int | Period end date as Unix time. |
| firm_id | int | Company IDs. |
| id | int | Additional expenses document IDs. |
| parent_doc_id | int | Parent document ID. |
| parent_doc_type_id | int | Parent document type ID. |
| partner_id | int | Partner IDs. |
| performed | bool | Additional expenses document posting state: true - posted, false - not posted. |
| start_date | int | Period start date as Unix time. |
| stock_id | int | Stock IDs. |
| vat_calculation_type | string | VAT calculation mode: No - do not accrue, Exclude - included in the amount, Include - added on top. |
Request Example
{
"filters": [
{
"field": "parent_doc_type_id",
"operator": "Equal",
"value": "1"
},
{
"field": "parent_doc_id",
"operator": "Equal",
"value": "42"
},
{
"field": "stock_id",
"operator": "In",
"value": "3"
},
{
"field": "performed",
"operator": "Equal",
"value": "false"
},
{
"field": "date",
"operator": "GreaterOrEqual",
"value": "1714521600"
},
{
"field": "date",
"operator": "LessOrEqual",
"value": "1714607999"
}
],
"sort_orders": [
{
"column": "DATE",
"direction": "DESC"
},
{
"column": "CODE",
"direction": "ASC"
}
],
"limit": 50,
"offset": 0
}
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 DocAdditionalExpenses | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 56,
"date": 1714550401,
"code": "AE-000056",
"parent_document": {
"id": 42,
"doc_type": 1
},
"partner": {
"id": 15,
"name": "Global Logistics"
},
"stock": {
"id": 3,
"name": "Main warehouse"
},
"currency": {
"id": 1,
"code_chr": "UZS",
"name": "Uzbek sum",
"exchange_rate": 1.00000000,
"is_base": true
},
"contract": null,
"description": "Freight costs for purchase PUR-000042",
"amount": 250000.000,
"exchange_rate": 1.00000000,
"vat_calculation_type": "No",
"blocked": false,
"current_user_blocked": null,
"performed": false,
"deleted_mark": false,
"last_update": 1714553600
}
],
"next_offset": 0,
"total": 1
}