public-data-docs

Table: RENTALS

Description:

The rentals table captures all ride activities from start to finish, including time and distance metrics, pricing breakdowns, associated users, vehicles, branches, and additional metadata used for billing, analytics, and customer service. One row per customer trip. Authoritative for revenue, usage, time and distance, trip states, and pricing breakdowns.

🔑 Primary Key

id

Field Name Data Type Description
id NUMBER Unique identifier for the rental.
guser_id NUMBER Foreign key to the customer (gusers) who made the rental.
group_id NUMBER Group or fleet booking identifier.
branch_id NUMBER Originating branch/location ID.
end_branch_id NUMBER ID of the branch where the rental ended.
vehicle_id NUMBER Foreign key to the rented vehicle.
state NUMBER The state of the rental (0 => RESERVATION: the vehicle is reserved but the rental has not been started yet. 1 => ACTIVE: the rental has started, ie. the vehicle has been started and used for driving; the vehicle is driving or parking. 2 => EXPIRED: the reservation is expired, ie. the vehicle is free for rental again afterwards. 3 => ENDED: the rental is ended. 4 => CANCELLED: the reservation is cancelled by the user. 5 => ENDED_NO_MOVEMENT: the rental was started (ie. ACTIVE) but the vehicle was not moved; these rentals are shown on the invoice with a price of 0).
state_name TEXT String label for state.
type NUMBER Type of rental (0 => PERSONAL: default value, normal rental. 1 => BUSINESS: the rental is created with a group id (business account) and is charged against the group’s balance. 2 => SERVICE: the rental is created by a service worker to relocate the vehicle).
type_name TEXT String label for type.
source NUMBER Rental source. Intended to identify the originating MaaS provider (0 => INTERNAL. 1 => GAIYO (deprecated). 2 => TURNN).
source_name TEXT String label for source.
start_time TIMESTAMP_TZ Timestamp when the rental began.
end_time TIMESTAMP_TZ Timestamp when the rental ended.
start_kilometers FLOAT Odometer reading at the start of the rental.
end_kilometers FLOAT Odometer reading at the end of the rental.
start_state_of_charge NUMBER Battery level (or fuel) at the start of the ride (% or range 0–100).
end_state_of_charge NUMBER Battery level (or fuel) at the end of the ride (% or range 0–100).
start_position GEOMETRY Geolocation at the start of the rental.
end_position GEOMETRY Geolocation at the end of the rental.
start_address TEXT Human-readable address at rental start. Use this for searching rental starts based on a specific location.
end_address TEXT Human-readable address at rental end. Use this for searching rental ends based on a specific location.
time_driving NUMBER Duration spent driving, in seconds.
time_parking NUMBER Duration spent parking, in seconds.
time_reservation NUMBER Time spent in reservation mode before the rental starts, in seconds.
linked_rental_id NUMBER ID of another rental that this one is linked to (e.g. continuation).
invoice_id NUMBER Linked invoice ID, if applicable.
cost_center_id NUMBER Internal cost allocation center (for business rentals).
price_setting_id NUMBER ID referencing the price setting configuration used for this rental.
price_for_reservation_net NUMBER Net cost for the reservation-only period.
price_for_reservation_gross NUMBER Gross cost for the reservation-only period.
price_for_driving_net NUMBER Net cost (before tax) for the driving part of the rental.
price_for_driving_gross NUMBER Total gross cost incurred from driving.
price_for_parking_net NUMBER Net cost from parking.
price_for_parking_gross NUMBER Gross cost from parking (if applicable).
non_rebatable_price_net NUMBER Net portion of the price not eligible for rebates.
non_rebatable_price_gross NUMBER Gross portion of the price that cannot be reduced by rebates.
rebate_net NUMBER Net (before tax) rebate amount.
rebate_gross NUMBER Gross amount of discount or rebate applied.
surcharge_net NUMBER Extra charges net (e.g. penalties, cleaning fees).
surcharge_gross NUMBER Extra charges gross.
price_v3 VARIANT Price representation / calculation of the rental. Example: { "additions": {}, "currency": "EUR", "penalties": {}, "price": { "DRIVING": 5.94, "PARKING": 0, "RESERVATION": 0 }, "rebates": {}, "scale": 2, "surcharges": {}, "tax": 0.95, "taxPercentage": 19, "totalGross": 5.94, "totalNet": 4.99 }.
rating NUMBER User rating for the rental experience.
rating_description TEXT Customer rating as a string. Contains user dissatisfaction comments or appreciations.
details VARIANT Structured object with extended details. Example 1: { "stationReturnId": "1", "stationStartId": "2" }; example 2: { "stationStartId": "2" }; example 3: { "helmetsCountAtEnd": 2, "helmetsCountAtStart": 2 }.
reason TEXT Metadata reason.
ext_ref TEXT External reference ID.
ext_payment_ref TEXT External payment system reference (e.g. PSP transaction ID).
created_at TIMESTAMP_TZ Creation timestamp.
updated_at TIMESTAMP_TZ Last update timestamp.
_snowflake_inserted_at TIMESTAMP_NTZ Timestamp when the record was inserted into Snowflake.
_snowflake_updated_at TIMESTAMP_NTZ Timestamp when the record was last updated in Snowflake.
_snowflake_deleted BOOLEAN True if the record was deleted in the source.