Get

[POST] .../v1/docproduction/get

Returns production documents. Use this method to list production documents before opening a production run, checking its lock or posting state or selecting it for ProductionOperation rows. The response returns paged DocProduction records with next_offset and total, supports filters by id, type, date, code, stock_id, attached_user_id, performed, blocked, deleted_mark and search. Production must be enabled by the PRODUCTION_ALLOWED setting and the production tariff parameter and the current request user must have production document select permission. Missing body, disabled production, denied access, invalid filters or sort_orders, unavailable tariff, database failures and display-period restrictions 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. Server settings define the effective maximum.
offset Int32 Optional Offset from the beginning of the result set. Negative values are treated as 0.
search String Optional Search by parameter values: code - document code, User/name - responsible person full name, Stock/name - stock name, Firm/name - company name, Firm/inn - company TIN.
sort_orders Array of DocProduction_Column Optional Output parameter sorting.

Filterable Fields

Field Type Description
attached_user_id int Responsible user IDs.
blocked bool Production document edit lock state: true - locked for editing, false - unlocked for editing.
code string Production document code.
date int
deleted_mark bool Production document deletion mark status: true - marked, false - not marked.
end_date int Period end date as Unix time in seconds.
id int Production document IDs.
performed bool Production document posting state: true - posted, false - not posted.
start_date int Period start date as Unix time in seconds.
stock_id int Stock IDs.
type string Production document type: Assemblable - assembly, Disassemblable - disassembly.

Sortable Fields

Field
attached_user.name
blocked
code
date
deleted_mark
id
last_update
performed
stock.name
type

Request Example

{
  "filters": [
    {
      "field": "stock_id",
      "operator": "In",
      "value": "3"
    },
    {
      "field": "type",
      "operator": "Equal",
      "value": "Assemblable"
    },
    {
      "field": "performed",
      "operator": "Equal",
      "value": "false"
    }
  ],
  "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 DocProduction Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 7401,
      "type": "Assemblable",
      "date": 1767312000,
      "code": "PR-000141",
      "stock": {
        "id": 3,
        "name": "Main stock"
      },
      "description": "Assembly run for gift sets",
      "attached_user": {
        "id": 7,
        "name": "Production operator"
      },
      "blocked": true,
      "current_user_blocked": true,
      "performed": false,
      "deleted_mark": false,
      "last_update": 1767312000
    }
  ],
  "next_offset": 0,
  "total": 1
}