metarequired table
Key/value facts about this database. Required: schema, schema_version, as_of, data_hash, source_built_at, base_currency.
| Field | Type | Required | Meaning |
|---|---|---|---|
key | TEXT | no | |
value | TEXT | no |
Standards / rental@1
rental@1 short-term rental listings, reservations, payouts, calendar and costsOne row of reservations is one stay: a listing, a channel, the check-in and check-out dates, and the stay's money as the channel reported it. Money that moved later (a refund, an alteration, a resolution payment, a cancellation fee kept) is a row in adjustments, signed to the host. listings link to finance@2 through property_id, so a property's costs (expenses, from the person's bank ledger or a file) and its valuations live beside its income. Airbnb earnings CSVs, Booking.com reservation exports, a generic CSV in this shape, and the Hostaway API (lane 2) fill it; the Rental Portfolio board reads it.
Check a database or a board against it: dashremix spec check. Start a new board on it: dashremix new <id> --schema rental@1. Hash 604a0c27cdf6b6ac…
Compatible with finance@2.
Required tables must exist in every database that says it follows rental@1; required fields must be filled. Columns a board adds start with x_.
metarequired tableKey/value facts about this database. Required: schema, schema_version, as_of, data_hash, source_built_at, base_currency.
| Field | Type | Required | Meaning |
|---|---|---|---|
key | TEXT | no | |
value | TEXT | no |
listingsrequired tableWhat a guest books. Several listings can share one property (two units in one house). links to finance@2 by property_id.
| Field | Type | Required | Meaning |
|---|---|---|---|
listing_id | TEXT | yes | stable id: the source's own (hostaway:501) or the person's slug (beach-house) |
property_id | TEXT | yes | finance@2 properties.property_id it belongs to (expenses and valuations join here) |
name | TEXT | no | friendly name, e.g. Dune Road Beach House |
channel_ids | TEXT | no | JSON object: the listing's id on each channel, e.g. {"airbnb": "Dune Road Beach House"} |
bedrooms | INTEGER | no | bedrooms |
active_from | TEXTdate | no | first night it could be booked; occupancy counts nights from here |
active_to | TEXTdate | no | first night it can no longer be booked (exclusive); NULL = still listed |
currency | TEXTcurrency | no | ISO 4217 of its prices and payouts |
tz | TEXT | no | IANA time zone of the property (America/New_York): local dates and booking lead time |
city | TEXT | no | free text, as the person wrote it |
country | TEXTcountry | no | ISO 3166-1 alpha-2 |
source | TEXT | no | connector or file kind that wrote the row: inputs | hostaway | rental-csv |
source_ref | TEXT | no | where in the source: data/inputs.yaml, or the API object id |
imported_at | TEXTinstant | no | ISO 8601 UTC instant (left out of meta.data_hash) |
unit_code | TEXT | no | 1.1: the operator's own code for the unit within its property (Sixto unit code 3, 1A); unique per property_id (1.1) |
max_guests | INTEGER | no | 1.1: most guests the listing takes (1.1) |
reservationsrequired tableOne stay. Money columns are the stay's totals in its currency; adjustments after booking live in adjustments.
| Field | Type | Required | Meaning |
|---|---|---|---|
reservation_id | TEXT | yes | the channel's id namespaced by source (airbnb:HMABC123, booking:4012345678, hostaway:9), else sha1 of listing|check_in|check_out|channel|n |
listing_id | TEXT | yes | listings.listing_id |
channel | TEXTchannels | yes | where it was booked: airbnb | vrbo | booking | direct | other (vocab channels) |
status | TEXTreservation_statuses | yes | confirmed | cancelled | no_show | pending (vocab reservation_statuses); an altered stay keeps its latest dates and status |
booked_at | TEXTinstant | no | ISO 8601 UTC instant it was booked, when the source gives a time |
booked_on | TEXTdate | no | local date it was booked (many exports give only a date): lead time = check_in - booked_on |
cancelled_on | TEXTdate | no | local date it was cancelled (status cancelled), when known |
check_in | TEXTdate | yes | first night (local date) |
check_out | TEXTdate | yes | departure day, exclusive (the first night not stayed) |
nights | INTEGER | yes | check_out - check_in, also for a cancelled stay (the nights it would have had) |
guests | INTEGER | no | number of guests |
accommodation | REAL | no | nightly price total for the stay (room revenue: ADR and RevPAR use this), before fees |
cleaning_fee | REAL | no | cleaning fee charged to the guest |
other_fees | REAL | no | other fees charged to the guest and kept by the host (pets, extra guests, linens) |
guest_service_fee | REAL | no | the channel's fee paid by the guest (never the host's money; information only) |
host_fee | REAL | no | what the channel took from the host (commission, host service fee, payment fee), positive |
taxes_collected | REAL | no | occupancy and lodging taxes the guest paid |
taxes_remitted_by_channel | REAL | no | the part of taxes_collected the channel paid to the tax office itself (the rest is the host's to pay) |
gross | REAL | no | host gross as the channel defines it: accommodation + cleaning_fee + other_fees, before host_fee |
payout | REAL | no | what the channel pays the host for the stay before adjustments (gross - host_fee + taxes the host must remit) |
currency | TEXTcurrency | yes | ISO 4217 of every money column in the row |
source | TEXT | yes | connector or file layout that wrote the row: airbnb-csv | booking-csv | rental-csv | hostaway |
source_ref | TEXT | no | file:line, or the API object id |
imported_at | TEXTinstant | no | ISO 8601 UTC instant (left out of meta.data_hash) |
guest_key | TEXT | no | 1.1: the source's opaque, stable key for the guest (never a name, email or phone): repeat guests only. A shared copy never carries it (1.1) |
checkin_status | TEXTcheckin_statuses | no | 1.1: online check-in of the stay: not_started | started | completed (vocab checkin_statuses), when the source tracks it (1.1) |
adjustmentsMoney that moved after the booking: refunds to the guest, alterations, resolution payments, cancellation fees kept.
| Field | Type | Required | Meaning |
|---|---|---|---|
adjustment_id | TEXT | yes | the source's id, else sha1 of reservation|date|kind|amount|n |
reservation_id | TEXT | no | the stay it belongs to (NULL = not tied to one stay) |
listing_id | TEXT | no | the listing, when no stay is named |
date | TEXTdate | yes | local date the money moved |
kind | TEXTadjustment_kinds | yes | refund | alteration | resolution | cancellation_fee | penalty | other (vocab adjustment_kinds) |
amount | REAL | yes | SIGNED, to the host: +40.00 more paid out, -60.00 refunded to the guest or charged to the host |
currency | TEXTcurrency | yes | ISO 4217 |
description | TEXT | no | as the source wrote it |
source | TEXT | yes | connector or file layout |
source_ref | TEXT | no | file:line or API object id |
imported_at | TEXT | no | ISO 8601 UTC instant |
payoutsMoney the channel sent to the host's bank.
| Field | Type | Required | Meaning |
|---|---|---|---|
payout_id | TEXT | yes | the source's id, else sha1 of date|amount|currency|reference|n |
date | TEXTdate | yes | local date it was sent |
amount | REAL | yes | positive, in currency |
currency | TEXTcurrency | yes | ISO 4217 |
reservation_ids | TEXT | no | JSON array of the stays it pays, when the source says |
channel | TEXTchannels | no | vocab channels |
reference | TEXT | no | the channel's reference code (never a bank account number) |
source | TEXT | yes | connector or file layout |
source_ref | TEXT | no | file:line or API object id |
imported_at | TEXT | no | ISO 8601 UTC instant |
status | TEXTpayout_statuses | no | 1.1: received | expected | overdue | cancelled (vocab payout_statuses); NULL = received (what 1.0 rows mean) (1.1) |
availabilityThe calendar: one row per listing per local date the source says something about. Occupancy needs a denominator and exports rarely give one: without rows here a board counts every night from active_from as available, less owner blocks.
| Field | Type | Required | Meaning |
|---|---|---|---|
listing_id | TEXT | yes | listings.listing_id |
date | TEXTdate | yes | local date (a night) |
state | TEXTavailability_states | yes | available | booked | owner_block | blocked (vocab availability_states) |
source | TEXT | no | hostaway | ics | inputs |
price | REAL | no | 1.1: the nightly price on offer, in listings.currency; NULL = no price set (an unpriced night) (1.1) |
min_stay | INTEGER | no | 1.1: minimum nights for a stay starting that night (1.1) |
expensesCosts of running a property. From the finance@2 ledger (txn_id set) when the person's bank files are in the library, else a file.
| Field | Type | Required | Meaning |
|---|---|---|---|
expense_id | TEXT | yes | finance:<txn_id> for a ledger row, else sha1 of property|date|category|amount|description|n |
date | TEXTdate | yes | date paid |
property_id | TEXT | yes | the property it is for (listings.property_id) |
listing_id | TEXT | no | one listing, when the cost is for one unit only |
category | TEXT | yes | Cleaning | Utilities | Supplies | Repairs | Management | Insurance | Taxes | Mortgage interest | Furnishing | Other (vocab expense_categories, a suggestion) |
amount | REAL | yes | positive = a cost, negative = money back (a refund of a cost) |
currency | TEXTcurrency | yes | ISO 4217 |
description | TEXT | no | as the bank or the person wrote it |
txn_id | TEXT | no | finance@2 transactions.txn_id when the cost came from the ledger |
source | TEXT | yes | finance-library | expenses-csv |
source_ref | TEXT | no | file:line or the ledger's source_ref |
imported_at | TEXT | no | ISO 8601 UTC instant |
reviewsOptional: guest reviews (ratings only; never the text or the guest's name).
| Field | Type | Required | Meaning |
|---|---|---|---|
review_id | TEXT | yes | the source's id namespaced by source |
listing_id | TEXT | yes | listings.listing_id |
reservation_id | TEXT | no | the stay reviewed, when known |
date | TEXTdate | yes | local date of the review |
rating | REAL | no | overall rating, 0 to 5 (decimals allowed) |
channel | TEXTchannels | no | vocab channels |
source | TEXT | no | connector or file layout |
source_ref | TEXT | no | file:line or API object id |
needs_reply | INTEGER | no | 1.1: 1 when the host has not posted a reply yet (a draft still needs one), 0 when replied (1.1) |
reply_status | TEXTreply_statuses | no | 1.1: unanswered | drafted | replied (vocab reply_statuses) (1.1) |
fx_ratesExchange rates used to bring every row to meta.base_currency. A total never silently leaves a row out: a row in another currency without a rate stops the import.
| Field | Type | Required | Meaning |
|---|---|---|---|
date | TEXTdate | yes | rate date (0000-01-01 = one rate for every date, as the person gave it) |
ccy | TEXTcurrency | yes | ISO 4217 of the foreign currency |
base_per_unit | REAL | yes | units of meta.base_currency for one unit of ccy |
source | TEXT | no | where the rate came from (data/fx_rates.csv, inputs.yaml) |
propertiesWhat a connector or importer could not read, left out on purpose, or stopped on. A property (a building, a house): its name, time zone and currency. Listings point here by property_id. Optional: a board that has none names a property after its listings. (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
property_id | TEXT | yes | listings.property_id (sixto:casa-a, beach-house) |
name | TEXT | no | the property's name, e.g. Casa Alameda |
tz | TEXT | no | IANA time zone (America/Bogota): its local dates |
currency | TEXTcurrency | no | ISO 4217 its stays are priced in; a property's money is never added to another currency's |
opened_on | TEXTdate | no | first night of its first confirmed stay (a capacity rule may count units from here) |
source | TEXT | no | connector or file that wrote it |
source_ref | TEXT | no | the source's object id |
reservation_unitsThe units a stay occupies, when a stay holds several units or moves between them (one row per unit and run of nights; end exclusive). A stay with no rows here occupies reservations.listing_id for all its nights. Money is shared over unit-nights. (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
reservation_id | TEXT | yes | reservations.reservation_id |
listing_id | TEXT | yes | listings.listing_id |
start_date | TEXTdate | yes | first night in this unit (local date) |
end_date | TEXTdate | yes | the first night no longer in this unit (exclusive) |
source | TEXT | no | connector that wrote it |
cleaningsTurnover cleaning: the state of a unit on a date, and the cleans planned (an arrival to prepare, a checkout clean). (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
cleaning_id | TEXT | yes | the source's id, else <listing_id>|<date>|<action> |
listing_id | TEXT | yes | listings.listing_id |
date | TEXTdate | yes | local date |
action | TEXTcleaning_actions | yes | status (the unit's state that day) | arrival | checkout | courtesy (vocab cleaning_actions) |
status | TEXTcleaning_statuses | no | clean | inspection | dirty | unknown (vocab cleaning_statuses): the unit's state when read |
reservation_id | TEXT | no | the stay it is for, when one |
updated_at | TEXTinstant | no | ISO 8601 UTC instant the status last changed |
source | TEXT | no | connector that wrote it |
source_ref | TEXT | no | the source's object id |
tasksWork to do on a property or unit (maintenance, supplies, a guest request). Never the task's text: titles and comments can name guests, so only the kind, state and dates are kept. (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
task_id | TEXT | yes | the source's id namespaced (sixto:task:812) |
property_id | TEXT | no | the property, when the task names one |
listing_id | TEXT | no | the unit, when the task names one |
reservation_id | TEXT | no | the stay, when the task names one |
kind | TEXT | no | the source's own task type label (Maintenance, Supplies), never free text |
status | TEXTtask_statuses | yes | todo | in_progress | blocked | done (vocab task_statuses) |
priority | TEXT | no | low | normal | high | urgent |
due_on | TEXTdate | no | local date it is due |
done_on | TEXTdate | no | local date it was done |
archived | INTEGER | no | 1 when archived (no longer on anyone's list) |
source | TEXT | yes | connector that wrote it |
source_ref | TEXT | no | the source's object id |
guest_registrationsGuest registrations owed to an authority (Colombia's SIRE migration movements and TRA tourism cards, Spain's SES Hospedajes, Italy's Alloggiati Web, Portugal's SIBA). One row per filing; never the guest's name, initials or document. (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
registration_id | TEXT | yes | the source's id namespaced (sixto:sire:4411) |
reservation_id | TEXT | no | the stay it is for |
authority | TEXTauthorities | yes | sire | tra | ses | alloggiati | siba | other (vocab authorities) |
kind | TEXT | no | what is filed: entry | exit (SIRE E/S), main | companion (TRA cards), stay |
event_date | TEXTdate | no | local date of the movement or arrival it reports |
due_at | TEXTinstant | no | ISO 8601 instant it is due by the authority's rule, when known |
status | TEXTregistration_statuses | yes | pending | filed | failed | cancelled | not_required (vocab registration_statuses) |
status_raw | TEXT | no | the source's own status word (batched, retrying, validation_error) |
filed_at | TEXTinstant | no | ISO 8601 instant it was accepted, when known |
attempts | INTEGER | no | tries so far |
source | TEXT | yes | connector that wrote it |
source_ref | TEXT | no | the source's object id |
filing_incidentsWhen a filing went wrong: late, rejected, or the filing record itself broken. (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
incident_id | TEXT | yes | the source's id namespaced |
authority | TEXTauthorities | no | vocab authorities, when the incident is about one |
kind | TEXT | yes | late | rejected | record_broken | other |
status | TEXT | yes | open | closed |
opened_at | TEXTinstant | no | ISO 8601 instant |
closed_at | TEXTinstant | no | ISO 8601 instant |
source | TEXT | yes | connector that wrote it |
source_ref | TEXT | no | the source's object id |
invoicesTax invoices the host issued for stays (Colombia's DIAN e-invoices, credit and debit notes). Never the buyer's name or id. (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
invoice_id | TEXT | yes | the source's id namespaced |
kind | TEXT | yes | invoice | credit_note | debit_note |
status | TEXTinvoice_statuses | yes | draft | ready | sending | accepted | rejected | failed | voided | unknown (vocab invoice_statuses) |
issue_date | TEXTdate | no | local date issued (NULL for a draft) |
reservation_id | TEXT | no | the stay it bills |
total | REAL | no | total in currency, positive; NULL when the source has no totals yet |
currency | TEXTcurrency | no | ISO 4217 |
source | TEXT | yes | connector that wrote it |
source_ref | TEXT | no | the source's object id |
ledger_monthsA month of the host's own books (revenue, costs, net), as the source's ledger reports it, per currency. (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
month | TEXT | yes | YYYY-MM |
currency | TEXTcurrency | yes | ISO 4217 of the three amounts |
revenue | REAL | no | revenue in the month |
costs | REAL | no | costs in the month, positive |
net | REAL | no | revenue - costs |
status | TEXT | no | open | closed (a closed month no longer changes) |
source | TEXT | yes | connector that wrote it |
cancel_reasonsWhy guests cancelled, as the source sorted their answers, for a period. Counts only; never a guest's words. (1.1)
| Field | Type | Required | Meaning |
|---|---|---|---|
period_from | TEXTdate | yes | first day of the period |
period_to | TEXTdate | yes | last day of the period |
category | TEXT | yes | the source's category key |
label | TEXT | no | its label |
count | INTEGER | yes | answers in this category |
nights | INTEGER | no | nights those cancellations gave back |
source | TEXT | yes | connector that wrote it |
review_scoresA review's category scores (1.2): cleanliness, accuracy, communication, check-in, location, value, on the same 0-5 scale as reviews.rating (a 10-point channel's score is halved). One row per review and category the channel gave; a category the channel did not ask is absent, never zero.
| Field | Type | Required | Meaning |
|---|---|---|---|
review_id | TEXT | yes | reviews.review_id |
category | TEXTreview_categories | yes | cleanliness | accuracy | communication | check_in | location | value (vocab review_categories) |
score | REAL | yes | 0 to 5 (decimals allowed), as reviews.rating |
source | TEXT | no | connector or file layout (the review's own) |
source_ref | TEXT | no | file:line or API object id |
import_issues| Field | Type | Required | Meaning |
|---|---|---|---|
issue_id | TEXT | yes | stable id: <file>:<line> or <file>:<kind> |
severity | TEXTseverities | yes | info | warn | error |
kind | TEXT | yes | skipped_row | ignored_rows | unknown_layout | unknown_listing | fx_missing | source_overlap | duplicate |
file | TEXT | no | the source file name (never its contents) |
line | INTEGER | no | 1-based line in that file, when the issue is one row |
detail | TEXT | yes | what happened |
handling | TEXT | yes | what the importer did about it |
source | TEXT | no | connector id |
overridesCorrections the person made, with the reason (platform table).
| Field | Type | Required | Meaning |
|---|---|---|---|
override_id | TEXT | yes | stable id |
target | TEXT | yes | table.key.column the override applies to |
field | TEXT | no | column name |
old_value | TEXT | no | value before |
new_value | TEXT | no | value after |
reason | TEXT | yes | why, in the person's words |
evidence | TEXT | no | where it comes from |
author | TEXT | no | person or assistant |
created_at | TEXT | no | ISO 8601 instant |
annotationsNotes on metrics and pages (platform table). Numbers only through {{metric:...}} placeholders.
| Field | Type | Required | Meaning |
|---|---|---|---|
annotation_id | TEXT | yes | stable id |
target | TEXT | yes | metric id or page id |
kind | TEXT | yes | note | caveat | flag | decision | open_item |
body | TEXT | yes | the note text |
author | TEXT | no | person or assistant |
source_ref | TEXT | no | where it came from |
created_at | TEXT | no | ISO 8601 instant |
data_hash | TEXT | no | hash of the cited metric values when written (stale when they change) |
status | TEXT | no | active | stale | retired |
metric_registry| Field | Type | Required | Meaning |
|---|---|---|---|
metric_id | TEXT | yes | e.g. rental.monthly |
version | INTEGER | no | the metric's own version |
unit | TEXT | no | usd | rows | pct | date | count ... |
params | TEXT | no | comma list of parameters it honours |
description | TEXT | no | the @desc line |
sql | TEXT | no | expanded SQL |
test | TEXT | no | the @test line (check that covers it) |
Shared word lists, so every board and connector means the same thing by the same word.
adjustment_kinds6 valuesrefund · alteration · resolution · cancellation_fee · penalty · other
availability_states4 valuesavailable · booked · owner_block · blocked
channels5 valuesairbnb · vrbo · booking · direct · other
checkin_statuses3 valuesnot_started · started · completed
cleaning_actions4 valuesstatus · arrival · checkout · courtesy
cleaning_statuses4 valuesclean · inspection · dirty · unknown
expense_categories10 valuesCleaning · Utilities · Supplies · Repairs · Management · Insurance · Taxes · Mortgage interest · Furnishing · Other
invoice_statuses8 valuesdraft · ready · sending · accepted · rejected · failed · voided · unknown
payout_statuses4 valuesreceived · expected · overdue · cancelled
registration_statuses5 valuespending · filed · failed · cancelled · not_required
reply_statuses3 valuesunanswered · drafted · replied
reservation_statuses4 valuesconfirmed · cancelled · no_show · pending
review_categories6 valuescleanliness · accuracy · communication · check_in · location · value
severities3 valuesinfo · warn · error
task_statuses4 valuestodo · in_progress · blocked · done
review_scores (a review's category scores on the 0-5 scale of reviews.rating; a category the channel did not ask is absent, never zero) and vocabulary review_categories (cleanliness, accuracy, communication, check_in, location, value). Guest Reviews moves its category scores out of its own d_scores table.review_scores_valid at fail: it reads only the new table, which a 1.1 database does not have (skipped there), so no 1.1 database can fail it.migrations/1.1-to-1.2.sql for a stored 1.1 database. Every board on rental@1 re-pinned to 1.2.0.listings.unit_code, max_guests; reservations.guest_key (the source's opaque guest key, for repeat guests only; never a name, and never in a shared copy) and checkin_status; payouts.status (received, expected, overdue, cancelled; NULL keeps the 1.0 meaning, received); availability.price and min_stay (an open night with no price is "unpriced"); reviews.needs_reply and reply_status.properties (a building's name, time zone, currency, first stay), reservation_units (a stay holding several units or moving between them; money is shared over unit-nights), cleanings, tasks (kind, state and dates only, never the text), guest_registrations (SIRE, TRA, SES Hospedajes, Alloggiati, SIBA filings, never a guest's name, initials or document), filing_incidents, invoices (e-invoices and notes, never the buyer), ledger_months (the host's own books per month and currency) and cancel_reasons (counts per sorted reason).checkin_statuses, payout_statuses, reply_statuses, cleaning_actions, cleaning_statuses, task_statuses, authorities, registration_statuses, invoice_statuses.dates_valid covers the new date columns. New checks at warn: ops_refs_known, ops_values_sane.migrations/1.0-to-1.1.sql for a stored 1.0 database (the library and boards rebuild theirs).listings.tz (local dates and lead time per property), listings.city/country, reservations.booked_on (exports give a date, not a time) and cancelled_on, an adjustments table (refunds, alterations, resolutions, cancellation fees, signed to the host), payouts.channel/reference, an expenses table (from the finance@2 ledger by txn_id, or a file), optional reviews (ratings only), and fx_rates.vocab/expense_categories.csv: Taxes is property taxes only; lodging tax guests paid is never a cost.check_out exclusive, nights = check_out - check_in.billing@1Billing: customers, subscriptions over time, invoices and their lines, payments, refunds and MRRcalendar@1Calendar: events and tracked timecode@1Code: pull requests, reviews, issues, deployments, releases, commits, CI, uptime, dependencies and sprintscommerce@1Commerce: orders, refunds and tax, ticket sales, point-of-sale summaries, supplier costs and partnershipscrm@1CRM: organizations, deals, activities, tickets and survey responsesfinance@2Finance: accounts, balances, transactions, budgets and recurring chargeshealth@1Health: daily body metrics, sleep sessions with stages, workouts, food eaten and body measurements from wearables, scales and health appslegal@1Legal records: entities, contracts, obligations and renewalslibrary@1Library: the books you read, are reading and want to readpeople@1People: team staffing, hiring, time off and scored surveystracker@1Tracker: habits, mood, activities and journal entries you log by handtravel@1Travel: days present in each countryvehicle@1Vehicle: odometer, fuel and charging, and maintenance recordsweb@1Web: search, site traffic, creator audiences, content and campaign performance