Rental Tool API Documentation

The API provides access to the core elements of the web software such as: cikes, equipment, prices, stocks, reservations and more.

Last update: March 2022

Use

The interface can be used to fill needs and extend functions far beyond what the rental tool itself can do.
Examples:

  • custom interfaces
  • more extensive statistics
  • export and import functions

Authentication

In order to access the rental tool via the REST API, registration is required. A bearer token is required for registration, which can be generated after contacting support@verleihtool.com.

Bikes

To access this resource, call this URL:

  • https://verleihtool-url/api/bikes

Required parameters – GET
Individual bike data can be retrieved via bike ID:

  • https://verleihtool-url/api/bikes/id

Add a bike – POST
Send POST request with the required data to the following URL:

  • https://verleihtool-url/api/bikes

Retrieve available bikes – GET
To retrieve available bicycles in a time period, call this URL:

  • https://verleihtool-url/api/bikes/free/start/end
  • Example free bikes tomorrow:
    • https://verleihtool-url/api/bikes/free/2022-08-14/2022-08-14

Return values

Field Type Original Object
id int (primary key)
category_id int (foreign key) Bike Category
price_id int (foreign key) Price
name array
size string
image_id int (foreign key) Image
attributes array
sortindex int
show_frontend boolean
updated_at date

Bike categories

To access this resource, call this URL:

  • https://verleihtool-url/api/categories

Return values

Field Type Original Object
id int (primary key)
name array
image_id int (foreign key) Image
sortindex int
show_frontend boolean
updated_at date

Equipment

To access this resource, call this URL:

  • https://verleihtool-url/api/equipments

Required parameters – GET
Individual equipment data can be retrieved via its ID:

  • https://verleihtool-url/api/equipments/id

Return values

Field Type Original Object
id int (primary key)
price_id int (foreign key) Price
name array
image_id int (foreign key) Image
sortindex int
show_frontend boolean
updated_at date

Reservations

To access this resource, call this URL:

  • https://verleihtool-url/api/reservations

Required parameters – GET
Booking details can be retrieved via reservation ID:

  • https://verleihtool-url/api/reservations/id

Add reservation – POST
Send POST request with the required data to the following URL:

  • https://verleihtool-url/api/reservations

Return values

Field Type Original Object
id int (primary key)
hotel_id int (foreign key) Hotel
customer array
number int
language string
start_at date
end_at date
bikes array
equipments array
positions array
delivery boolean
price double
paid boolean
note text
reservation_state_id int (foreign key) Reservation Status
created_at date
updated_at date

Reservation state

To access this resource, call this URL:

  • https://verleihtool-url/api/reservation-states

Return values

Field Type Original Object
id int (primary key)
name string

Rental stations

To access this resource, call this URL:

  • https://verleihtool-url/api/places

Required parameters – GET
Individual rental station data can be retrieved via rental station ID:

  • https://verleihtool-url/api/places/id

Return values

Field Type Original Object
id int (primary key)
name array
address array
restdays string
logo_image_id int (foreign key) Image
sortindex int
show_frontend boolean
updated_at date

Prices

To access this resource, call this URL:

  • https://verleihtool-url/api/prices

Required parameters – GET
Individual price data can be retrieved via the price ID:

  • https://verleihtool-url/api/prices/id

Return values

Field Type Original Object
id int (primary key)
type string
daily_gross double
scaled_gross string
onetime_gross string
halfday_gross string
is_free boolean

Stock bikes

To access this resource, call this URL:

  • https://verleihtool-url/api/stock/bikes

Required parameters – GET
Details can be retrieved via the stock ID:

  • https://verleihtool-url/api/stock/bikes/id

Return values

Field Type Original Object
id int (primary key)
bike_id int (foreign key) Bike
place_id int (foreign key) Station
price_id int (foreign key) Price
bike_number string
active boolean
updated_at date

Stock bikes

To access this resource, call this URL:

  • https://verleihtool-url/api/stock/equipments

Required parameters – GET
Details can be retrieved via the stock ID:

  • https://verleihtool-url/api/stock/equipments/id

Return values

Field Type Original Object
id int (primary key)
equipment_id int (foreign key) Equipment
place_id int (foreign key) Station
price_id int (foreign key) Price
updated_at date

Pedals

To access this resource, call this URL:

  • https://verleihtool-url/api/pedals

Add pedal – POST
Send POST request with the required data to the following URL:

  • https://verleihtool-url/api/pedals

Return values

Field Type Original Object
id int (primary key)
name array
sortindex int
show_frontend boolean
updated_at date

Hotels

To access this resource, call this URL:

  • https://verleihtool-url/api/hotels

Return values

Field Type Original Object
id int (primary key)
name string
show_frontend boolean
address array
Icon