OutcomeAdd

[POST] .../v1/pos/cashoperation/outcomeadd

Adds cash-out operation. Create a cash-out journal operation for the current accepted POS cash register, for example when cash is withdrawn from the drawer. The request requires payment_type_id, value greater than zero and description, checks the current cash shift and returns new_id for the created Outcome cash operation. The method checks the current request user, requires cash-out permission, requires an accepted cash register and current open POS session and writes the operation with the session UUID; missing fields, denied permission, missing session and storage errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
description String Required Required cash operation comment. Maximum length: 512 characters.
payment_type_id Int64 Required Payment method ID. Cash payment method only.
value Decimal Required Cash operation amount. The value must be greater than zero and uses precision 18,3.

Request Example

{
  "payment_type_id": 2,
  "value": 100000.000,
  "description": "Cash withdrawal for safe transfer"
}

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": 7101
  }
}