[POST] .../v1/docordertopartner/get
Returns partner order documents. Use this method to list DocOrderToPartner supplier order documents before opening a document, checking lock/delete state, editing OrderToPartnerOperation rows, or copying the order into a purchase document. The response returns paged partner order documents with next_offset and total; canonical filters are id, partner_id, contract_id, status_id, attached_user_id, vat_calculation_type, blocked, deleted_mark, and date. Legacy plural selector fields, start_date, end_date, and search remain accepted aliases; date GreaterOrEqual maps to the start boundary and date LessOrEqual maps to the end boundary. The request supports sort_orders for the documented document columns. The query is constrained by the tariff display-period rule. The caller must have partner order select permission; missing body, denied access, unavailable stock-to-partner order tariff, invalid filters, database failures, or display-period violations are returned as HTTP 200 ErrorResult business errors.
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. Values above the configured query limit are replaced by the server query limit. |
| offset | Int32 | Optional | Offset from the beginning of the result set. Negative values are treated as 0. |
| search | String | Optional | Search by document code, partner name or TIN, responsible user full name, and contract code. Search is applied only when the trimmed term is longer than the server search threshold. |
| sort_orders | Array of DocOrderToPartnerColumn | Optional | Output parameter sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| attached_user_id | int | |
| attached_user_ids | int | Responsible user IDs. |
| blocked | bool | Filter by document lock flag. |
| contract_id | int | |
| contract_ids | int | Contract IDs. |
| date | int | |
| deleted_mark | bool | Filter by deletion mark. |
| end_date | int | Period end date as Unix time in seconds. The tariff display-period filter validates the requested and returned period. |
| id | int | |
| ids | int | Order-to-partner document IDs. |
| partner_id | int | |
| partner_ids | int | Partner IDs. |
| start_date | int | Period start date as Unix time in seconds. The tariff display-period filter can clamp a missing start date for broad queries. |
| status_id | int | |
| status_ids | int | Status IDs. |
| vat_calculation_type | string | VAT calculation mode: No - do not accrue, Exclude - included in the amount, Include - added on top. |
Sortable Fields
| Field |
|---|
| amount |
| attached_user.name |
| blocked |
| code |
| contract.name |
| currency.name |
| date |
| deleted_mark |
| id |
| last_update |
| partner.name |
| status.name |
| vat_calculation_type |
Request Example
{
"filters": [
{
"field": "partner_id",
"operator": "In",
"value": "201"
},
{
"field": "status_id",
"operator": "In",
"value": "3"
},
{
"field": "vat_calculation_type",
"operator": "Equal",
"value": "Exclude"
},
{
"field": "deleted_mark",
"operator": "Equal",
"value": "false"
},
{
"field": "date",
"operator": "GreaterOrEqual",
"value": "1764547200"
},
{
"field": "date",
"operator": "LessOrEqual",
"value": "1767225600"
}
],
"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 DocOrderToPartner | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [
{
"id": 4501,
"date": 1767225600,
"code": "OTP-000031",
"contract": {
"id": 301,
"code": "CNT-2026-01",
"name": "Supply contract"
},
"partner": {
"id": 201,
"name": "Coffee Supplier LLC"
},
"currency": {
"id": 1,
"code_chr": "USD",
"name": "US Dollar"
},
"exchange_rate": 1,
"vat_calculation_type": "Exclude",
"amount": 125000,
"status": {
"id": 3,
"name": "New"
},
"attached_user": {
"id": 5,
"name": "John Smith"
},
"description": "January supplier order",
"blocked": false,
"current_user_blocked": null,
"deleted_mark": false,
"last_update": 1767225600
}
],
"next_offset": 0,
"total": 1
}