GetAmountDetails

[POST] .../v1/cashoperation/getamountdetails

Returns cash register cash details. Use this method to calculate cash balance details for one operating cash register over a required date period, such as cash reconciliation or retail finance dashboards. The request requires operating_cash_id and a positive Unix date period supplied through date filters, start_date must be earlier than end_date and the current user must have cash journal select permission 372. The response returns current_amount, start_amount, income, outcome and end_amount calculated from non-deleted cash journal operations in the requested period. Business errors such as missing body, missing operating_cash_id, missing or invalid period, denied access, database failures or cash operation lookup errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
filters Array of Filter Optional Optional filters by fields available for this API method.

Filterable Fields

Field Type Description
date int
end_date int Period end as Unix time in seconds. Required filter field.
operating_cash_id int Operating cash register ID. Required filter field.
start_date int Period start as Unix time in seconds. Required filter field.

Request Example

{
  "filters": [
    {
      "field": "operating_cash_id",
      "operator": "Equal",
      "value": "12"
    },
    {
      "field": "date",
      "operator": "GreaterOrEqual",
      "value": "1714521600"
    },
    {
      "field": "date",
      "operator": "LessOrEqual",
      "value": "1714607999"
    }
  ]
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result CashAmountDetails Result object.

Response Example

{
  "ok": true,
  "result": {
    "current_amount": 450000.000,
    "start_amount": 300000.000,
    "income": 200000.000,
    "outcome": 50000.000,
    "end_amount": 450000.000
  }
}