Get

[POST] .../v1/orderdeliveryoperation/get

Returns operation retail order. Use this method to retrieve item operations for a retail order delivery document before editing, approving, processing or actualizing the order. The request requires the retail order operation select permission and supports filters document_id, id, item_id and search plus sort_orders and paging. The response returns a paged array of operations with item data, ordered quantity and price, stock-dependent actual_quantity, price-type-dependent actual_price, VAT metadata, next_offset and total. Business errors such as a missing request body, denied access, invalid filters, missing or invalid document context, database errors or persistent lookup failures 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 Document ID.
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 OrderDeliveryOperation Result array.
total Int64 Total number of result items.

Response Example

{
  "next_offset": 1,
  "ok": true,
  "result": [
    {
      "actual_price": 1.0,
      "actual_quantity": 1.0,
      "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,
      "quantity_const": 1.0,
      "vat_calculation_type": "No",
      "vat_value": 1.0
    }
  ],
  "total": 1
}