Status & Lifecycle
Entity statuses, state transitions, and their implications
Status & Lifecycle
Overview
Entities in VRPlatform have statuses that control their behavior, visibility, and available operations. Understanding status transitions helps you:
- Build reliable integrations
- Handle edge cases properly
- Understand why certain operations may be blocked
Entity Status Summary
| Entity | Statuses | Key Constraint |
|---|---|---|
| Listing | active, inactive | Cannot deactivate if in closed period |
| Reservation | booked, canceled, inactive | Cancel blocked if in closed period |
| Transaction | active, inactive | Cannot change if in closed period |
| Contact | active, inactive | None |
| Account | active, inactive | Cannot deactivate if has locked entries |
| Owner Statement | draft, inReview, void, published | Status can only move forward |
| Connection | active, inactive | None |
Listings
| Status | Description | Included In |
|---|---|---|
active | Property is operational | Reports, statements, calculations |
inactive | Property is disabled | Excluded from everything |
Lifecycle:
active ⟷ inactiveTransition Rules:
- Cannot deactivate if transactions exist before books closed date
- Can schedule deactivation via ownership period
setListingInactive
Deactivation Variants:
disable-upcoming- Will deactivate when ownership endsdisabled-ending- Inactive due to ownership endingdisabled-forever- Permanently inactive
Reservations
| Status | Description | Financial Impact |
|---|---|---|
booked | Confirmed reservation | Full revenue recognition |
canceled | Guest canceled | Revenue marked inactive, AR cleared |
inactive | Excluded entirely | No financial impact |
Lifecycle:
booked ⟷ canceled
↓
inactiveTransition Rules:
- Cannot cancel/uncancel if reservation is in closed period
- Cannot cancel/uncancel if attached to owner statement
- Canceling marks revenue entries as inactive
- Uncanceling reactivates revenue entries
Canceled Behavior:
- Payment lines become inactive (not counted in revenue)
- Adjustments remain active (visible on guest folio)
- AR is cleared
Transactions
| Status | Description |
|---|---|
active | Normal transaction, included in all calculations |
inactive | Archived, excluded from calculations |
Lifecycle:
active ⟷ inactiveTransition Rules:
- Cannot change status if transaction date is before books closed
- Cannot change status if attached to owner statement
Archive/Unarchive:
POST /transactions/{id}/archive
POST /transactions/{id}/unarchiveContacts
| Status | Description |
|---|---|
active | Contact is in use |
inactive | Contact is disabled |
Lifecycle:
active ⟷ inactiveTransition Rules:
- No restrictions on status changes
- Inactive contacts can still appear in historical data
Accounts
| Status | Description |
|---|---|
active | Account is operational |
inactive | Account is disabled |
Lifecycle:
active ⟷ inactiveTransition Rules:
- Cannot deactivate if account has entries in closed period
- Cannot deactivate if account has entries attached to statements
- Cannot deactivate if account is assigned to system function
Owner Statements
| Status | Description | Data Locked |
|---|---|---|
draft | Being prepared, not persisted | No |
inReview | Saved, ready for review | Yes |
void | Canceled/superseded | Yes |
published | Finalized and sent | Yes |
Lifecycle:
draft → inReview → published
↓
voidTransition Rules:
- Can only move forward in the lifecycle (no "unpublishing")
- Once saved (inReview or later), underlying data is locked
- Void is for statements that shouldn't be used but need to be preserved
Status Priority: When multiple statements exist for the same period, priority determines which is authoritative:
- published (highest)
- inReview
- void
- draft (lowest)
Payment Status (Expenses)
Expense transactions track payment separately from status:
| Payment Status | Description |
|---|---|
unpaid | Bill recorded, no payment |
underpaid | Partial payment made |
paid | Fully paid |
overpaid | Excess payment made |
Calculation:
If payment = 0 → unpaid
If payment < total → underpaid
If payment = total → paid
If payment > total → overpaidRecording Payment:
PUT /transactions/{id}
{
"paidStatus": "paid",
"paidAt": "2024-06-15",
"paymentAccountId": "bank-account-123"
}Connections
| Status | Description |
|---|---|
active | Connection is operational, syncing |
inactive | Connection is disabled |
Error States:
Connections can also have isErrorState: true when:
- Credentials expired
- API limits reached
- External service unavailable
Status Change API Patterns
Direct Update:
PUT /{entity}/{id}
{
"status": "inactive"
}Archive/Unarchive:
POST /{entity}/{id}/archive
POST /{entity}/{id}/unarchiveCancel/Uncancel (Reservations):
POST /reservations/{id}/cancel
POST /reservations/{id}/uncancelError Handling
When status changes are blocked, the API returns:
- Error code indicating the reason
- Context about what's blocking the change
Common blocking reasons:
locked_period- Data is in closed periodattached_to_statement- Data is attached to owner statementhas_locked_entries- Account has locked entries
Related Topics
- Locking - Understanding lock constraints
- Listings - Property lifecycle
- Reservations - Booking lifecycle
- Transactions - Transaction lifecycle
- Owner Statements - Statement lifecycle
- Data Integrity - Validation and issues
