Public booking API with keys

Your website or a partner's booking form can list depots, find free cars and classes, get a quote and book, through a JSON API. Each caller has its own key, made by a Rent Manager and shown once.
PLANSFrom Growth

The problem it solves

  • Your website was built by an agency and you do not want an embedded page that looks different from the rest of the site.
  • A partner such as a hotel desk wants to book your cars from its own system, and today it emails you.
  • Prices on the website are typed by hand and differ from what the counter charges.
  • When a partner leaves, there is no way to stop its access without changing everyone's password.

How it works

  1. A Rent Manager opens Rental > Configuration > Customers and Channels > API Keys, presses New, names who uses it ("Our website"), and presses Make a New Key.
  2. The key is shown once. Copy it to the web developer; the list shows how the key starts and when it was last used.
  3. The developer calls the API with the key in the X-Api-Key header and your booking page address in the path. The booking page must be open.
  4. The website lists depots, asks for free cars and classes for the chosen times, and gets a quote with the extras the customer ticks.
  5. It sends the booking with the customer's details. The answer has the booking number, the link to the booking's own page and the pay links.
  6. Archive a key to stop it, or make a new one, which stops the old one.

Everything it does

What the API does

  • Depots: id, name and opening hours
  • Availability: free cars shown online, with depot, class, year, colour, seats, gearbox, highlights, picture, price, deposit and currency, cheapest first
  • Availability with classes: also each class with how many are free, its price from, and an example car
  • Quote: rent, deposit, total, the extras chosen, and every extra on offer with its excess and whether it is compulsory
  • Bookings: one car or any car of a class, with the customer's name, email, phone, date of birth and licence details

The same rules as the booking page

  • Shortest notice, cars free for the whole time, only cars and classes shown online
  • Prices from your rate plans, with VIP tiers and price rules on Scale
  • The blocklist, the contact matching on email and phone, and the driver record
  • Payment requests for what you take online, the unpaid hold and free cancellation
  • The agreement sent on booking, with SmartMy Sign

Keys

  • One key per caller, per Entity; only Rent Managers see and make keys
  • The key starts with rk_; only a fingerprint of it is stored, never the key itself
  • Last used is recorded on each call
  • A wrong or archived key is refused with an error

Answers

  • JSON in and out; times as date and hour in the Entity's own time zone
  • Errors come back as an error message with status 400
  • Bookings made this way carry Source API on the order

Who uses it

Rent ManagerMakes, names and archives keys.
Web developer or partnerBuilds the booking form on the API.
Rent UserHandles API bookings like any other booking.

Where you use it

  • Web: Rental > Configuration > Customers and Channels > API Keys
  • API: under /rent/api/v1/ and your booking page address
  • Not built: limits on how many calls a key may make and keys that can only read. Also not built: a published API reference for developers outside our team
  • Not in the API: changing or cancelling a booking; the customer does that on the booking's own page

What you control

Settings

  • Online Booking Open: must be on for the Entity
  • Keys: none until you make one
  • Shortest notice, holds, free cancellation and what is taken online: the booking page settings

Notifications

  • Rental Confirmed, Rental Payment Link and Rental Payment Received: to the customer, as for the booking page
  • In the app to people with a login, and by the first channel that works in the order WhatsApp, email, SMS. WhatsApp and SMS use your message credits

Questions

Can a partner see our customers or orders through the API?

No. The API lists depots, free cars, prices and extras, and makes bookings. It does not list customers or other bookings.

What if a key leaks?

Archive it, or press Make a New Key, and the old key stops working at once. Give the new key only to the caller.

Do API bookings follow our rules?

Yes. They use the booking page's rules: notice, free cars only, your prices, the blocklist, payments and the unpaid hold.

Can the API cancel a booking?

No. The answer gives the link to the booking's own page, where the customer pays, signs and cancels within the free time.

Is there documentation for our developer?

The user manual lists what each call does. A full reference with every field, for outside developers, is not published yet.

Related features

See your fleet on it.

Tell us how many cars or machines you hire out, from how many depots, and how bookings reach you today. We will set up your fleet with you on SmartMy Rental.