Rentals API
Start rental
Create a new rental for a driver at a spot.
POST
https://api.airgarage.com/rentalsRental types
- Monthly — charges the customer every month at the monthly rate. No end date is required; if none is given, the renter is billed every month and can cancel any time.
- Daily — charges the customer up front for multi-day parking between the start and end dates.
- Hourly — charges the customer up front for the specified time.
Body parameters
| Name | Type | Description |
|---|---|---|
usernameRequired | string | The driver's email address or phone number. |
platesRequired | string[] | License plates for the rental. At least one is required; use a placeholder like "TEMP" if you don't know the real plate yet. |
spot_uuidRequired | string | UUID of the spot the driver is parking at. |
rental_typeRequired | string | hourly, daily, or monthly. |
start_dateRequired | number | Rental start, as a Unix timestamp. |
end_date(optional) | number | Rental end, as a Unix timestamp. Optional for monthly rentals. |
state(optional) | string | Two-letter license plate state. |
token(optional) | string | Payment token, when your integration collects payment. |
Headers
| Name | Type | Description |
|---|---|---|
X-Api-KeyRequired | string | Your access token. |
curl -X POST https://api.airgarage.com/rentals/ \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "driver@example.com",
"start_date": 1625167463,
"end_date": null,
"plates": ["XY3BAC", "MR09E3"],
"rental_type": "monthly",
"spot_uuid": "dB2YV5Ngco4f7uKjdnGqgQ"
}'Responses
- 201Rental created. The response includes the rental's
uuid— store it; you'll need it to get, update, or end the rental later. - 400Validation failed — for example, a missing username or an empty plates list.