SetReturn

[POST] .../v1/pos/doccheque/setreturn

Changes cheque type to sale or return Use this method to set whether a POS cheque is a sale cheque or a return cheque before completing the retail workflow. The request requires uuid and is_return, locks the cheque by uuid, checks the current request user, requires retail permission to set return mode and returns row_affected after the flag is changed. The method expects the cheque to be in a state where sale or return type can still be changed; missing fields, denied permission, missing accepted cash register, invalid cheque state and storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
is_return Boolean Required Cheque type: true - return cheque, false - sale cheque.
return_reason_id Int64 Optional Return reason ID.
uuid String Required Cash register cheque UUID.

Request Example

{
  "is_return": true,
  "return_reason_id": 1,
  "uuid": "00000000-0000-0000-0000-000000000000"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "ids": [
      null
    ],
    "row_affected": 1
  }
}