Create public car rental reservation (v1)
Method & Path
POST /api/v1/public/:workspaceSlug/carrental/reservations
Actual path: /v1/public/:workspaceSlug/carrental/reservations
Description
Create a rental reservation (status PENDING). Creates or finds customer by phone/email; optional document uploads (license, ID); returns reservationId and referenceCode.
Authentication
None – Public endpoint.
Headers
Content-Type: multipart/form-data
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceSlug | string | Yes | Public slug from carrental-settings. |
Request body (multipart fields)
| Field | Type | Required | Description |
|---|---|---|---|
fullName | string | Yes | Customer full name. |
phone | string | Yes | Customer phone. |
email | string | No | Customer email. |
idNumber | string | No | ID number. |
driverLicenseNumber | string | No | Driver license number. |
pickupAt | string | Yes | ISO 8601 datetime. |
dropoffAt | string | Yes | ISO 8601 datetime. |
pickupLocationType | string | Yes | BRANCH or DELIVERY. |
dropoffLocationType | string | Yes | BRANCH or DELIVERY. |
branchId | string | Yes | Branch ID (for BRANCH pickup/return). |
vehicleId | string | Yes | Vehicle ID. |
pickupAddress | string | No | Address when DELIVERY. |
dropoffAddress | string | No | Address when DELIVERY. |
deposit | number | No | Deposit amount. |
notes | string | No | Notes. |
licenseDoc | file | No | Driver license image. |
idDoc | file | No | ID document image. |
otherDoc | file | No | Up to 3 other documents. |
Response 201 Created
{
"reservationId": "...",
"referenceCode": "ABC12XY"
}
Common errors
- 400: Validation failed (missing required fields, invalid dates).
- 404: Car rental not found for this slug, or vehicle/branch not found.
- 500: Server error.