Add

[POST] .../v1/operatingcash/add

Adds a new retail cash register. Use this method to create a retail cash register before it is assigned to users, selected in POS sessions or used for retail documents. It returns new_id and validates stock_id, price_type_id, non-virtual register key, key length and description length before saving. The caller must have operating cash add permission; missing body, invalid required fields, denied access, duplicate key or related-record validation failures and storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
auto_close Boolean Optional Automatically closes the shift when the maximum number of cheques per shift is reached.
description String Optional Additional description. Maximum length is 500 characters.
fields Array of FieldValueAdd Optional Custom field values.
key String Optional Retail cash register security key. Required for non-virtual cash registers. Maximum length is 32 characters.
max_cheque_quantity_in_session Int32 Optional Maximum number of cheques per shift.
price_type_id Int64 Required Price type ID.
stock_id Int64 Required ID of the stock that the cash register belongs to.
virtual Boolean Optional Indicates whether the cash register is virtual.

Request Example

{
  "stock_id": 8,
  "key": "POS-MAIN-01",
  "price_type_id": 4,
  "description": "Main checkout",
  "virtual": false,
  "auto_close": false,
  "max_cheque_quantity_in_session": 1000,
  "fields": []
}

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