Get

[POST] .../v1/docpurchase/get

Returns partner receipt documents. Use this method to retrieve receipt-from-partner document headers for purchase lists, synchronization and document workflow screens. The response returns paged DocPurchase records with next_offset and total, supports filters including id, date ranges, partner, stock, firm, contract, responsible user, status flags, amount fields, custom fields, sort_orders, search, limit and offset; the tariff display-period filter can clamp a missing start_date according to server rules. The caller must have the document purchase select permission; business errors such as a missing request body, denied access or persistent storage 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.
offset Int32 Optional Offset from the beginning of the result set.
search String Optional Search string for fields: code - receipt-from-partner document code, Partner/name - partner name, Partner/inn - partner TIN, User/name - user full name, Contract/code - contract code, Firm/name - company name, Firm/inn - company TIN.
sort_orders Array of DocPurchaseColumn Optional Output parameter sorting.

Filterable Fields

Field Type Description
additional_expenses_amount decimal
amount decimal
attached_user_id int Responsible user IDs.
blocked bool Document blocked flag.
contract_id int Contract IDs.
currency int
date int
deleted_mark bool Deletion mark.
end_date int Period end date as Unix time in seconds.
firm_id int Company IDs.
id int Receipt-from-partner document IDs.
partner_id int Partner IDs.
performed bool Document posted flag.
start_date int Period start date as Unix time in seconds.
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.

Sortable Fields

Field
amount
attached_user.name
blocked
code
contract.name
currency.name
date
deleted_mark
id
last_update
partner.name
performed
price_type.name
stock.name
vat_calculation_type

Request Example

{
  "filters": [
    {
      "Field": "additional_expenses_amount",
      "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 DocPurchase Result array.
total Int64 Total number of result items.

Response Example

{
  "next_offset": 1,
  "ok": true,
  "result": [
    {
      "additional_expenses_amount": 1.0,
      "amount": 1.0,
      "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,
      "code": "string",
      "contract": {
        "active": true,
        "amount": 1.0,
        "attached_user_id": 1,
        "code": "string",
        "currency_id": 1,
        "date": 1,
        "deleted_mark": true,
        "description": "string",
        "details": "string",
        "direction": "All",
        "end_date": 1,
        "firm_id": 1,
        "id": 1,
        "last_update": 1,
        "name": "string",
        "partner_id": 1,
        "partner_name": "string",
        "start_date": 1
      },
      "currency": {
        "code_chr": "string",
        "code_num": 1,
        "deleted": true,
        "exchange_rate": 1.0,
        "id": 1,
        "is_base": true,
        "last_update": 1,
        "name": "string"
      },
      "current_user_blocked": true,
      "date": 1,
      "deleted_mark": true,
      "description": "string",
      "exchange_rate": 1.0,
      "fields": [
        {
          "data_type": "string",
          "is_custom": true,
          "key": "string",
          "metadata": "string",
          "name": "string",
          "required": true,
          "value": "string"
        }
      ],
      "id": 1,
      "last_update": 1,
      "partner": {
        "address": "string",
        "bank_name": "string",
        "boss_name": "string",
        "deleted_mark": true,
        "description": "string",
        "email": "string",
        "fields": [
          {
            "data_type": "string",
            "is_custom": true,
            "key": "string",
            "metadata": "string",
            "name": "string",
            "required": true,
            "value": "string"
          }
        ],
        "fullname": "string",
        "group": {
          "child_count": 1,
          "id": 1,
          "last_update": 1,
          "name": "string",
          "parent_id": 1
        },
        "id": 1,
        "inn": "string",
        "last_update": 1,
        "legal_status": "Legal",
        "mfo": "string",
        "name": "string",
        "oked": "string",
        "phones": "string",
        "rs": "string",
        "vat_index": "string"
      },
      "performed": true,
      "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"
      },
      "vat_calculation_type": "No"
    }
  ],
  "total": 1
}