Rentals API

Start rental

Create a new rental for a driver at a spot.

POSThttps://api.airgarage.com/rentals

Rental 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

NameTypeDescription
usernameRequiredstringThe driver's email address or phone number.
platesRequiredstring[]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_uuidRequiredstringUUID of the spot the driver is parking at.
rental_typeRequiredstringhourly, daily, or monthly.
start_dateRequirednumberRental start, as a Unix timestamp.
end_date(optional)numberRental end, as a Unix timestamp. Optional for monthly rentals.
state(optional)stringTwo-letter license plate state.
token(optional)stringPayment token, when your integration collects payment.

Headers

NameTypeDescription
X-Api-KeyRequiredstringYour access token.
Example requestbash
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.