Get

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

Returns item lines of a retail order document. 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. Errors such as a missing request body, denied access, invalid filters, missing or invalid document context, storage errors or 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. Server settings define the effective maximum.
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. Item.code is compared only when the trimmed term is an unsigned integer.
sort_orders Array of OrderDeliveryOperationSortOrder 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

Sortable Fields

Field
document_id
id
item.articul
item.code
item.id
item.name
last_update
order
price
quantity
vat_calculation_type
vat_value

Request Example

{
  "filters": [
    {
      "Field": "document_id",
      "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 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",
            "field_id": 1,
            "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,
        "max_quantity": 1.0,
        "min_quantity": 1.0,
        "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,
      "order": 1,
      "price": 1.0,
      "quantity": 1.0,
      "quantity_const": 1.0,
      "vat_calculation_type": "No",
      "vat_value": 1.0
    }
  ],
  "total": 1
}