Add

[POST] .../v1/docordertomovement/add

Creates a new transfer order document. Use this method to create a movement order header that later receives requested item lines through OrderToMovementOperation/Add. The request body must contain date, stock_receiver_id and status_id; stock_receiver_id must be available to the current request user and status_id must belong to DocOrderToMovement document type. If attached_user_id is omitted or 0, the API attaches the current request user to the document. The caller must have movement order add permission; missing body, invalid required fields, unavailable stock movement order tariff, receiver stock access errors, wrong status document type, denied access, database failures or webhook failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
attached_user_id Int64 Optional Responsible user ID. If omitted or 0, the API uses the current request user.
date Int64 Required Document date as Unix time in seconds. Negative values are rejected.
status_id Int64 Required Movement order status ID. The status must belong to DocOrderToMovement document type.
stock_receiver_id Int64 Required Receiver stock ID.

Request Example

{
  "date": 1767225600,
  "stock_receiver_id": 12,
  "status_id": 3
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Insert Created record result.

Response Example

{
  "ok": true,
  "result": {
    "new_id": 4401
  }
}