Get

[POST] .../v1/commercialofferoperation/get

Returns operation documents commercial offer. Use this method to retrieve operation rows for a single commercial offer document, including item data, quantity, price, VAT value, VAT calculation type and update time. The request requires the commercial offer operation select permission; the document_id filter is required and must identify one document, while id, item_id and search filters can narrow the returned rows. The response returns a paged list with next_offset and total and the method is typically used after DocCommercialOffer/Get or before editing and deleting offer rows. Business errors such as missing body, missing or invalid document_id, oversized filter selections, denied access, invalid filters or sort_orders, database failures or persistent lookup errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
filters Array of Filter Required Filters by fields available for this API method. Required filter fields: document_id.
limit Int32 Optional Maximum number of records to return.
offset Int32 Optional Offset from the beginning of the result set.
search String Optional Search by Item.name, Item.articul, Item.code and Item.barcodes.
sort_orders Array of DocumentOperationSortOrder Optional Output parameter sorting.

Filterable Fields

Field Type Required Description
document_id int Required
id int Optional
item.name string Optional
item_id int Optional

Request Example

{
  "filters": [
    {
      "Field": "document_id",
      "Operator": "Equal",
      "Value": "string"
    }
  ],
  "limit": 1,
  "offset": 1,
  "search": "string",
  "sort_orders": [
    {
      "column": "string",
      "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 CommercialOfferOperation Result array.
total Int64 Total number of result items.

Response Example

{
  "next_offset": 1,
  "ok": true,
  "result": [
    {
      "document_id": 1,
      "id": 1,
      "item": {
        "articul": "string",
        "assemblable": true,
        "barcode_list": "string",
        "base_barcode": "string",
        "brand": {
          "id": 1,
          "last_update": 1,
          "name": "string"
        },
        "code": 1,
        "color": {
          "id": 1,
          "last_update": 1,
          "name": "string"
        },
        "comission_tin": "string",
        "compound": true,
        "country": {
          "alfa2": "string",
          "alfa3": "string",
          "code": "string",
          "fullname": "string",
          "id": 1,
          "last_update": 1,
          "name": "string"
        },
        "deleted_mark": true,
        "department": {
          "id": 1,
          "last_update": 1,
          "name": "string"
        },
        "description": "string",
        "disassemblable": true,
        "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,
          "path": "string"
        },
        "has_child": true,
        "icps": "string",
        "id": 1,
        "image_url": "string",
        "is_labeled": true,
        "last_update": 1,
        "min_quantity": 1,
        "name": "string",
        "origin": "BuyingAndSelling",
        "package_code": "string",
        "parent_id": 1,
        "partner_id": 1,
        "producer": {
          "id": 1,
          "last_update": 1,
          "name": "string"
        },
        "size": {
          "id": 1,
          "last_update": 1,
          "name": "string"
        },
        "type": "Item",
        "unit": {
          "description": "string",
          "id": 1,
          "last_update": 1,
          "name": "string",
          "type": "non_pcs"
        },
        "vat": {
          "enabled": true,
          "id": 1,
          "last_update": 1,
          "name": "string",
          "value": 1.0
        }
      },
      "last_update": 1,
      "price": 1.0,
      "quantity": 1.0,
      "vat_calculation_type": "No",
      "vat_value": 1.0
    }
  ],
  "total": 1
}