Skip to main content

Dashboard – Car rental ledger & contracts (v1)

Base path

/api/v1/workspace/:workspaceId/carrental

All endpoints require workspace JWT and staff permission carrental.manage.

Ledger

MethodPathDescription
GET/:workspaceId/carrental/reservations/:id/ledgerList ledger entries for a reservation.
POST/:workspaceId/carrental/reservations/:id/ledgerCreate ledger entry (body: kind RENTAL | DEPOSIT | EXTRA | REFUND, title, amount, currency, status, method, meta).

Ledger kinds: RENTAL (base rental), DEPOSIT, EXTRA (fees), REFUND. Default currency ILS.

Contracts

MethodPathDescription
POST/:workspaceId/carrental/reservations/:id/contract/generateGenerate contract from template (returns contract with termsHtml, optional pdfUrl).
GET/:workspaceId/carrental/contracts/:idGet contract by ID.

Common errors

  • 400: Validation failed.
  • 401: Unauthorized.
  • 403: Forbidden.
  • 404: Reservation, contract, or workspace not found.
  • 500: Server error.