MartRental API
MartRental exposes a first-pass vehicle rental API under/api/v1/mart-rental.
The package owns rental-specific vehicle, cart, trip, assignment, transaction, and partial payment tables. It reuses product_service_items for the sellable rental service attached to each vehicle and sales_invoices for customer-facing trip invoices.
Authentication
All endpoints use the existing API middleware stack:apiapi.jsonauth:sanctumPlanModuleCheck:MartRental
active-workspace or workspace_id.
Vehicle Setup
Read module status:product_service_item_id is omitted, the service creates a reusable product_service_items record with type=service and links it to the rental vehicle.
List vehicles:
Cart And Trip Flow
Create a rental cart:rental_type=hourly, pricing uses hourly_price * estimated_hours * quantity.
For rental_type=distance, pricing uses distance_price * distance * quantity.
Create a trip from a cart:
sales_invoicessales_invoice_itemswhen the vehicle has a linked product/service itemmart_rental_tripsmart_rental_trip_detailsmart_rental_trip_vehicle_details
pending, confirmed, ongoing, completed, and canceled.
Record a trip payment:
mart_rental_trip_transactions and mart_rental_partial_payments, then update the trip payment status to partial or paid.