SCO Autolavados uses a commission pool (pozo) model for laundrer payroll. At the end of each day, the system calculates the total commission earned from all finalized service orders, then divides it equally among every laundrer who started a shift that day (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Luisangelebp/SCO_Autolavados/llms.txt
Use this file to discover all available pages before exploring further.
isWorkingToday was true at some point during the day). The commission basis — either the full service price or the base service price for that vehicle type — is configurable via the commissionType field on the AutoLavado record.
Endpoints
GET /api/payroll/daily
Calculate the commission pool and per-laundrer payout for a given day. The date range is adjusted for Venezuela Time (VET, UTC-4) so that “today” always maps correctly regardless of the server’s UTC clock. Authentication: Requires a valid JWT token with the ADMIN role.Query Parameters
The calendar date to calculate payroll for, in Venezuela Time. Defaults to
today (VET) if omitted. Example:
2026-06-26.| Status | Condition |
|---|---|
500 | AutoLavado configuration not found in the database |
500 | Internal calculation error |
401 | Missing or invalid JWT token |
403 | Caller does not have the ADMIN role |
Response Field Reference
| Field | Type | Description |
|---|---|---|
date | string | ISO 8601 start-of-day timestamp (04:00 UTC = 00:00 VET) for the requested date |
totalOrdersFinished | number | Count of service orders with state FINALIZADO whose timeEnd falls on the requested date |
totalPozoUsd | number | Total USD flowing into the commission pool — calculated as service.priceUsd × commissionPercent / 100 summed across all finished orders |
laundrersCount | number | Number of laundrers who started a shift on this date (lastShiftStart within the day range, or isWorkingToday was true) |
payoutPerLaundrer | number | totalPozoUsd ÷ laundrersCount — each laundrer’s equal share |
commissionType | string | Either FULL_PRICE or BASE_SERVICE — mirrors the AutoLavado configuration at query time |
activeLaundrers | array | List of laundrer objects (id, name, lastName, cedula) who worked that day |
Commission Type Calculation
ThecommissionType setting on the AutoLavado record controls which price is used as the basis for each finished order’s contribution to the pool:
commissionType | Basis per order |
|---|---|
FULL_PRICE | The actual service.priceUsd of the service that was performed |
BASE_SERVICE | The priceUsd of the base service (isBaseService: true) configured for the vehicle’s TypeCar — ignores the actual service performed |
commissionPercent / 100 (configured on AutoLavado, default 40%).
Example: 1 finished order, service price $5.00, commissionPercent = 40, mode = FULL_PRICE:
- Contribution to pool = 2.00**
POST /api/payroll/pay
Register a payroll payment as a company expense. This records the full pool amount as anExpense entry (debited from the AutoLavado balance) so the disbursement appears in financial reports.
Authentication: Requires a valid JWT token with the ADMIN role.
Request Body
The payroll date to pay. Defaults to today if omitted.
Payroll Concepts
Read the conceptual guide for a full explanation of the commission pool model,
shift management, and how
FULL_PRICE vs BASE_SERVICE affects daily payouts.