Get

[POST] .../v1/doccashsession/get

Returns cash shifts. Use this method to retrieve retail cash shifts for reconciliation, shift monitoring or loading the shift context before reading cheques, payments and cash operations. The response returns paged DocCashSession records with next_offset and total, supports filters by uuid, operating_cash_id, date, is_aggregated, closed, open_user_id and close_user_id, plus sort_orders, limit and offset. The current request user must have cash shift select permission; the method does not change data and reads active shifts plus not-copied synchronized shifts according to the provided filters. Business errors such as missing body, denied access, invalid filters or sort_orders, database failures or persistent 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.
limit Int32 Optional Maximum number of records to return. Default value is 10000. Maximum value is 10000.
offset Int32 Optional Offset from the beginning of the result set.
sort_orders Array of DocCashSessionColumn Optional Output parameter sorting.

Filterable Fields

Field Type Description
closed bool
close_user_id int ID of the user who closed the shift.
end_date int Period end date as Unix time in seconds.
is_aggregated bool
is_agregated bool Cash operation aggregation status: true - aggregated, false - not aggregated, null - all shifts are returned (with aggregated and non-aggregated operations).
is_close bool Shift status: true - closed, false - not closed, null - all shifts are returned (open and closed).
open_user_id int ID of the user who opened the shift.
operating_cash_id int IDs of cash registers that the shifts are linked to.
start_date int Period start date as Unix time in seconds.
uuid string Shift UUIDs.

Sortable Fields

Field
closed
close_amount
close_date
close_user.name
code
last_update
operating_cash_id
start_amount
start_date
start_user.name
uuid

Request Example

{
  "filters": [
    {
      "Field": "operating_cash_id",
      "Operator": "In",
      "Value": "3,4"
    },
    {
      "Field": "closed",
      "Operator": "Equal",
      "Value": "false"
    }
  ],
  "sort_orders": [
    {
      "column": "start_date",
      "direction": "DESC"
    }
  ],
  "limit": 50,
  "offset": 0
}

Response Parameters

Name Type Description
next_offset Int32 Offset for the next data page.
ok Boolean Indicates whether the request completed successfully.
result Array of DocCashSession Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "uuid": "b2f790c8-4c0b-4d93-9a2d-3999dc5a0c11",
      "code": "CS-00045",
      "operating_cash_id": 3,
      "start_date": 1767225600,
      "start_user": {
        "id": 12,
        "first_name": "Ali",
        "last_name": "Karimov"
      },
      "start_amount": 150000,
      "close_date": 0,
      "close_user": null,
      "closed": false,
      "close_amount": 0,
      "last_update": 1767229200
    }
  ],
  "next_offset": 0,
  "total": 1
}