tickets_update_individual) are dual-written to both PostgreSQL and Firestore.
List Event Tickets
tickets_list_event returns every ticket row for a given event from the PostgreSQL tickets table.
Request Parameters
The event ID to list tickets for. Matches the
event_id column in the tickets table.Response Fields
true when at least one ticket was found.Array of ticket rows. Each row contains all columns from the
tickets table including ticket_id, seat_id, zone, color, status, access_status, access_entry, customer_id, customer_name, customer_email, ledger, date_start, date_end, date_created, and date_updated.Get Individual Ticket
tickets_individual fetches a single ticket by its ticket_id.
Request Parameters
The full composite ticket ID in the format
{event_id}-{firestoreDocId}.Response Fields
true when the ticket was found.Single-element array containing the complete ticket row from PostgreSQL.
Update Individual Ticket
tickets_update_individual updates the status field of a ticket and appends an updated entry to the ledger. The change is written to both PostgreSQL and Firestore.
Request Parameters
Full composite ticket ID (
{event_id}-{firestoreDocId}). The function splits this on - to derive the Firestore path events/{event_id}/tickets/{docId}.The new status value for the ticket.
true = available, false = sold/unavailable.What gets updated
| Store | Fields written |
|---|---|
PostgreSQL tickets | status, ledger, date_updated |
Firestore events/{id}/tickets/{docId} | status, date.updated, ledger |
The ledger entry appended by this function uses the action
"accessed" (as written in the PostgreSQL update string). This is distinct from the access control "accessed" action — it means the ticket record was accessed/modified administratively.Sales View: List Event Tickets with Block Status
tickets_list_event_sales returns tickets with a computed status that accounts for both the sold state (status) and any active hold in the tickets_blocked table.
Response Fields
Computed availability:
false if the ticket is blocked (status_d) OR already sold (!status). true only if the ticket is both unblocked and unsold.The raw
status column value from the tickets table, before the block calculation.true when the ticket is currently assigned to an offline office and not available for online sale.