Get

[POST] .../v1/docmovement/get

Returns documents movement. Use this method to list stock movement documents before opening a document, checking its lock/posting state or selecting a document for the movement operation workflow. The response returns paged DocMovement records with next_offset and total and filters are id, stock_sender_id, stock_receiver_id, firm_sender_id, firm_receiver_id, attached_user_id, performed, blocked, deleted_mark and date; 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 current request user's allowed stocks and the tariff display-period rule. The caller must have document movement select permission; missing body, denied access, unavailable 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, sender or receiver stock name, sender or receiver firm name or TIN and responsible user full name. Search is applied only when the trimmed term is longer than the server search threshold.
sort_orders Array of DocMovementColumn Optional Output parameter sorting.

Filterable Fields

Field Type Description
attached_user_id int Responsible user IDs.
blocked bool Filter by document lock flag.
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.
firm_receiver_id int Receiver firm IDs.
firm_sender_id int Sender firm IDs.
id int Movement document IDs.
performed bool Filter by document posting flag.
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.
stock_receiver_id int Receiver stock IDs. Values are intersected with the current request user's allowed stocks.
stock_sender_id int Sender stock IDs. Values are intersected with the current request user's allowed stocks.

Sortable Fields

Field
attached_user.name
blocked
code
date
deleted_mark
id
last_update
performed
stock_receiver.name
stock_sender.name

Request Example

{
  "filters": [
    {
      "field": "stock_sender_id",
      "operator": "In",
      "value": "11"
    },
    {
      "field": "stock_receiver_id",
      "operator": "In",
      "value": "12"
    },
    {
      "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 DocMovement Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 4201,
      "date": 1767225600,
      "code": "MVT-000042",
      "stock_sender": {
        "id": 11,
        "name": "Main warehouse",
        "firm": {
          "id": 1,
          "name": "REGOS"
        }
      },
      "stock_receiver": {
        "id": 12,
        "name": "Downtown shop",
        "firm": {
          "id": 1,
          "name": "REGOS"
        }
      },
      "description": "Transfer coffee to downtown shop",
      "attached_user": {
        "id": 5,
        "name": "John Smith"
      },
      "performed": false,
      "blocked": true,
      "current_user_blocked": true,
      "deleted_mark": false,
      "last_update": 1767225600
    }
  ],
  "next_offset": 0,
  "total": 1
}