POS Money Movement API
The POS Money Movement API provides endpoints for managing cash movements (deposits and withdrawals) within active POS sessions (openings). Money movements track all cash in/out operations during a POS session.All POS Money Movement API endpoints require authentication and a valid
x-store-id header to identify the store context.Overview
Each money movement:- Belongs to one POS opening (session)
- Has an amount and type (deposit or withdrawal)
- Can include an optional note
- Is timestamped for audit purposes
- Can only be created for active (open) POS sessions
Endpoint Details
Base URL:/pos-money-movementsContent-Type:
application/json
Required Headers
Entity: POS Money Movement
Create Money Movement
POST/pos-money-movements
Registers a new cash movement (deposit or withdrawal) inside an active POS session (opening).
Requires Authentication: Bearer token in Authorization header
Required Headers
Request Body
Success Response
Status Code:200 OK
Possible Errors
Example Request
Get Money Movements by POS Opening
GET/pos-money-movements/:openingId
Fetches all money movements linked to a specific POS opening and provides a summary with totals (cash in/out/net).
Requires Authentication: Bearer token in Authorization header
Required Headers
Path Parameters
Success Response
Status Code:200 OK
Response Fields
Movements Array
Summary Object
Possible Errors
Example Request
Summary
Security & Validation
- All routes require a valid
x-store-idheader - Money movements can only be created for active (open) POS sessions
- POS opening must exist and be validated before creating movements
- Closed POS sessions cannot accept new money movements
- Store ID validation prevents unauthorized access
Business Logic
Money Movement Creation
- POS opening must exist and be active (not closed)
- Amount must be a positive number
- Type must be either “deposit” or “withdrawal”
- Movements are automatically timestamped
- Note field is optional
Movement Retrieval
- Returns all movements for a specific POS opening
- Movements are ordered by creation date (oldest first)
- Summary automatically calculates:
- Total number of movements
- Total deposits (cash in)
- Total withdrawals (cash out)
- Net amount (deposits - withdrawals)
Validation Rules
- Cannot create movements for non-existent POS openings
- Cannot create movements for closed POS sessions
- All movements are permanently recorded for audit purposes