Get
[POST] .../v1/docpayment/get
Returns payment documents. Retrieve payments using filters, sort_orders and pagination. Requires payment select permission and access to the payment account. The display-period tariff may restrict date bounds. Documents include the assigned stock object with its name, address and company. stock is null when no stock is assigned or the reference no longer exists; historical references retain stock details even if the stock was deleted. Business errors return 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 - document code, DocContract/code - contract code, Partner/name - partner name, Partner/inn - partner TIN, User/name - responsible person full name, Firm/name - company name, Firm/inn - company TIN. |
| sort_orders | Array of DocPaymentColumn | Optional | Sort orders. Allowed columns are defined by DocPaymentColumns. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| amount | decimal | |
| attached_user_id | int | Responsible user IDs. |
| category_id | int | Income or expense category IDs. |
| contract_id | int | Contract IDs. |
| date | int | |
| deleted_mark | bool | Deletion mark state: true - marked for deletion, false - not marked for deletion. |
| document_id | int | Document IDs. |
| document_type_id | int | Document type IDs. |
| end_date | int | Period end date as Unix time in seconds. |
| firm_id | int | Company IDs. |
| id | int | Payment document IDs. |
| partner_id | int | Partner IDs. |
| payment_direction | string | Document payment direction type: Income or 1 for incoming payments, Outcome or 2 for outgoing payments. |
| performed | bool | Document posting state: true - posted, false - not posted. |
| start_date | int | Period start date as Unix time in seconds. |
Sortable Fields
| Field |
|---|
| amount |
| attached_user.first_name |
| category.name |
| category.positive |
| code |
| contract.name |
| date |
| deleted_mark |
| firm.name |
| id |
| last_update |
| partner.name |
| performed |
| type.name |
Request Example
{
"filters": [
{
"Field": "firm_id",
"Operator": "In",
"Value": "2"
},
{
"Field": "payment_direction",
"Operator": "Equal",
"Value": "Income"
},
{
"Field": "performed",
"Operator": "Equal",
"Value": "false"
},
{
"Field": "amount",
"Operator": "GreaterOrEqual",
"Value": "100000"
}
],
"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 DocPayment | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 42,
"date": 1714550400,
"code": "PMT-000042",
"stock_id": 7,
"stock": {
"id": 7,
"name": "Main warehouse",
"address": "Tashkent",
"firm": {
"id": 2,
"name": "REGOS Retail"
},
"area": 100.000,
"description": "Main warehouse",
"deleted_mark": false,
"last_update": 1714550400
},
"type": {
"id": 3,
"name": "Bank transfer"
},
"document_id": 101,
"document_type_id": 7,
"contract": {
"id": 12,
"code": "CTR-2024-001",
"name": "Supply contract"
},
"firm": {
"id": 2,
"name": "REGOS Retail"
},
"partner": {
"id": 15,
"name": "Coca-Cola Bottlers"
},
"category": {
"id": 3,
"name": "Sales receipts",
"positive": true
},
"amount": 2500000.000,
"exchange_rate": 1.00000000,
"attached_user": {
"id": 5,
"full_name": "Anna Smith"
},
"fields": [],
"performed": false,
"description": "Prepayment from partner",
"deleted_mark": false,
"last_update": 1714553600
}
],
"next_offset": 0,
"total": 1
}