Overview
Cash sessions represent a single operational day for a cash register. Each session tracks all cash movements including adjustments and expenses, with a status lifecycle from DRAFT to POSTED.
Create Cash Session
Opens a new cash session for a specific register and operating date. Only one session per register per day is allowed.
POST /api/v1/cash-sessions
Request Body
Operating date in format YYYY-MM-DD (e.g., 2025-12-13)
Opening cash balance. If not provided, defaults to previous day’s closing balance
Additional metadata for the session Session note (e.g., “Morning shift”)
Response
Associated cash register ID
Operating date (YYYY-MM-DD)
Session status: DRAFT or POSTED
Opening balance as decimal string
Closing balance as decimal string (null until posted)
curl -X POST https://api.sushigo.local/api/v1/cash-sessions \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cash_register_id": 1,
"operating_date": "2025-12-13",
"opening_balance": 1000.00,
"meta": {
"note": "Morning shift"
}
}'
{
"message" : "Cash session created successfully" ,
"data" : {
"id" : 15 ,
"cash_register_id" : 1 ,
"operating_date" : "2025-12-13" ,
"status" : "DRAFT" ,
"opening_balance" : "1000.0000" ,
"closing_balance" : null ,
"meta" : {
"note" : "Morning shift"
},
"created_at" : "2025-12-13T08:00:00+00:00" ,
"updated_at" : "2025-12-13T08:00:00+00:00" ,
"cash_register" : {
"id" : 1 ,
"code" : "REG-001" ,
"name" : "Caja Principal" ,
"branch" : {
"id" : 1 ,
"name" : "Sucursal Centro"
}
}
}
}
List Cash Sessions
GET /api/v1/cash-sessions
Query Parameters
Filter by cash register ID
Filter by status: DRAFT or POSTED
Filter by specific date (YYYY-MM-DD)
Filter from date (YYYY-MM-DD)
Filter to date (YYYY-MM-DD)
sort_by
string
default: "operating_date"
Sort field
Response
Returns paginated list of cash sessions with calculated current balance.
curl https://api.sushigo.local/api/v1/cash-sessions?status=DRAFT & per_page = 10 \
-H "Authorization: Bearer YOUR_TOKEN"
Get Cash Session
GET /api/v1/cash-sessions/{id}
Path Parameters
Response
Returns session with related adjustments, expenses, and register information.
Array of cash adjustments EXTERNAL_IMPORT or CORRECTION
Adjustment lines by tender type
Update Cash Session
Only DRAFT sessions can be updated. Posted sessions are immutable.
PUT /api/v1/cash-sessions/{id}
Path Parameters
Request Body
Response
Post Cash Session
Finalizes the session by calculating closing balance and changing status to POSTED. All adjustments and expenses must be posted first.
POST /api/v1/cash-sessions/{id}/post
Path Parameters
Response
Posted session with calculated closing balance
curl -X POST https://api.sushigo.local/api/v1/cash-sessions/15/post \
-H "Authorization: Bearer YOUR_TOKEN"
{
"message" : "Cash session posted successfully" ,
"data" : {
"id" : 15 ,
"cash_register_id" : 1 ,
"operating_date" : "2025-12-13" ,
"status" : "POSTED" ,
"opening_balance" : "1000.0000" ,
"closing_balance" : "2350.5000" ,
"meta" : {
"note" : "Morning shift"
},
"created_at" : "2025-12-13T08:00:00+00:00" ,
"updated_at" : "2025-12-13T20:00:00+00:00" ,
"cash_register" : {
"id" : 1 ,
"code" : "REG-001" ,
"name" : "Caja Principal"
}
}
}
Get Session Summary
GET /api/v1/cash-sessions/{id}/summary
Returns detailed summary with income/expense breakdown by tender type.
Path Parameters
Response
Calculated closing balance
Breakdown by tender type (CASH, CARD, TRANSFER)
curl https://api.sushigo.local/api/v1/cash-sessions/15/summary \
-H "Authorization: Bearer YOUR_TOKEN"
Error Responses
422 Validation Error
403 Cannot Update Posted Session
422 Cannot Post Session
{
"message" : "A session already exists for this register on this date"
}