public-data-docs

Table: VOUCHERS

Description:

The vouchers table stores data on discount vouchers or promotions that customers can redeem for rentals. Vouchers include information about value, applicable conditions, and redemption details. Configured discounts or credits that can target specific cost sources and time segments of a rental (e.g., time.reservation, time.driving, additions, surcharges). They modify pricing at calculation time and are reflected in rentals pricing fields, not invoices. Use for re-engagement, loyalty, activation.

🔑 Primary Key

id

Field Name Data Type Description
id NUMBER Primary key of the voucher.
created_at TIMESTAMP_TZ Timestamp when the voucher was created.
updated_at TIMESTAMP_TZ Timestamp when the voucher was last updated.
description TEXT Detailed description of the voucher.
ext_invoice_number TEXT External invoice number associated with the voucher.
redemption_code TEXT Unique code for redeeming the voucher.
remaining_value_gross NUMBER Remaining gross value of the voucher.
remaining_value_net NUMBER Remaining net value of the voucher.
value_gross NUMBER Total gross value of the voucher.
value_net NUMBER Total net value of the voucher.
branch_id NUMBER Branch associated with the voucher.
created_by NUMBER ID of the user or system that created the voucher.
updated_by NUMBER ID of the user or system that last updated the voucher.
guser_id NUMBER User ID for the customer the voucher is associated with.
voucherable_id NUMBER The ID of the voucherable that the voucher was generated from.
invoice_id NUMBER Invoice ID related to the voucher, if applicable.
prerequisites_guser_id NUMBER User ID that must meet the prerequisites for voucher redemption.
dtype NUMBER Single-table-inheritance discriminator: 0 (Voucher), 2 (ConstraintVoucher), 3 (DiscountVoucher).
type NUMBER Type of voucher: 0 (SIGNUP), 1 (REFERRAL), 2 (DISCOUNT), 3 (PACKAGE), 4 (MONETARY), 5 (RENTAL_SUBSCRIPTION), 6 (RENTAL_SUBSCRIPTION_GIFT), 7 (REWARD), 8 (INSURANCE), 9 (TRIGGERED), 10 (CUSTOMER_CARE), 11 (PRICED_VOUCHER), 12 (VEHICLE_PROMOTION), 13 (PROMOTION), 14 (GEO_FENCE_PROMOTION), 15 (GEO_FENCE_SURCHARGE), 16 (RIDE_PASS), 17 (RIDE_REWARD).
type_name TEXT String label for type.
status NUMBER Constraint-voucher status (only set on ConstraintVoucher rows, NULL on base vouchers): 0 (ACTIVE), 1 (REDEEMED), 2 (EXPIRED), 3 (CANCELLED), 4 (SUSPENDED), 5 (PENDING).
status_name TEXT String label for status.
number_of_rentals NUMBER Number of rentals that the voucher can be used for.
remaining_number_of_rentals NUMBER Remaining rentals for which the voucher can be used.
rental_rebate NUMBER Rebate applied to each rental with this voucher.
discount NUMBER Discount amount associated with the voucher.
valid_from TIMESTAMP_TZ The start date from which the voucher is valid.
valid_until TIMESTAMP_TZ The end date until which the voucher is valid.
ext_ref TEXT External reference for the voucher.
applicable_branch_ids ARRAY List of branch IDs where the voucher is applicable.
applicable_vehicle_category_ids ARRAY List of vehicle category IDs the voucher is valid for.
validity_date_until TIMESTAMP_TZ Specific validity deadline for the voucher (if applicable).
validity_period NUMBER The period of validity (e.g., in days).
validity_time_unit NUMBER The unit for the validity period (e.g., days, months).
name TEXT Name or title of the voucher.
signup BOOLEAN Indicates whether the voucher is tied to a signup or subscription.
redeem_window_end TIMESTAMP_TZ End of the time window during which the voucher can be redeemed.
redeem_window_start TIMESTAMP_TZ Start of the time window during which the voucher can be redeemed.
required_annotation_ids ARRAY List of annotation IDs required to redeem the voucher.
prerequisites_met BOOLEAN Indicates if the prerequisites for the voucher have been met.
prerequisites NUMBER Bitmap of prerequisite conditions for the voucher (raw integer).
applicable_price_type TEXT The price type the voucher is applicable to (string enum).
monetary BOOLEAN Whether the voucher carries a monetary value.
canceled_at TIMESTAMP_TZ Timestamp when the voucher was canceled, if applicable.
_snowflake_inserted_at TIMESTAMP_NTZ System timestamp when the record was inserted into Snowflake.
_snowflake_updated_at TIMESTAMP_NTZ System timestamp when the record was last updated in Snowflake.
_snowflake_deleted BOOLEAN True if the record was deleted in the source.