Verleihtool API Documentation

The Verleihtool API enables access to the core elements of the tool such as: bikes, accessories, prices, inventory, reservations, and more.

Last update: February 2024

Use

The interface can be used to fill gaps and extend functions that go far beyond what the Verleihtool itself can do.
Examples:

  • Custom interfaces
  • Comprehensive statistics
  • Export and import functions

Authentication

To access the Verleihtool via the REST-API, a login is required. For the login, a Bearer Token is required, which can be generated after contacting support@verleihtool.com.

Bikes

To access this resource, simply call the following URL:

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

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

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

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

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

Retrieve Available Bikes – GET
To retrieve available bikes in a time period, call the following URL:

  • https://verleihtool-url/api/bikes/free/start/end
  • Example for available bikes tomorrow:
    • https://verleihtool-url/api/bikes/free/2024-07-28/2024-07-28

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, simply call the following 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

Accessories

To access this resource, simply call the following URL:

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

Required Parameters – GET
Individual accessory data can be retrieved via the accessory 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, simply call the following URL:

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

Required Parameters – GET
Reservation details can be retrieved via the reservation ID:

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

Add Reservation – POST
Send a 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 Status

To access this resource, simply call the following 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, simply call the following URL:

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

Required Parameters – GET
Individual rental data can be retrieved via the 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, simply call the following 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

Inventory - Bikes

To access this resource, simply call the following URL:

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

Required Parameters – GET
Details can be retrieved via the inventory 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

Inventory - Bikes

To access this resource, simply call the following URL:

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

Required Parameters – GET
Details can be retrieved via the inventory 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, simply call the following URL:

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

Add Pedal – POST
Send a 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, simply call the following URL:

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

Return Values

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