This is a translation. The Slovenian page is binding: Izvoz podatkov.
A customer’s administrator can download the full company data export at any time (Settings → Company → Full company data export). This page describes the contents and format of the export and every table and column it contains. It is the online register of data structures and data formats under Article 26 of the Data Act (Regulation (EU) 2023/2854).
The description of the tables and columns is generated from the database schema the export reads, so it always matches the version of the service in use. Every export carries the same description in dictionary.json. The other Data Act information (jurisdiction of the infrastructure and safeguards against access by foreign authorities) is on the Sub-processors page.
Contents of the archive
The export is one ZIP archive named prevoxio-export-<company>-<date>-<time>.zip (time in UTC). Archives larger than 4 GB use the ZIP64 extension.
| Path in the archive | Contents | Format |
|---|---|---|
database/<table>.ndjson | the records of one database table; one file for every table in the section Tables and columns | one JSON object per line, UTF-8; keys are the column names in database order, records are ordered by primary key |
files/private/ | uploaded files: scans of vehicle and driver documents, CMRs and other invoice attachments, order documents, work order attachments, signature and stamp images | original format as uploaded (e.g. PDF, JPEG, PNG) |
files/public/ | the company logo and older signature images | original format |
manifest.json | export time, database schema version (latest migration), record count per table, size and SHA-256 checksum of every data file and every uploaded file, the tables not in the export and missing files | JSON |
dictionary.json | the description of the tables and columns on this page, in Slovenian and English | JSON |
README.txt | a short description of the format in Slovenian and English | text, UTF-8 |
The file of a storage_key or scan_storage_key column is in the archive under files/private/ at the key without its leading tenants/<company>/ part. manifest.json names the table and record of every file and lists the files that could not be found at export time.
Standards used: ZIP (PKWARE APPNOTE), JSON (RFC 8259) with one record per line (JSON Lines), UTF-8 encoding, SHA-256 (FIPS 180-4), dates and times under ISO 8601, currencies under ISO 4217 and countries under ISO 3166-1. Issued e-invoices are stored as eSLOG 2.0 or UBL 2.1 (Peppol BIS Billing 3.0), issued quotes as PDF.
How values are written
Values are written exactly as stored in the database. The Type column of the table descriptions gives the PostgreSQL type; in JSON the values look like this:
| Type | Value in JSON | Example |
|---|---|---|
integer | whole number | 42 |
numeric(p,s) | number with all stored decimals (p digits, s of them after the decimal point); read amounts as decimal numbers, not as floating-point numbers | 1234.50 |
text, varchar(n), char(n), uuid | string; n is the maximum length, a char(n) value is padded with spaces to n characters | "Ljubljana" |
boolean | true or false | true |
date | string with the date | "2026-11-06" |
timestamp(3) | string with date and time in UTC without a time zone suffix, with up to three decimals of seconds | "2026-11-06T14:05:09.123" |
enum | string, one of the values listed for the column | "confirmed" |
jsonb | nested JSON value (object or array) | {"SI": 12.4} |
bytea | string with the bytes as hex, starting with \x; in the JSON file the backslash is doubled | "\\x25504446" |
text[], enum[] | array of strings; an empty list is [] | ["admin","accountant"] |
An empty value is null. The Can be empty column of the table descriptions says where that is possible.
What the export leaves out
The export contains every table of the customer’s database except these:
| Table | Reason |
|---|---|
_prisma_migrations | schema migration bookkeeping (the version is in the manifest) |
rate_limit_buckets | short-lived abuse counters keyed by IP/user |
order_route_geometries | route display lines from the routing provider (third-party content, kept at most 30 days; recomputable from the order stops) |
route_cache_entries | cached routing provider responses (third-party content, kept at most 30 days) |
routing_usage_months | routing provider usage counters for cost control |
The values of these columns are not exported because they are security secrets; the other columns of these tables are exported:
| Column | Contents |
|---|---|
users.password | password hash |
users.totp_secret | two-factor secret |
users.recovery_codes | recovery codes |
tenant_integrations.encrypted_credential | encrypted integration credential (the customer holds its FleetCore token itself) |
vehicle_costs.card_hash | protected fingerprint of the card number (the last four characters are exported) |
vehicle_costs.device_hash | protected fingerprint of the toll-box number (the last four characters are exported) |
cost_card_mappings.identifier_hash | protected fingerprint of the card or toll-box number (the last four characters are exported) |
Invoice PDFs and CMRs that the service generates from the data are not stored as files; the export contains all the data they are generated from.
Tables and columns
The export contains 60 tables with 1000 columns in total. Each column lists its type (see How values are written), whether the value can be empty and its meaning. A primary key is marked next to the type, and a reference names the table and column the value points to.
| Table | Contents |
|---|---|
| accounting_export_batches | Accounting export batches: each finalised export of issued invoices (e.g. for Vasco) with its totals |
| accounting_export_items | Accounting export items: a snapshot of each invoice as it was exported in a batch |
| audit_logs | Audit trail: who created, changed, deleted or exported which record and when |
| company_settings | Company settings (one record): company name, address, tax and bank details, logo, way of working, default truck for routing and two-factor rules |
| cost_card_mappings | Fuel cards and toll boxes linked to a vehicle, for costs that carry no plate |
| cost_import_batches | Imports of cost files (Eurowag, DarsGo): file name and hash, period and row counts; the files themselves are not kept |
| countries | Country list |
| driver_documents | Driver documents (e.g. driving licence, driver card, medical certificate) with expiry dates and scans |
| driver_salary_configs | Driver pay settings: pay basis and amounts, valid from a given date |
| drivers | Drivers |
| einvoice_documents | Issued e-invoices (eSLOG 2.0 or UBL 2.1), stored exactly as issued |
| external_batches | External batches: groups of orders that a partner lists under one number of its own (e.g. a collective delivery note) |
| external_rate_snapshots | Stored external figures used in cost estimates: fuel prices and exchange rates with their source and time of validity |
| external_settlements | Partner settlements (e.g. a statement or self-billing credit note the partner sends) that group external batches and that an invoice can refer to |
| fleetcore_driver_mappings | Links between Prevoxio drivers and drivers in the CVS (FleetCore) telematics: only the driver key in CVS and how the link was made, no names or tachograph card numbers |
| fleetcore_vehicle_daily_metrics | Daily vehicle figures from FleetCore telematics: distance, fuel, idling and costs |
| fleetcore_vehicle_mappings | Links between Prevoxio vehicles and FleetCore telematics vehicles, with the last known position |
| fleetcore_vehicle_trips | Vehicle trips from FleetCore telematics (distance, duration, fuel, start and end), the basis for automatic quote estimates; no driver data |
| invoice_documents | Files attached to invoices (e.g. signed CMRs) |
| invoice_lines | Invoice lines |
| invoice_number_sequences | Numbering state of invoices, credit notes and debit notes per year: the highest sequence number already handed out, which never goes down |
| invoice_number_starts | First number of invoices, credit notes or debit notes in a year, continuing the numbering of the previous software |
| invoice_orders | Links between invoices and orders: which orders an invoice bills |
| invoices | Invoices, credit notes and debit notes |
| order_documents | Files attached to orders (e.g. the customer’s order) |
| order_number_sequences | Order numbering state per year |
| order_route_plans | Route plans frozen when an order was confirmed: planned km (empty, loaded, per country), driving time, tolls with VAT, planned cost and the inputs used |
| order_stops | Additional stops of orders (loading or unloading places) in sequence |
| order_templates | Order templates: saved form contents for quickly entering similar orders |
| orders | Transport orders: customer, route, cargo, vehicle, driver, price, subcarrier, CMR details and status |
| partner_bank_accounts | Partners’ bank accounts |
| partner_contacts | Partners’ contact persons |
| partners | Partners: customers, carriers (subcarriers), suppliers and employees |
| payment_terms | Payment terms (days until due) |
| pricing_locations | Pricing locations: places that pricing rates apply to |
| pricing_rates | Pricing rates (price list): price per billing unit for a pricing location and validity period |
| quote_estimate_components | Items of a quote cost estimate (fuel, driver, tolls …) with quantity, price and data source |
| quote_estimate_mutation_receipts | Receipts of saved cost estimates, so that a repeated request is not saved twice |
| quote_estimates | Cost estimates of quotes: expected and conservative cost, suggested price, margin, distances and the inputs and sources of the calculation |
| quote_estimator_settings | Cost estimator settings (one record): default consumptions, prices and costs per kilometre, hour and day |
| quote_mutation_receipts | Receipts of created or duplicated quotes, so that a repeated request does not create a duplicate |
| quote_number_sequences | Quote numbering state per year |
| quote_publications | Issued quotes: the PDF and commercial data, frozen at first issue; they cannot be changed |
| quote_stops | Stops of quotes in sequence |
| quotes | Quotes to customers: route, cargo, price, cost estimate and status |
| saved_location_aliases | Alternative spellings of saved location names (aliases) for search |
| saved_locations | Saved locations (frequent loading and unloading places) with address and coordinates |
| tenant_integrations | Integration settings (FleetCore), without the encrypted credential |
| users | App users, without passwords and two-factor secrets |
| vasco_export_settings | The company’s account numbers for exporting issued invoices to the Vasco bookkeeping program (receivables, revenue, VAT) |
| vehicle_brands | Vehicle brand list |
| vehicle_cost_profiles | Vehicle cost profiles for quote cost estimates |
| vehicle_costs | Actual vehicle costs from every source (Eurowag cards, DarsGo, CVS, accounting, manual entry): fuel, AdBlue, tolls, vignettes, parking, service |
| vehicle_damages | Vehicle damages and their repair |
| vehicle_documents | Vehicle documents (insurance, registration, ADR, technical inspection …) with expiry dates and scans |
| vehicle_types | Vehicle type list |
| vehicles | Vehicles: tractor units, trucks and trailers |
| work_order_attachments | Work order attachments (photos before and after the repair, documents) |
| work_order_notes | Notes on work orders (the conversation between office and mechanic) |
| work_orders | Workshop work orders for vehicle repairs and maintenance, including at an external service |
accounting_export_batches
Accounting export batches: each finalised export of issued invoices (e.g. for Vasco) with its totals. File in the archive: database/accounting_export_batches.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
batch_number | varchar(50) | no | Batch number |
status | enum: finalized, voided | no | Batch status: finalised or voided |
format_version | varchar(50) | no | Version of the export format |
invoice_count | integer | no | Number of invoices in the batch |
subtotal | numeric(12,2) | no | Total without VAT |
tax_amount | numeric(12,2) | no | Total VAT |
total_amount | numeric(12,2) | no | Total including VAT |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
finalized_at | timestamp(3) | no | When the batch was finalised |
finalized_by | varchar(255) | yes | User who finalised the batch (e-mail) |
voided_at | timestamp(3) | yes | When the batch was voided |
voided_by | varchar(255) | yes | User who voided the batch (e-mail) |
void_reason | text | yes | Reason for voiding |
created_at | timestamp(3) | no | When the record was created |
created_by | varchar(255) | yes | User who created the record (e-mail) |
accounting_export_items
Accounting export items: a snapshot of each invoice as it was exported in a batch. File in the archive: database/accounting_export_items.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
batch_id | integer; references accounting_export_batches.id | no | Export batch |
invoice_id | integer; references invoices.id | no | Exported invoice |
row_order | integer | no | Position of the invoice in the export |
invoice_number | varchar(50) | no | Invoice number |
invoice_kind | enum: invoice, credit_note, debit_note | no | Document type: invoice, credit note or debit note |
invoice_status | enum: draft, sent, paid, partially_paid, overdue, cancelled | no | Invoice status at export |
invoice_date | date | no | Invoice date |
service_date | date | no | Date of service |
due_date | date | yes | Due date |
customer_name | varchar(255) | no | Customer at export |
customer_tax_number | varchar(30) | yes | Customer’s tax number or VAT ID at export |
customer_legacy_id | integer | yes | Customer ID in the previous software |
order_numbers | text | yes | Order numbers on the invoice |
legacy_transport_number | text | yes | Transport numbers from the previous software |
origin_location | text | yes | Loading place |
pickup_date | date | yes | Loading date |
destination_location | text | yes | Unloading place |
delivery_date | date | yes | Delivery date |
sender_name | varchar(255) | yes | Sender |
recipient_name | varchar(255) | yes | Recipient |
subtotal | numeric(12,2) | no | Amount without VAT |
tax_amount | numeric(12,2) | no | VAT amount |
total_amount | numeric(12,2) | no | Amount including VAT |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
transfer_flag | integer | no | Flag for the transfer to the accounting software (1 = transfer) |
grouped_transfer_flag | integer | no | Flag for a grouped transfer (1 = yes) |
do_not_transfer_flag | integer | no | Flag that the invoice is not transferred (1 = do not transfer) |
snapshot_updated_at | timestamp(3) | no | When the invoice was last changed before the export |
hours_since_update | integer | no | Hours between the last change of the invoice and the export |
created_at | timestamp(3) | no | When the record was created |
audit_logs
Audit trail: who created, changed, deleted or exported which record and when. File in the archive: database/audit_logs.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
table_name | varchar(100) | no | Table of the changed record |
record_id | integer | no | ID of the changed record |
action | varchar(20) | no | Action, e.g. create, update, delete or export |
changes | jsonb | yes | Changed fields or parameters of the action (JSON) |
user_id | varchar(255) | yes | User who performed the action (ID or e-mail) |
created_at | timestamp(3) | no | When the record was created |
company_settings
Company settings (one record): company name, address, tax and bank details, logo, way of working, default truck for routing and two-factor rules. File in the archive: database/company_settings.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier (always 1) |
name | varchar(255) | no | Company name |
address | text | yes | Address (street and number) |
city | varchar(100) | yes | City |
postal_code | varchar(20) | yes | Postal code |
country | varchar(100) | yes | Country (text) |
country_code | varchar(2) | yes | Country code (ISO 3166-1 alpha-2) for e-invoices |
tax_number | varchar(30) | yes | Tax number or VAT ID |
registration_number | varchar(30) | yes | Company registration number |
phone | varchar(30) | yes | The company’s phone number, printed on invoices |
email | varchar(255) | yes | The company’s e-mail address, printed on invoices |
bank_name | varchar(100) | yes | Bank |
iban | varchar(50) | yes | IBAN |
swift | varchar(20) | yes | SWIFT/BIC code |
logo_url | text | yes | Path of the logo; in the archive the file is under files/public/ |
brand_color | varchar(7) | yes | Company colour as a hex value, e.g. #2563eb |
workflow_mode | enum: advanced, simple | no | How the app is used: advanced or simple |
default_truck_gross_weight_kg | integer | yes | Default gross weight of the truck for routing (kg) |
default_truck_axle_count | integer | yes | Default number of axles for routing |
default_truck_trailer_count | integer | yes | Default number of trailers for routing |
default_truck_height_m | numeric(5,2) | yes | Default truck height in metres |
default_truck_width_m | numeric(5,2) | yes | Default truck width in metres |
default_truck_length_m | numeric(5,2) | yes | Default truck length in metres |
default_truck_euro_standard | varchar(10) | yes | Default EURO emission class |
default_truck_co2_class | integer | yes | Default CO2 emission class |
default_truck_unit_type | varchar(20) | yes | Default truck type for routing: tractor, rigid truck or van |
two_factor_required_roles | enum[]: admin, dispatcher, accountant, driver, mechanic | empty list | Roles that must use two-factor authentication |
updated_at | timestamp(3) | no | When the record was last changed |
cost_card_mappings
Fuel cards and toll boxes linked to a vehicle, for costs that carry no plate. File in the archive: database/cost_card_mappings.ndjson. Without the columns holding security secrets: identifier_hash.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
kind | enum: card, toll_device | no | Kind: fuel card (card) or toll box (toll_device) |
identifier_last4 | varchar(4) | no | Last four characters of the card or toll-box number |
vehicle_id | integer; references vehicles.id | no | Vehicle |
label | varchar(100) | yes | Label |
created_by_id | integer | yes | User who created the link |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
cost_import_batches
Imports of cost files (Eurowag, DarsGo): file name and hash, period and row counts; the files themselves are not kept. File in the archive: database/cost_import_batches.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
source | enum: eurowag_file, darsgo, cvs, accounting, manual | no | Source: eurowag_file or darsgo |
format | varchar(40) | no | Recognised file format |
file_name | varchar(255) | no | Name of the imported file |
file_sha256 | varchar(64) | no | SHA-256 hash of the file |
plan_fingerprint | varchar(64) | no | Fingerprint of the reviewed preview that was imported |
row_count | integer | no | Number of rows in the file |
created_count | integer | no | Number of new cost rows |
upgraded_count | integer | no | Number of rows the import updated (pro-forma to invoice) |
duplicate_count | integer | no | Number of rows that were already imported |
skipped_count | integer | no | Number of skipped or invalid rows |
unassigned_count | integer | no | Number of rows without a vehicle |
period_from | date | yes | First cost date in the file |
period_to | date | yes | Last cost date in the file |
created_by_id | integer | yes | User who imported the file |
created_at | timestamp(3) | no | When the record was created |
countries
Country list. File in the archive: database/countries.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_id | integer | yes | Record ID in the previous software (from the data migration) |
code | varchar(3) | no | Country code (ISO 3166-1) |
name | varchar(100) | no | Country name |
tax_region | varchar(50) | yes | VAT region, e.g. EU |
created_at | timestamp(3) | no | When the record was created |
driver_documents
Driver documents (e.g. driving licence, driver card, medical certificate) with expiry dates and scans. File in the archive: database/driver_documents.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
driver_id | integer; references drivers.id | no | Driver |
name | varchar(120) | no | Document name, e.g. driving licence |
document_number | varchar(100) | yes | Document number |
issuer | varchar(120) | yes | Issuer of the document |
issue_date | date | yes | Date of issue |
expiry_date | date | yes | Document valid until |
notes | text | yes | Notes |
scan_original_filename | varchar(255) | yes | File name of the scan at upload |
scan_storage_key | varchar(500) | yes | Key of the stored scan; in the archive it is under files/private/ as for storage_key |
scan_mime_type | varchar(100) | yes | Content type of the scan (MIME) |
scan_size_bytes | integer | yes | Scan size in bytes |
scan_uploaded_at | timestamp(3) | yes | When the scan was uploaded |
scan_uploaded_by | varchar(255) | yes | User who uploaded the scan (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
driver_salary_configs
Driver pay settings: pay basis and amounts, valid from a given date. File in the archive: database/driver_salary_configs.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
driver_id | integer; references drivers.id | no | Driver |
pay_basis | enum: percentage, daily_rate, fixed | no | Pay basis: percentage, daily amount or fixed amount |
salary_percentage | numeric(5,2) | yes | Percentage of the pay base on orders |
daily_rate_amount | numeric(12,2) | yes | Amount per day |
fixed_amount | numeric(12,2) | yes | Fixed amount |
effective_from | date | no | The setting applies from this date |
notes | text | yes | Notes |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
drivers
Drivers. File in the archive: database/drivers.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_id | integer | yes | Record ID in the previous software (from the data migration) |
user_id | integer | yes | The driver’s user account, if any |
partner_id | integer; references partners.id | yes | Partner linked to the driver |
default_vehicle_id | integer; references vehicles.id | yes | The driver’s default vehicle |
first_name | varchar(100) | no | First name |
last_name | varchar(100) | no | Last name |
license_number | varchar(50) | yes | Driving licence number |
license_expiry | date | yes | Driving licence valid until |
phone | varchar(30) | yes | Phone |
employment_date | date | yes | Date of employment |
employment_type | enum: indefinite, fixed_term | no | Employment type: permanent or fixed-term |
contract_end_date | date | yes | End of a fixed-term employment contract |
personal_tax_number | varchar(30) | yes | The driver’s tax number |
health_cert_expiry | date | yes | Medical certificate valid until |
is_active | boolean | no | The record is active; inactive records are not offered for new entries |
anonymized_at | timestamp(3) | yes | When the driver was anonymised (personal data erased); empty if not |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
einvoice_documents
Issued e-invoices (eSLOG 2.0 or UBL 2.1), stored exactly as issued. File in the archive: database/einvoice_documents.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
invoice_id | integer; references invoices.id | no | Invoice |
syntax | enum: eslog, ubl | no | E-invoice syntax: eslog (eSLOG 2.0) or ubl (UBL 2.1, Peppol BIS Billing 3.0) |
format_version | varchar(80) | no | Version of the e-invoice format |
document_type_code | varchar(3) | no | Document type code (UNTDID 1001), e.g. 380 invoice, 381 credit note |
invoice_number | varchar(50) | no | Invoice number |
xml_bytes | bytea | no | The issued XML file as sent (bytes as hex) |
sha256 | char(64) | no | SHA-256 of the XML file |
size_bytes | integer | no | Size of the XML file in bytes |
invoice_updated_at | timestamp(3) | no | Version of the invoice (time of its last change) the e-invoice was built from |
created_at | timestamp(3) | no | When the record was created |
created_by | varchar(255) | yes | User who created the record (e-mail) |
external_batches
External batches: groups of orders that a partner lists under one number of its own (e.g. a collective delivery note). File in the archive: database/external_batches.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
partner_id | integer; references partners.id | no | Partner that sent the batch |
settlement_id | integer; references external_settlements.id | yes | Settlement the batch belongs to |
reference_number | varchar(100) | no | The partner’s batch number |
reference_date | date | yes | Batch date |
notes | text | yes | Notes |
created_at | timestamp(3) | no | When the record was created |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_at | timestamp(3) | no | When the record was last changed |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
external_rate_snapshots
Stored external figures used in cost estimates: fuel prices and exchange rates with their source and time of validity. File in the archive: database/external_rate_snapshots.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
kind | enum: fuel, fx | no | Kind: fuel price (fuel) or exchange rate (fx) |
provider | varchar(80) | no | Source, e.g. the European Central Bank or goriva.si |
geography_code | varchar(10) | no | Country or area the value applies to |
product_code | varchar(50) | no | Product, e.g. type of fuel |
value | numeric(18,8) | no | Value |
unit | varchar(30) | no | Unit of the value |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
tax_basis | enum: gross, net, unknown | no | Whether the value includes taxes: gross, net or unknown |
effective_at | timestamp(3) | no | Time the value applies to |
fetched_at | timestamp(3) | no | When the data was fetched from the source |
stale_after | timestamp(3) | no | After this time the value is no longer used |
source_url | text | no | URL of the source |
source_version | varchar(120) | yes | Version of the data at the source |
source_checksum | varchar(128) | yes | Checksum of the source data |
attribution | text | yes | Attribution of the source |
metadata | jsonb | yes | Additional source data (JSON) |
created_at | timestamp(3) | no | When the record was created |
external_settlements
Partner settlements (e.g. a statement or self-billing credit note the partner sends) that group external batches and that an invoice can refer to. File in the archive: database/external_settlements.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
partner_id | integer; references partners.id | no | Partner that sent the settlement |
settlement_number | varchar(100) | no | The partner’s settlement number |
settlement_date | date | yes | Settlement date |
declared_total_amount | numeric(12,2) | yes | Total on the partner’s document; compared with the sum of the orders when the invoice is issued |
notes | text | yes | Notes |
created_at | timestamp(3) | no | When the record was created |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_at | timestamp(3) | no | When the record was last changed |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
fleetcore_driver_mappings
Links between Prevoxio drivers and drivers in the CVS (FleetCore) telematics: only the driver key in CVS and how the link was made, no names or tachograph card numbers. File in the archive: database/fleetcore_driver_mappings.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
integration_id | integer; references tenant_integrations.id | no | FleetCore integration |
driver_id | integer; references drivers.id | no | Driver in Prevoxio |
fleetcore_driver_ext_key | varchar(200) | no | Driver key in CVS (DriverExtKey) |
match_method | enum: card, name, trip, manual | no | How the link was made: card (tachograph card), name, trip (driver seen on trips), manual |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
fleetcore_vehicle_daily_metrics
Daily vehicle figures from FleetCore telematics: distance, fuel, idling and costs. File in the archive: database/fleetcore_vehicle_daily_metrics.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
mapping_id | integer; references fleetcore_vehicle_mappings.id | no | Link of the vehicle to FleetCore |
metric_date | date | no | Day the figures refer to |
distance_km | numeric(10,2) | yes | Distance in km |
distance_source | varchar(8) | yes | Source of the distance: fms (CAN odometer), map (map-matched) or gps |
fuel_liters | numeric(10,3) | yes | Fuel used in litres |
consumption_l_100_km | numeric(8,3) | yes | Fuel consumption in l/100 km |
driving_seconds | integer | yes | Driving time in seconds |
driving_seconds_source | varchar(16) | yes | Source of the driving time: tachograph (tachograph activities) or fleet_usage (vehicle usage report) |
idle_seconds | integer | yes | Idling time in seconds |
idle_fuel_liters | numeric(10,3) | yes | Fuel used while idling in litres |
fuel_cost | numeric(12,2) | yes | Fuel cost |
fuel_purchased_liters | numeric(10,3) | yes | Fuel bought in litres |
toll_parking_cost | numeric(12,2) | yes | Toll and parking costs |
service_cost | numeric(12,2) | yes | Service costs |
adblue_cost | numeric(12,2) | yes | AdBlue costs in euros |
other_cost | numeric(12,2) | yes | Other CVS costs (damage, penalties, shipping, other) in euros |
unconverted_cost_count | integer | no | Number of foreign-currency costs without an exchange rate for the day, left out of the euro sums |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
source | enum: consumption, fleet_usage, fueling, cost, idling, combined | no | FleetCore report the record comes from |
sample_count | integer | no | Number of samples in the calculation |
quality_score | numeric(5,4) | yes | Data quality score from 0 to 1 |
source_time_zone | varchar(80) | no | Time zone of the source data (IANA), e.g. Europe/Ljubljana |
raw_source_updated_at | timestamp(3) | yes | When the data last changed at the source |
telemetry_fetched_at | timestamp(3) | yes | When the telemetry was fetched |
cost_fetched_at | timestamp(3) | yes | When the costs were fetched |
idling_fetched_at | timestamp(3) | yes | When the idling data was fetched |
idling_paired_sample_count | integer | no | Number of paired idling samples |
idling_quality_score | numeric(5,4) | yes | Quality score of the idling data from 0 to 1 |
fetched_at | timestamp(3) | no | When the data was fetched from the source |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
fleetcore_vehicle_mappings
Links between Prevoxio vehicles and FleetCore telematics vehicles, with the last known position. File in the archive: database/fleetcore_vehicle_mappings.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
integration_id | integer; references tenant_integrations.id | no | FleetCore integration |
vehicle_id | integer; references vehicles.id | no | Vehicle in Prevoxio |
fleetcore_ext_key | varchar(200) | no | Vehicle key in FleetCore |
fleetcore_display_name | varchar(160) | yes | Vehicle name in FleetCore |
source_time_zone | varchar(80) | no | Time zone of the source data (IANA), e.g. Europe/Ljubljana |
is_active | boolean | no | The link is active |
last_seen_at | timestamp(3) | yes | When the vehicle was last seen in FleetCore |
last_position_at | timestamp(3) | yes | Time of the last known position |
last_lat | numeric(9,6) | yes | Last known position: latitude |
last_lng | numeric(9,6) | yes | Last known position: longitude |
last_location_name | varchar(255) | yes | Place of the last known position |
fleetcore_plate_number | varchar(32) | yes | Vehicle plate in CVS; positions are matched on it |
last_odometer_km | numeric(12,1) | yes | Odometer at the last known position (km) |
last_odometer_source | varchar(4) | yes | Source of the odometer: fms (CAN) or gps (GPS-derived or calibrated) |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
fleetcore_vehicle_trips
Vehicle trips from FleetCore telematics (distance, duration, fuel, start and end), the basis for automatic quote estimates; no driver data. File in the archive: database/fleetcore_vehicle_trips.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
mapping_id | integer; references fleetcore_vehicle_mappings.id | no | Link of the vehicle to FleetCore |
started_at | timestamp(3) | no | Start of the trip |
ended_at | timestamp(3) | yes | End of the trip |
trip_date | date | no | Trip date in the source time zone |
duration_seconds | integer | yes | Duration in seconds |
distance_km | numeric(10,2) | no | Distance in km |
distance_source | varchar(8) | yes | Source of the distance: fms (CAN odometer), map (map-matched) or gps |
fms_distance_km | numeric(10,2) | yes | Distance from the CAN odometer (km) |
map_distance_km | numeric(10,2) | yes | Map-matched distance (km) |
gps_distance_km | numeric(10,2) | yes | Distance from GPS fixes (km) |
start_odometer_km | numeric(12,1) | yes | CAN odometer at the start of the trip (km) |
end_odometer_km | numeric(12,1) | yes | CAN odometer at the end of the trip (km) |
fuel_liters | numeric(10,3) | yes | Fuel used in litres |
consumption_l_100_km | numeric(8,3) | yes | Fuel consumption in l/100 km |
start_name | varchar(255) | yes | Start location |
start_lat | numeric(9,6) | yes | Start location: latitude |
start_lng | numeric(9,6) | yes | Start location: longitude |
start_country_code | varchar(2) | yes | Country of the start location (ISO 3166-1 alpha-2) |
start_postcode | varchar(16) | yes | Postcode of the start location |
end_name | varchar(255) | yes | End location |
end_lat | numeric(9,6) | yes | End location: latitude |
end_lng | numeric(9,6) | yes | End location: longitude |
end_country_code | varchar(2) | yes | Country of the end location (ISO 3166-1 alpha-2) |
end_postcode | varchar(16) | yes | Postcode of the end location |
time_adjusted | boolean | no | The start or end fell in a daylight-saving change and was resolved |
source_time_zone | varchar(80) | no | Time zone of the source data (IANA), e.g. Europe/Ljubljana |
fetched_at | timestamp(3) | no | When the data was fetched from the source |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
invoice_documents
Files attached to invoices (e.g. signed CMRs). File in the archive: database/invoice_documents.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
invoice_id | integer; references invoices.id | no | Invoice |
kind | enum: cmr, other | no | Kind of file: cmr or other |
original_filename | varchar(255) | no | File name at upload |
storage_key | varchar(500) | no | Key of the stored file; in the archive the file is under files/private/ at this key without its leading tenants/<company>/ part |
mime_type | varchar(100) | no | Content type of the file (MIME), e.g. application/pdf |
size_bytes | integer | no | File size in bytes |
uploaded_at | timestamp(3) | no | When the file was uploaded |
uploaded_by | varchar(255) | yes | User who uploaded the file (e-mail) |
invoice_lines
Invoice lines. File in the archive: database/invoice_lines.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_id | integer | yes | Record ID in the previous software (from the data migration) |
invoice_id | integer; references invoices.id | no | Invoice |
order_id | integer; references orders.id | yes | Order linked to the line; empty for manually added lines |
description | text | no | Line text |
quantity | numeric(10,2) | no | Quantity |
unit_price | numeric(12,2) | no | Unit price without VAT |
line_total | numeric(12,2) | no | Line amount without VAT |
account_code | varchar(20) | yes | Account code |
unit_code | varchar(3) | no | Unit code under UN/ECE Rec. 20 for e-invoices (C62 = one) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
invoice_number_sequences
Numbering state of invoices, credit notes and debit notes per year: the highest sequence number already handed out, which never goes down. File in the archive: database/invoice_number_sequences.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
year | integer; primary key | no | Numbering year |
last_sequence | integer | no | Highest sequence number handed out in that year, including numbers of deleted drafts; new numbers continue above it |
updated_at | timestamp(3) | no | When the record was last changed |
invoice_number_starts
First number of invoices, credit notes or debit notes in a year, continuing the numbering of the previous software. File in the archive: database/invoice_number_starts.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
year | integer | no | Year |
kind | enum: invoice, credit_note, debit_note | no | Document type: invoice, credit note or debit note |
start_sequence | integer | no | First sequence number in that year |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
invoice_orders
Links between invoices and orders: which orders an invoice bills. File in the archive: database/invoice_orders.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
invoice_id | integer; primary key; references invoices.id | no | Invoice |
order_id | integer; primary key; references orders.id | no | Order; each order is billed by at most one invoice |
invoices
Invoices, credit notes and debit notes. File in the archive: database/invoices.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_id | integer | yes | Record ID in the previous software (from the data migration) |
invoice_number | varchar(50) | no | Invoice number |
kind | enum: invoice, credit_note, debit_note | no | Type: invoice, credit note or debit note |
invoice_year | integer | no | Numbering year |
invoice_date | date | no | Invoice date |
service_date | date | no | Date of service |
due_date_basis | enum: invoice_date, service_date | no | Which date the payment term runs from: invoice date or date of service |
due_date | date | no | Due date |
customer_id | integer; references partners.id | no | Customer |
driver_id | integer; references drivers.id | yes | Driver named on the invoice |
subcarrier_id | integer; references partners.id | yes | Subcarrier |
original_invoice_id | integer; references invoices.id | yes | Original invoice a credit or debit note refers to |
tax_mode | enum: auto, manual | no | VAT mode: automatic (auto) or manual |
subtotal | numeric(12,2) | no | Amount without VAT |
tax_rate | numeric(5,2) | no | VAT rate in per cent |
tax_note | text | yes | Text on VAT exemption or reverse charge |
tax_amount | numeric(12,2) | no | VAT amount |
total_amount | numeric(12,2) | no | Total including VAT |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
status | enum: draft, sent, paid, partially_paid, overdue, cancelled | no | Invoice status |
amount_paid | numeric(12,2) | no | Amount paid |
payment_date | date | yes | Payment date |
payment_method | varchar(50) | yes | Payment method |
subcarrier_price | numeric(12,2) | yes | Subcarrier price |
subcarrier_paid | boolean | no | The subcarrier has been paid |
subcarrier_paid_date | date | yes | Date the subcarrier was paid |
subcarrier_invoice_received | boolean | no | The subcarrier’s invoice has been received |
subcarrier_invoice_received_date | date | yes | Date the subcarrier’s invoice was received |
subcarrier_invoice_number | varchar(100) | yes | Subcarrier’s invoice number |
subcarrier_notes | text | yes | Notes on the subcarrier |
accounting_export_batch_id | integer; references accounting_export_batches.id | yes | Latest accounting export batch that contains the invoice |
external_settlement_id | integer; references external_settlements.id | yes | Partner settlement the invoice refers to |
attachment_template | enum: internal_liters, liters_transport, task_price | yes | Attachment template printed with the invoice |
attachment_data | jsonb | yes | Data of the invoice attachment (JSON) |
released_order_ids | jsonb | yes | Orders released when the invoice was cancelled, kept for a restore (JSON) |
notes | text | yes | Notes |
buyer_reference | varchar(70) | yes | Buyer reference for the e-invoice (BT-10) |
exported_to_accounting | boolean | no | The invoice has been exported to accounting |
exported_at | timestamp(3) | yes | When the invoice was exported to accounting |
created_at | timestamp(3) | no | When the record was created |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_at | timestamp(3) | no | When the record was last changed |
order_documents
Files attached to orders (e.g. the customer’s order). File in the archive: database/order_documents.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
order_id | integer; references orders.id | no | Order |
kind | enum: customer_order, other | no | Kind of file: the customer’s order (customer_order) or other |
original_filename | varchar(255) | no | File name at upload |
storage_key | varchar(500) | no | Key of the stored file; in the archive the file is under files/private/ at this key without its leading tenants/<company>/ part |
mime_type | varchar(100) | no | Content type of the file (MIME), e.g. application/pdf |
size_bytes | integer | no | File size in bytes |
uploaded_at | timestamp(3) | no | When the file was uploaded |
uploaded_by | varchar(255) | yes | User who uploaded the file (e-mail) |
order_number_sequences
Order numbering state per year. File in the archive: database/order_number_sequences.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
year | integer; primary key | no | Numbering year |
next_value | integer | no | Next free sequence number |
updated_at | timestamp(3) | no | When the record was last changed |
order_route_plans
Route plans frozen when an order was confirmed: planned km (empty, loaded, per country), driving time, tolls with VAT, planned cost and the inputs used. File in the archive: database/order_route_plans.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
order_id | integer; primary key; references orders.id | no | Order the plan belongs to |
version | integer | no | Version of the plan record |
frozen_at | timestamp(3) | no | When the plan was frozen (order confirmation) |
frozen_by | varchar(255) | yes | User who confirmed the order (e-mail) |
frozen_status | varchar(20) | no | Order status that froze the plan |
provider | varchar(50) | yes | Routing provider |
request_hash | char(64) | yes | SHA-256 of the routing request |
route_computed_at | timestamp(3) | yes | When the planned route was calculated |
distance_km | numeric(10,2) | yes | Planned route length in km |
loaded_distance_km | numeric(10,2) | yes | Planned km with cargo on board |
empty_distance_km | numeric(10,2) | yes | Planned empty km |
duration_seconds | integer | yes | Planned driving time in seconds |
toll_gross_eur | numeric(12,2) | yes | Planned tolls in EUR including VAT |
toll_net_eur | numeric(12,2) | yes | Planned tolls in EUR net of VAT; empty when the VAT is not known |
planned_cost_eur | numeric(12,2) | yes | Planned transport cost in EUR; empty when incomplete |
price_amount | numeric(12,2) | yes | Order price at confirmation |
price_currency | varchar(3) | yes | Price currency |
plan | jsonb | no | Plan details (JSON): km per leg and country, tolls per system with VAT, cost, margin and the inputs used |
created_at | timestamp(3) | no | When the record was created |
order_stops
Additional stops of orders (loading or unloading places) in sequence. File in the archive: database/order_stops.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
order_id | integer; references orders.id | no | Order |
sequence | integer | no | Position in the list |
address | text | yes | Address (street and number) |
city | varchar(100) | yes | City |
country_id | integer; references countries.id | yes | Country |
lat | numeric(10,8) | yes | Latitude (WGS 84) |
lng | numeric(11,8) | yes | Longitude (WGS 84) |
label | varchar(100) | yes | Label of the stop, e.g. loading |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
order_templates
Order templates: saved form contents for quickly entering similar orders. File in the archive: database/order_templates.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
name | varchar(100) | no | Template name |
payload | jsonb | no | Contents of the order form (JSON), without the order number |
created_by | varchar(255) | yes | User who created the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
orders
Transport orders: customer, route, cargo, vehicle, driver, price, subcarrier, CMR details and status. File in the archive: database/orders.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_narocilo_id | integer | yes | Order ID in the previous software (several orders can share it) |
legacy_promet_id | integer | yes | Transport ID in the previous software |
legacy_order_number | varchar(50) | yes | Order number in the previous software |
order_number | varchar(50) | no | Order number |
order_year | integer | no | Numbering year |
order_date | date | no | Order date |
customer_id | integer; references partners.id | no | Customer who ordered the transport |
carrier_id | integer; references partners.id | yes | Subcarrier that carries out the transport instead of the company |
sender_id | integer; references partners.id | yes | Sender |
recipient_id | integer; references partners.id | yes | Recipient |
vehicle_id | integer; references vehicles.id | yes | Tractor unit or truck |
trailer_id | integer; references vehicles.id | yes | Trailer |
driver_id | integer; references drivers.id | yes | Driver |
external_vehicle_plate | varchar(50) | yes | Registration of the subcarrier’s vehicle |
external_trailer_plate | varchar(50) | yes | Registration of the subcarrier’s trailer |
origin_address | text | yes | Loading address |
origin_city | varchar(100) | yes | Loading city |
origin_country_id | integer; references countries.id | yes | Loading country |
destination_address | text | yes | Unloading address |
destination_city | varchar(100) | yes | Unloading city |
destination_country_id | integer; references countries.id | yes | Unloading country |
empty_pickup_address | text | yes | Address where the empty container is picked up |
empty_pickup_city | varchar(100) | yes | City where the empty container is picked up |
empty_pickup_country_id | integer; references countries.id | yes | Country where the empty container is picked up |
empty_return_address | text | yes | Address where the empty container is returned |
empty_return_city | varchar(100) | yes | City where the empty container is returned |
empty_return_country_id | integer; references countries.id | yes | Country where the empty container is returned |
origin_lat | numeric(10,8) | yes | Loading latitude |
origin_lng | numeric(11,8) | yes | Loading longitude |
destination_lat | numeric(10,8) | yes | Unloading latitude |
destination_lng | numeric(11,8) | yes | Unloading longitude |
empty_pickup_lat | numeric(10,8) | yes | Latitude of the empty container pick-up |
empty_pickup_lng | numeric(11,8) | yes | Longitude of the empty container pick-up |
empty_return_lat | numeric(10,8) | yes | Latitude of the empty container return |
empty_return_lng | numeric(11,8) | yes | Longitude of the empty container return |
is_round_trip | boolean | no | Round trip back to the start |
route_distance_km | numeric(10,2) | yes | Billed route length in km |
route_duration_seconds | integer | yes | Driving time from the route calculation in seconds |
route_toll_total_eur | numeric(12,2) | yes | Total tolls in EUR including VAT, from the route calculation |
route_tolls | jsonb | yes | Tolls by country and operator (JSON) |
route_provider | varchar(50) | yes | Routing provider |
route_profile | jsonb | yes | Truck data used for the route calculation (JSON) |
route_warnings | jsonb | yes | Warnings of the route calculation (JSON) |
route_computed_at | timestamp(3) | yes | When the route was calculated |
route_request_hash | char(64) | yes | SHA-256 of the routing request |
route_breakdown | jsonb | yes | Km per leg (empty, loaded) and country, departure time and why HERE was not used (JSON) |
route_geometry | jsonb | yes | Route line from older calculations (JSON); HERE route lines are not in the export |
hazardous_goods | text[] | yes, also an empty list | Kinds of dangerous goods (ADR) considered in the route calculation |
tunnel_category | varchar(1) | yes | ADR tunnel category (B, C, D or E) |
adr_un_number | varchar(4) | yes | UN number of the dangerous goods (four digits) |
refrigerated | boolean | no | Cooled transport |
refrigeration_temperature | varchar(50) | yes | Asked temperature of the cooled transport, as entered |
pickup_date | timestamp(3) | yes | Loading time |
delivery_date | timestamp(3) | yes | Delivery time |
goods_description | text | yes | Description of the goods |
cargo_category | enum: silo, cistern, container, curtain | no | Cargo category |
weight_kg | numeric(10,2) | yes | Cargo weight in kg |
volume_m3 | numeric(10,3) | yes | Cargo volume in m³ |
quantity | integer | yes | Quantity (number of units) |
pricing_type | enum: manual, silo, cistern | no | Price list type: manual price, silo or cistern |
pricing_location_id | integer; references pricing_locations.id | yes | Pricing location the price is based on |
pricing_rate_id | integer; references pricing_rates.id | yes | Pricing rate the price is based on |
source_quote_id | integer; references quotes.id | yes | Quote the order was created from |
external_batch_id | integer; references external_batches.id | yes | External batch the order belongs to |
price_amount | numeric(12,2) | yes | Transport price for the customer without VAT |
price_currency | varchar(3) | no | Currency of the price |
demurrage_amount | numeric(12,2) | yes | Demurrage (waiting charge) the customer pays on top of the transport price; its own invoice line |
demurrage_note | varchar(200) | yes | Demurrage note printed on the invoice line |
salary_base_amount | numeric(12,2) | yes | Base for the driver’s pay |
salary_notes | text | yes | Notes on the driver’s pay |
cost_amount | numeric(12,2) | yes | Transport cost |
status | enum: draft, confirmed, dispatched, in_transit, delivered, invoiced, cancelled | no | Order status |
is_archived | boolean | no | The order is archived |
archived_at | timestamp(3) | yes | When the order was archived |
cmr_number | varchar(50) | yes | CMR consignment note number |
cargo_marks | varchar(200) | yes | Marks and numbers of the goods (CMR) |
packages_count | integer | yes | Number of packages (CMR) |
packaging_method | varchar(100) | yes | Method of packing (CMR) |
sender_instructions | text | yes | Sender’s instructions (CMR) |
attached_documents | varchar(200) | yes | Documents attached (CMR) |
reference_number | varchar(100) | yes | Customer’s reference |
subcarrier_price | numeric(12,2) | yes | Subcarrier price |
subcarrier_paid | boolean | no | The subcarrier has been paid |
subcarrier_paid_date | date | yes | Date the subcarrier was paid |
subcarrier_invoice_received | boolean | no | The subcarrier’s invoice has been received |
subcarrier_invoice_received_date | date | yes | Date the subcarrier’s invoice was received |
subcarrier_invoice_number | varchar(100) | yes | Subcarrier’s invoice number |
subcarrier_notes | text | yes | Notes on the subcarrier |
notes | text | yes | Notes |
created_at | timestamp(3) | no | When the record was created |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_at | timestamp(3) | no | When the record was last changed |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
partner_bank_accounts
Partners’ bank accounts. File in the archive: database/partner_bank_accounts.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_id | integer | yes | Record ID in the previous software (from the data migration) |
partner_id | integer; references partners.id | no | Partner |
bank_name | varchar(100) | no | Bank name |
account_number | varchar(50) | no | Account number |
iban | varchar(50) | yes | IBAN |
swift | varchar(20) | yes | SWIFT/BIC code |
is_primary | boolean | no | The partner’s main account |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
partner_contacts
Partners’ contact persons. File in the archive: database/partner_contacts.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_id | integer | yes | Record ID in the previous software (from the data migration) |
partner_id | integer; references partners.id | no | Partner |
name | varchar(255) | no | Full name |
position | varchar(100) | yes | Position |
phone | varchar(30) | yes | Phone |
mobile | varchar(30) | yes | Mobile phone |
email | varchar(255) | yes | |
is_primary | boolean | no | The partner’s main contact |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
partners
Partners: customers, carriers (subcarriers), suppliers and employees. File in the archive: database/partners.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_id | integer | yes | Record ID in the previous software (from the data migration) |
name | varchar(255) | no | Partner’s name or company name |
tax_number | varchar(30) | yes | Tax number or VAT ID |
type | enum: customer, carrier, supplier, employee | no | Main partner type (for display) |
is_customer | boolean | no | The partner is a customer |
is_carrier | boolean | no | The partner is a carrier (subcarrier) |
is_supplier | boolean | no | The partner is a supplier |
address | text | yes | Address (street and number) |
postal_code | varchar(20) | yes | Postal code |
city | varchar(100) | yes | City |
country_id | integer; references countries.id | yes | Country of the registered office |
default_origin_address | text | yes | Default loading address for this partner’s orders |
default_origin_city | varchar(100) | yes | Default loading city |
default_origin_country_id | integer; references countries.id | yes | Default loading country |
default_origin_lat | numeric(10,8) | yes | Default loading place: latitude |
default_origin_lng | numeric(11,8) | yes | Default loading place: longitude |
phone | varchar(30) | yes | Phone |
email | varchar(255) | yes | |
payment_terms_id | integer; references payment_terms.id | yes | The partner’s payment terms |
is_active | boolean | no | The record is active; inactive records are not offered for new entries |
batch_label_singular | varchar(100) | no | The partner’s name for an external batch, singular, e.g. delivery note |
batch_label_plural | varchar(100) | no | The partner’s name for external batches, plural |
settlement_label_singular | varchar(100) | no | The partner’s name for a settlement, singular, e.g. Gutschrift |
settlement_label_plural | varchar(100) | no | The partner’s name for settlements, plural |
grouped_invoice_attachment_mode | enum: none, internal_liters | no | Older attachment setting of grouped invoices: internal_liters means an attachment with litres |
grouped_invoice_attachment_threshold | integer | no | Older threshold of orders for summarising a grouped invoice |
grouped_invoice_workflow | enum: batch_only, settlement_required | no | Whether a grouped invoice needs a partner settlement (settlement_required) or a batch is enough (batch_only) |
grouped_invoice_attachment_template | enum: none, liters_transport, task_price | no | Attachment template of grouped invoices |
grouped_invoice_summary_mode | enum: threshold, always_summary | no | When the orders on a grouped invoice are summarised in one line: above the threshold or always (always_summary) |
grouped_invoice_summary_threshold | integer | no | Number of orders above which the lines of a grouped invoice are summarised |
geo_lat | numeric(10,8) | yes | Partner’s address: latitude |
geo_lng | numeric(11,8) | yes | Partner’s address: longitude |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
created_by | varchar(255) | yes | User who created the record (e-mail) |
payment_terms
Payment terms (days until due). File in the archive: database/payment_terms.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
code | varchar(20) | no | Payment term code |
name | varchar(100) | no | Name |
days | integer | no | Days until the invoice is due |
created_at | timestamp(3) | no | When the record was created |
pricing_locations
Pricing locations: places that pricing rates apply to. File in the archive: database/pricing_locations.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
name | varchar(150) | no | Name of the pricing location |
normalized_name | varchar(150) | no | Name in a normalised form for search and matching |
city | varchar(100) | yes | City |
partner_id | integer; references partners.id | yes | Partner the location applies to |
saved_location_id | integer; references saved_locations.id | yes | Saved location |
notes | text | yes | Notes |
is_active | boolean | no | The record is active; inactive records are not offered for new entries |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
pricing_rates
Pricing rates (price list): price per billing unit for a pricing location and validity period. File in the archive: database/pricing_rates.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
pricing_type | enum: manual, silo, cistern | no | Price list type |
pricing_unit | enum: per_ton, per_100_l, per_volume_step, per_trip | no | Billing unit: per tonne, per 100 l, per volume step or per trip |
pricing_location_id | integer; references pricing_locations.id | no | Pricing location |
amount | numeric(12,3) | no | Price per billing unit |
volume_step_liters | integer | yes | Volume step in litres when billed per step |
minimum_charge | numeric(12,3) | yes | Minimum charge |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
effective_from | date | no | Valid from |
effective_to | date | yes | Valid until; empty if open-ended |
notes | text | yes | Notes |
is_active | boolean | no | The record is active; inactive records are not offered for new entries |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
quote_estimate_components
Items of a quote cost estimate (fuel, driver, tolls …) with quantity, price and data source. File in the archive: database/quote_estimate_components.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
estimate_id | integer; references quote_estimates.id | no | Cost estimate |
sequence | integer | no | Position in the list |
kind | enum: fuel, driver_driving, driver_service, driver_waiting, driver_daily_allowance, driver_overnight_allowance, fixed_vehicle_per_km, fixed_vehicle_per_day, maintenance, tyres, adblue, overhead, toll, ferry, tunnel, parking, loading, unloading, customs, border, other | no | Cost type |
label | varchar(120) | no | Item label |
quantity | numeric(14,4) | yes | Quantity |
unit | varchar(30) | yes | Unit of the quantity, e.g. km, l or h |
unit_cost | numeric(14,6) | yes | Cost per unit |
amount | numeric(12,2) | yes | Item amount |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
source_kind | varchar(50) | no | Kind of price source, e.g. setting, FleetCore or public source |
source_label | varchar(160) | no | Description of the price source |
effective_at | timestamp(3) | yes | Time the source price applies to |
observed_from | timestamp(3) | yes | Start of the observed period |
observed_to | timestamp(3) | yes | End of the observed period |
fetched_at | timestamp(3) | yes | When the data was fetched from the source |
confidence | enum: high, medium, low | no | Confidence of the item |
provenance | jsonb | yes | Details of where the figure came from (JSON) |
created_at | timestamp(3) | no | When the record was created |
quote_estimate_mutation_receipts
Receipts of saved cost estimates, so that a repeated request is not saved twice. File in the archive: database/quote_estimate_mutation_receipts.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
idempotency_key | uuid; primary key | no | One-time request key (UUID) that prevents saving twice |
actor_id | varchar(255) | no | User who sent the request |
request_hash | char(64) | no | SHA-256 of the request, used to recognise a repeated request |
result_estimate_id | integer; references quote_estimates.id | no | Saved cost estimate |
response_payload | jsonb | no | Response at saving (JSON), also returned when the request is repeated |
created_at | timestamp(3) | no | When the record was created |
quote_estimates
Cost estimates of quotes: expected and conservative cost, suggested price, margin, distances and the inputs and sources of the calculation. File in the archive: database/quote_estimates.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
quote_id | integer; references quotes.id | no | Quote |
revision | integer | no | Revision number of the estimate for the quote |
engine_version | varchar(30) | no | Version of the estimating method |
mode | enum: standard, fleetcore_calibrated | no | Estimate mode: standard or calibrated with FleetCore data |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
expected_cost | numeric(12,2) | no | Expected cost |
conservative_cost | numeric(12,2) | no | Conservative (higher) cost estimate |
suggested_sell_price | numeric(12,2) | no | Suggested selling price |
applied_sell_price | numeric(12,2) | yes | Selling price used on the quote |
target_margin_percent | numeric(6,3) | no | Target margin in per cent |
resulting_margin_percent | numeric(6,3) | yes | Resulting margin in per cent |
resulting_markup_percent | numeric(8,3) | yes | Resulting markup in per cent |
loaded_distance_km | numeric(10,2) | no | Loaded distance in km |
empty_distance_km | numeric(10,2) | no | Empty distance in km |
total_distance_km | numeric(10,2) | no | Total distance in km |
duration_seconds | integer | no | Duration in seconds |
confidence | enum: high, medium, low | no | Confidence of the estimate |
warnings | jsonb | no | Warnings of the estimate (JSON) |
normalized_input | jsonb | no | Inputs of the calculation (JSON) |
route_snapshot | jsonb | no | Route data at the time of the calculation (JSON) |
source_snapshot | jsonb | no | Prices, settings and sources at the time of the calculation (JSON) |
override_reason | text | yes | Reason for a manually changed price |
is_applied | boolean | no | The estimate is applied to the quote |
created_by | varchar(255) | yes | User who created the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
quote_estimator_settings
Cost estimator settings (one record): default consumptions, prices and costs per kilometre, hour and day. File in the archive: database/quote_estimator_settings.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier (always 1) |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
default_fuel_consumption_l_100_km | numeric(8,3) | no | Default fuel consumption when loaded in l/100 km |
default_empty_fuel_consumption_l_100_km | numeric(8,3) | no | Default fuel consumption when empty in l/100 km |
default_idle_consumption_l_per_hour | numeric(8,3) | no | Fuel consumption while idling in l/h |
default_fuel_price_per_liter | numeric(10,4) | yes | Default fuel price per litre |
fuel_price_source_label | varchar(160) | yes | Source of the default fuel price |
fuel_price_effective_at | date | yes | Date of the default fuel price |
fuel_price_max_age_days | integer | no | Maximum age of the fuel price in days |
driver_hourly_cost | numeric(10,2) | no | Driver cost per driving hour |
service_hourly_cost | numeric(10,2) | no | Cost per hour of loading or unloading |
waiting_hourly_cost | numeric(10,2) | no | Cost per hour of waiting |
daily_allowance_per_driver | numeric(10,2) | no | Daily allowance per driver |
overnight_allowance_per_driver | numeric(10,2) | no | Overnight allowance per driver |
second_driver_cost_factor | numeric(6,3) | no | Cost factor of a second driver |
fixed_vehicle_cost_per_km | numeric(10,4) | no | Fixed vehicle cost per km |
fixed_vehicle_cost_per_day | numeric(10,2) | no | Fixed vehicle cost per day |
maintenance_cost_per_km | numeric(10,4) | no | Maintenance cost per km |
tyre_cost_per_km | numeric(10,4) | no | Tyre cost per km |
adblue_cost_per_km | numeric(10,4) | no | AdBlue cost per km |
overhead_flat | numeric(10,2) | no | Flat overhead per transport |
average_speed_kph | numeric(7,2) | no | Average speed in km/h |
default_contingency_percent | numeric(6,3) | no | Contingency in per cent |
default_target_margin_percent | numeric(6,3) | no | Default target margin in per cent |
fleetcore_lookback_days | integer | no | How many days of FleetCore data are considered |
fleetcore_min_distance_km | numeric(10,2) | no | Minimum distance driven for calibration with FleetCore in km |
fleetcore_max_age_hours | integer | no | Maximum age of FleetCore data in hours |
public_rate_max_age_days | integer | no | Maximum age of public prices and rates in days |
public_fuel_tax_treatment | varchar(24) | no | Tax treatment of the public fuel price, e.g. net_recoverable |
public_fuel_vat_rate_percent | numeric(6,3) | no | VAT rate for the public fuel price in per cent |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
quote_mutation_receipts
Receipts of created or duplicated quotes, so that a repeated request does not create a duplicate. File in the archive: database/quote_mutation_receipts.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
idempotency_key | uuid; primary key | no | One-time request key (UUID) that prevents saving twice |
operation | varchar(32) | no | Operation: creating or duplicating a quote |
actor_id | varchar(255) | no | User who sent the request |
request_hash | char(64) | no | SHA-256 of the request, used to recognise a repeated request |
result_quote_id | integer; references quotes.id | no | Created quote |
created_at | timestamp(3) | no | When the record was created |
quote_number_sequences
Quote numbering state per year. File in the archive: database/quote_number_sequences.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
year | integer; primary key | no | Numbering year |
next_value | integer | no | Next free sequence number |
updated_at | timestamp(3) | no | When the record was last changed |
quote_publications
Issued quotes: the PDF and commercial data, frozen at first issue; they cannot be changed. File in the archive: database/quote_publications.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
quote_id | integer; references quotes.id | no | Quote |
schema_version | integer | no | Version of the data format in commercial_data |
quote_number | varchar(50) | no | Quote number at issue |
commercial_data | jsonb | no | Commercial data of the quote at issue (JSON) |
pdf_bytes | bytea | no | The issued PDF (bytes as hex) |
published_by | varchar(255) | no | User who issued the quote (e-mail) |
created_at | timestamp(3) | no | When the record was created |
quote_stops
Stops of quotes in sequence. File in the archive: database/quote_stops.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
quote_id | integer; references quotes.id | no | Quote |
sequence | integer | no | Position in the list |
address | text | yes | Address (street and number) |
city | varchar(100) | yes | City |
country_id | integer; references countries.id | yes | Country |
lat | numeric(10,8) | yes | Latitude (WGS 84) |
lng | numeric(11,8) | yes | Longitude (WGS 84) |
label | varchar(100) | yes | Label of the stop |
service_duration_minutes | integer | yes | Expected time at the stop in minutes |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
quotes
Quotes to customers: route, cargo, price, cost estimate and status. File in the archive: database/quotes.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
quote_number | varchar(50) | no | Quote number |
quote_year | integer | no | Numbering year |
quote_date | date | no | Quote date |
valid_until | date | yes | Quote valid until |
customer_id | integer; references partners.id | no | Customer |
sender_id | integer; references partners.id | yes | Sender |
recipient_id | integer; references partners.id | yes | Recipient |
origin_address | text | yes | Loading address |
origin_city | varchar(100) | yes | Loading city |
origin_country_id | integer; references countries.id | yes | Loading country |
destination_address | text | yes | Unloading address |
destination_city | varchar(100) | yes | Unloading city |
destination_country_id | integer; references countries.id | yes | Unloading country |
origin_lat | numeric(10,8) | yes | Loading latitude |
origin_lng | numeric(11,8) | yes | Loading longitude |
destination_lat | numeric(10,8) | yes | Unloading latitude |
destination_lng | numeric(11,8) | yes | Unloading longitude |
pickup_date | timestamp(3) | yes | Planned loading time |
cargo_category | enum: silo, cistern, container, curtain | yes | Cargo category |
is_round_trip | boolean | no | Round trip back to the start |
loaded_distance_km | numeric(10,2) | yes | Loaded distance in km |
positioning_distance_km | numeric(10,2) | yes | Empty run to the loading place in km |
return_distance_km | numeric(10,2) | yes | Return distance in km |
route_duration_seconds | integer | yes | Driving time from the route calculation in seconds |
route_provider | varchar(50) | yes | Routing provider |
route_reference | varchar(255) | yes | Reference of the route calculation |
route_geometry | jsonb | yes | Route line (JSON) |
vehicle_cost_profile_id | integer; references vehicle_cost_profiles.id | yes | Vehicle cost profile used for the estimate |
estimate_vehicle_id | integer; references vehicles.id | yes | Vehicle used for the cost estimate |
goods_description | text | yes | Description of the goods |
weight_kg | numeric(10,2) | yes | Cargo weight in kg |
volume_m3 | numeric(10,3) | yes | Cargo volume in m³ |
quantity | integer | yes | Quantity (number of units) |
pricing_type | enum: manual, silo, cistern | no | Price list type: manual price, silo or cistern |
pricing_location_id | integer; references pricing_locations.id | yes | Pricing location the price is based on |
pricing_rate_id | integer; references pricing_rates.id | yes | Pricing rate the price is based on |
quoted_amount | numeric(12,2) | yes | Quoted price without VAT |
quote_currency | varchar(3) | no | Currency of the quote |
cost_amount | numeric(12,2) | yes | Estimated transport cost |
status | enum: draft, sent, accepted, rejected, expired, converted | no | Quote status |
customer_terms | text | yes | Terms for the customer printed on the quote |
published_at | timestamp(3) | yes | When the quote was first issued |
notes | text | yes | Notes |
created_at | timestamp(3) | no | When the record was created |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_at | timestamp(3) | no | When the record was last changed |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
saved_location_aliases
Alternative spellings of saved location names (aliases) for search. File in the archive: database/saved_location_aliases.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
saved_location_id | integer; references saved_locations.id | no | Saved location |
alias | varchar(150) | no | Alternative spelling of the location name |
normalized_alias | varchar(150) | no | Alternative spelling in a normalised form for search |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
saved_locations
Saved locations (frequent loading and unloading places) with address and coordinates. File in the archive: database/saved_locations.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
name | varchar(150) | no | Location name |
normalized_name | varchar(150) | no | Name in a normalised form for search and matching |
address | text | yes | Address (street and number) |
city | varchar(100) | yes | City |
country_id | integer; references countries.id | yes | Country |
lat | numeric(10,8) | yes | Latitude (WGS 84) |
lng | numeric(11,8) | yes | Longitude (WGS 84) |
partner_id | integer; references partners.id | yes | Partner linked to the location |
notes | text | yes | Notes |
usage_count | integer | no | How often the location was used |
last_used_at | timestamp(3) | yes | Last used |
is_active | boolean | no | The record is active; inactive records are not offered for new entries |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
tenant_integrations
Integration settings (FleetCore), without the encrypted credential. File in the archive: database/tenant_integrations.ndjson. Without the columns holding security secrets: encrypted_credential.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
provider | enum: fleetcore | no | Integration provider |
configuration_version | integer | no | Settings version |
environment | varchar(30) | no | Provider’s environment, e.g. production |
encryption_key_version | varchar(50) | yes | Version of the key the credential is encrypted with; the credential is not in the export |
status | enum: unconfigured, unverified, active, error, disabled | no | Integration status |
config | jsonb | yes | Integration settings (JSON) |
permissions | jsonb | yes | Permissions confirmed by the provider (JSON) |
verified_at | timestamp(3) | yes | When the connection was last verified |
last_sync_at | timestamp(3) | yes | When data was last synchronised |
sync_watermark | jsonb | yes | How far the data has been synchronised (JSON) |
sync_lease_owner | varchar(100) | yes | Process that is currently synchronising |
sync_lease_until | timestamp(3) | yes | Synchronisation lock valid until |
last_error_code | varchar(80) | yes | Code of the last error |
last_error_at | timestamp(3) | yes | When the last error happened |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
users
App users, without passwords and two-factor secrets. File in the archive: database/users.ndjson. Without the columns holding security secrets: password, totp_secret, recovery_codes.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
email | text | no | Sign-in e-mail address |
first_name | text | no | First name |
last_name | text | no | Last name |
role | enum: admin, dispatcher, accountant, driver, mechanic | no | Role that sets the user’s permissions |
is_active | boolean | no | The user can sign in |
totp_enabled | boolean | no | The user has two-factor authentication switched on |
totp_last_used_step | integer | yes | Last used time step of a two-factor code (each code works once) |
token_version | integer | no | Counter that ends existing sign-ins when the password changes |
failed_login_attempts | integer | no | Consecutive failed sign-ins |
locked_until | timestamp(3) | yes | Sign-in is locked until this time |
force_password_change | boolean | no | The user must change the password at the next sign-in |
signature_url | varchar(255) | yes | Signature and stamp image for invoices; in the archive it is under files/private/signatures/ or, for older ones, files/public/ |
sign_invoices | boolean | no | The signature and stamp are printed on invoices the user creates |
order_defaults | jsonb | yes | This user’s default values for the order form (JSON) |
anonymized_at | timestamp(3) | yes | When the user was anonymised (personal data erased); empty if not |
here_terms_accepted_at | timestamp(3) | yes | When the user accepted the HERE terms of use |
here_terms_version | varchar(40) | yes | Version of the HERE terms of use the user accepted |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
vasco_export_settings
The company’s account numbers for exporting issued invoices to the Vasco bookkeeping program (receivables, revenue, VAT). File in the archive: database/vasco_export_settings.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier (always 1) |
receivable_domestic_account | varchar(12) | no | Account for receivables from customers in Slovenia |
receivable_foreign_account | varchar(12) | no | Account for receivables from customers abroad |
revenue_domestic_account | varchar(12) | no | Revenue account for customers in Slovenia (for invoice lines without their own account) |
revenue_foreign_account | varchar(12) | no | Revenue account for customers abroad (for invoice lines without their own account) |
vat_account | varchar(12) | no | Account for VAT charged |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
updated_at | timestamp(3) | no | When the record was last changed |
vehicle_brands
Vehicle brand list. File in the archive: database/vehicle_brands.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
name | varchar(100) | no | Brand name |
created_at | timestamp(3) | no | When the record was created |
vehicle_cost_profiles
Vehicle cost profiles for quote cost estimates. File in the archive: database/vehicle_cost_profiles.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
name | varchar(120) | no | Profile name |
cargo_category | enum: silo, cistern, container, curtain | yes | Cargo category the profile applies to |
fuel_consumption_l_100_km | numeric(8,3) | no | Fuel consumption in l/100 km |
driver_hourly_cost | numeric(10,2) | yes | Driver cost per hour |
fixed_vehicle_cost_per_km | numeric(10,4) | yes | Fixed vehicle cost per km |
maintenance_cost_per_km | numeric(10,4) | yes | Maintenance cost per km |
tyre_cost_per_km | numeric(10,4) | yes | Tyre cost per km |
adblue_cost_per_km | numeric(10,4) | yes | AdBlue cost per km |
is_active | boolean | no | The record is active; inactive records are not offered for new entries |
created_by | varchar(255) | yes | User who created the record (e-mail) |
updated_by | varchar(255) | yes | User who last changed the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
vehicle_costs
Actual vehicle costs from every source (Eurowag cards, DarsGo, CVS, accounting, manual entry): fuel, AdBlue, tolls, vignettes, parking, service. File in the archive: database/vehicle_costs.ndjson. Without the columns holding security secrets: card_hash, device_hash.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
vehicle_id | integer; references vehicles.id | yes | Vehicle |
driver_id | integer; references drivers.id | yes | Driver |
order_id | integer; references orders.id | yes | Order |
occurred_at | timestamp(3) | no | Time of the cost (UTC) |
occurred_on | date | no | Date of the cost in the company calendar |
country | varchar(2) | yes | Country of the cost (ISO code) |
type | enum: fuel, adblue, toll, vignette, parking, service, other | no | Type: fuel, AdBlue, toll, vignette, parking, service or other |
product_name | varchar(120) | yes | Product as the source names it |
quantity | numeric(12,3) | yes | Quantity |
unit | varchar(10) | yes | Unit of the quantity, e.g. l |
net_amount | numeric(12,2) | yes | Amount without VAT in the original currency |
vat_rate | numeric(5,2) | yes | VAT rate in percent |
vat_amount | numeric(12,2) | yes | VAT amount in the original currency |
gross_amount | numeric(12,2) | yes | Amount including VAT in the original currency |
currency | varchar(3) | no | Currency (ISO 4217 code, e.g. EUR) |
net_amount_eur | numeric(12,2) | yes | Amount without VAT in euros |
gross_amount_eur | numeric(12,2) | yes | Amount including VAT in euros |
fx_rate | numeric(18,8) | yes | ECB reference rate: currency units per 1 EUR |
fx_rate_date | date | yes | Date of the rate used |
fx_source | varchar(10) | yes | Source of the rate: eur (cost in euros) or ecb |
status | enum: estimate, provisional, final | no | Status of the cost: estimate, pro-forma or invoiced |
source | enum: eurowag_file, darsgo, cvs, accounting, manual | no | Source of the cost: Eurowag file, DarsGo, CVS, accounting or manual entry |
source_reference | varchar(200) | yes | Reference of the cost at the source |
supplier_name | varchar(120) | yes | Supplier, e.g. Eurowag or DARS |
supplier_key | varchar(40) | yes | Provider code, e.g. eurowag or dars |
invoice_number | varchar(60) | yes | Supplier invoice number |
invoice_key | varchar(60) | yes | Invoice number without punctuation, which recognises one invoice from a file and from accounting |
invoice_date | date | yes | Supplier invoice date |
station_name | varchar(200) | yes | Fuel station, toll section or place of the cost |
station_code | varchar(60) | yes | Code of the station or section at the source |
card_last4 | varchar(4) | yes | Last four characters of the card number |
device_last4 | varchar(4) | yes | Last four characters of the toll-box number |
source_plate | varchar(50) | yes | Plate as the source states it |
odometer_km | integer | yes | Odometer reading at the time of the cost |
dedup_key | varchar(100) | no | Key that prevents importing the same cost twice |
match_key | varchar(100) | yes | Key that links a pro-forma row with its invoice row |
import_batch_id | integer; references cost_import_batches.id | yes | Import that created the row |
last_import_batch_id | integer; references cost_import_batches.id | yes | Import that last changed the row |
source_row_number | integer | yes | Row number in the imported file |
superseded_at | timestamp(3) | yes | When a more accurate source replaced the row; such rows are not counted in totals |
superseded_by_id | integer; references vehicle_costs.id | yes | Row that replaced it |
superseded_reason | varchar(30) | yes | Reason it was replaced |
notes | text | yes | Notes |
created_by_id | integer | yes | User who created the row |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
vehicle_damages
Vehicle damages and their repair. File in the archive: database/vehicle_damages.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
vehicle_id | integer; references vehicles.id | no | Vehicle |
date | date | no | Date of the damage |
description | text | no | Description of the damage |
repair_cost | numeric(12,2) | yes | Repair cost |
status | enum: open, in_repair, repaired | no | Damage status |
repaired_date | date | yes | Repair date |
notes | text | yes | Notes |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
vehicle_documents
Vehicle documents (insurance, registration, ADR, technical inspection …) with expiry dates and scans. File in the archive: database/vehicle_documents.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
vehicle_id | integer; references vehicles.id | no | Vehicle |
type | enum: insurance, registration, adr, fire_extinguisher, leasing, technical_exam, other | no | Document type |
document_number | varchar(100) | yes | Document number |
issue_date | date | yes | Date of issue |
expiry_date | date | yes | Document valid until |
notes | text | yes | Notes |
scan_original_filename | varchar(255) | yes | File name of the scan at upload |
scan_storage_key | varchar(500) | yes | Key of the stored scan; in the archive it is under files/private/ as for storage_key |
scan_mime_type | varchar(100) | yes | Content type of the scan (MIME) |
scan_size_bytes | integer | yes | Scan size in bytes |
scan_uploaded_at | timestamp(3) | yes | When the scan was uploaded |
scan_uploaded_by | varchar(255) | yes | User who uploaded the scan (e-mail) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
vehicle_types
Vehicle type list. File in the archive: database/vehicle_types.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
code | varchar(20) | no | Vehicle type code |
name | varchar(100) | no | Vehicle type name |
description | text | yes | Description |
created_at | timestamp(3) | no | When the record was created |
vehicles
Vehicles: tractor units, trucks and trailers. File in the archive: database/vehicles.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
legacy_id | integer | yes | Record ID in the previous software (from the data migration) |
license_plate | varchar(50) | no | Registration number |
internal_number | varchar(50) | yes | Internal vehicle number |
default_trailer_id | integer; references vehicles.id | yes | Default trailer of the tractor unit |
vehicle_type_id | integer; references vehicle_types.id | yes | Vehicle type |
brand_id | integer; references vehicle_brands.id | yes | Vehicle brand |
year_manufactured | integer | yes | Year of manufacture |
vin_number | varchar(50) | yes | Vehicle identification number (VIN) |
capacity_kg | integer | yes | Payload in kg |
capacity_m3 | numeric(10,2) | yes | Capacity in m³ |
length_m | numeric(5,2) | yes | Length in metres |
width_m | numeric(5,2) | yes | Width in metres |
height_m | numeric(5,2) | yes | Height in metres |
owner_partner_id | integer; references partners.id | yes | Partner that owns the vehicle (e.g. a subcarrier); empty for own vehicles |
is_active | boolean | no | The record is active; inactive records are not offered for new entries |
euro_standard | varchar(10) | yes | EURO emission class |
gross_weight_kg | integer | yes | Gross weight in kg (for routing) |
axle_count | integer | yes | Number of axles of the vehicle (for routing) |
trailer_count | integer | yes | Number of trailers towed when an order has no trailer selected |
routing_unit_type | varchar(20) | yes | Unit type for routing: tractor, rigid truck, van or trailer |
tare_weight_kg | integer | yes | Tare weight of the vehicle in kg (for routing) |
co2_class | integer | yes | CO2 class of the vehicle (1-5) for the German truck toll |
fuel_type | varchar(20) | yes | Fuel or drive of the vehicle |
division | enum: transport, construction | no | Business unit of the vehicle: haulage (transport) or construction sites (construction) |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |
work_order_attachments
Work order attachments (photos before and after the repair, documents). File in the archive: database/work_order_attachments.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
work_order_id | integer; references work_orders.id | no | Work order |
kind | enum: photo_before, photo_after, document | no | Kind of attachment: photo before or after the repair, or a document |
original_filename | varchar(255) | no | File name at upload |
storage_key | varchar(500) | no | Key of the stored file; in the archive the file is under files/private/ at this key without its leading tenants/<company>/ part |
mime_type | varchar(100) | no | Content type of the file (MIME), e.g. application/pdf |
size_bytes | integer | no | File size in bytes |
uploaded_at | timestamp(3) | no | When the file was uploaded |
uploaded_by | varchar(255) | yes | User who uploaded the file (e-mail) |
work_order_notes
Notes on work orders (the conversation between office and mechanic). File in the archive: database/work_order_notes.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
work_order_id | integer; references work_orders.id | no | Work order |
note | text | no | Text of the note |
created_by | varchar(255) | yes | User who created the record (e-mail) |
created_at | timestamp(3) | no | When the record was created |
work_orders
Workshop work orders for vehicle repairs and maintenance, including at an external service. File in the archive: database/work_orders.ndjson.
| Column | Type | Can be empty | Meaning |
|---|---|---|---|
id | integer; primary key | no | Record identifier |
vehicle_id | integer; references vehicles.id | no | Vehicle |
title | varchar(200) | no | Title of the work order |
description | text | yes | Description of the work |
priority | enum: urgent, important, normal | no | Priority |
status | enum: new, queued, planned, accepted, in_progress, waiting_parts, postponed, done, cancelled, external_service, external_done | no | Work order status |
division | enum: transport, construction | no | Business unit, taken over from the vehicle |
due_date | date | yes | Due date |
mechanic_note | text | yes | Note for the mechanic |
created_by | varchar(255) | yes | User who created the record (e-mail) |
created_by_role | varchar(20) | yes | Role of the user who created the work order |
accepted_at | timestamp(3) | yes | When the work order was accepted |
started_at | timestamp(3) | yes | When the work started |
completed_at | timestamp(3) | yes | When the work was completed |
completed_by | varchar(255) | yes | User who completed the work order (e-mail) |
completion_note | text | yes | Completion note |
time_spent_minutes | integer | yes | Time spent in minutes |
parts_used | text | yes | Parts used |
external_service_name | varchar(200) | yes | External service |
external_reason | text | yes | Reason for the external service |
external_sent_date | date | yes | Date sent to the external service |
external_expected_return | date | yes | Expected return date |
external_returned_date | date | yes | Return date |
external_repair_summary | text | yes | Repair summary of the external service |
external_cost | numeric(12,2) | yes | Cost of the external service |
external_status | enum: sent, waiting_repair, in_repair, completed, returned | yes | Status at the external service |
created_at | timestamp(3) | no | When the record was created |
updated_at | timestamp(3) | no | When the record was last changed |