[POST] .../v1/doccontract/get
Returns contracts. Use this method to retrieve full contract records before opening a contract card, selecting a contract for document headers or checking responsible-user and deletion-mark state. The response returns paged DocContract records with next_offset and total; filters are id, firm_id, partner_id, attached_user_id, direction, active, deleted_mark, date and search. The request supports sort_orders for the documented document columns. The contract tariff parameter must be enabled and the current request user must have contract select permission. Missing body, denied access, unavailable tariff, invalid database state, database failures and other business errors are returned as HTTP 200 ErrorResult responses.
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. Default and maximum values are defined by server settings. |
| offset | Int32 | Optional | Offset from the beginning of the result set. |
| search | String | Optional | Search string for code, partner name, partner TIN, firm name and responsible user name. |
| sort_orders | Array of DocContractColumn | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| active | bool | Validity flag: true - valid, false - invalid. |
| attached_user_id | int | Responsible user IDs. |
| date | int | |
| deleted_mark | bool | Deletion mark. true returns marked contracts; false returns unmarked contracts. |
| direction | string | Contract direction: Income or Outcome. |
| end_date | int | Period end date as Unix time in seconds. |
| firm_id | int | Company IDs. |
| id | int | Contract IDs. |
| partner_id | int | Partner IDs. |
| start_date | int | Period start date as Unix time in seconds. |
Sortable Fields
| Field |
|---|
| amount |
| code |
| currency.name |
| date |
| direction |
| end_date |
| firm.name |
| partner.name |
| start_date |
Request Example
{
"filters": [
{
"field": "partner_id",
"operator": "Equal",
"value": "201"
},
{
"field": "firm_id",
"operator": "Equal",
"value": "11"
},
{
"field": "direction",
"operator": "Equal",
"value": "Income"
},
{
"field": "active",
"operator": "Equal",
"value": "true"
},
{
"field": "deleted_mark",
"operator": "Equal",
"value": "false"
},
{
"field": "date",
"operator": "GreaterOrEqual",
"value": "1767225600"
},
{
"field": "date",
"operator": "LessOrEqual",
"value": "1769817600"
},
{
"field": "search",
"operator": "Like",
"value": "CNT-2026"
}
],
"sort_orders": [
{
"column": "date",
"direction": "DESC"
}
],
"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 DocContract | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 9101,
"code": "CNT-2026-02",
"name": "January supply contract",
"date": 1767225600,
"start_date": 1767225600,
"end_date": 1798761600,
"partner": {
"id": 201,
"name": "City Retail LLC"
},
"firm": {
"id": 11,
"name": "REGOS Trading"
},
"direction": "Income",
"amount": 25000,
"currency": {
"id": 1,
"code_chr": "USD",
"name": "US Dollar"
},
"details": "Payment within 15 banking days",
"description": "Primary 2026 supply contract",
"attached_user": {
"id": 7,
"name": "Contract manager"
},
"active": true,
"deleted_mark": false,
"last_update": 1767225600
}
],
"next_offset": 0,
"total": 1
}