svc-guest-profiles¶
NovaTrek Adventures - Guest Profiles Service | Guest Identity | v2.4.0 | NovaTrek Platform Engineering
Manages guest registration, profile management, preferences, medical
Swagger UI Download OpenAPI Spec
Integration Context¶
Data Store¶
Overview¶
| Property | Detail |
|---|---|
| Engine | PostgreSQL 15 |
| Schema | guests |
| Tables | guest_profiles, certifications, medical_info, emergency_contacts, adventure_history |
| Estimated Volume | ~800 new profiles/day peak season |
| Connection Pool | min 10 / max 30 / idle timeout 10min |
| Backup Strategy | Continuous WAL archiving, daily base backup, 90-day PITR (GDPR) |
Key Features¶
- PII encrypted at rest (AES-256)
- Composite index on (last_name, date_of_birth)
- Soft delete with GDPR data retention policy
Table Reference¶
guest_profiles¶
Core guest identity records with PII encryption
| Column | Type | Constraints |
|---|---|---|
guest_id | UUID | PK |
first_name | VARCHAR(100) | NOT NULL, ENCRYPTED |
last_name | VARCHAR(100) | NOT NULL, ENCRYPTED |
email | VARCHAR(255) | NOT NULL, UNIQUE, ENCRYPTED |
phone | VARCHAR(30) | NULL, ENCRYPTED |
date_of_birth | DATE | NOT NULL |
loyalty_tier | VARCHAR(20) | DEFAULT 'bronze' |
identity_verified | BOOLEAN | NOT NULL, DEFAULT FALSE |
deleted_at | TIMESTAMPTZ | NULL (soft delete) |
created_at | TIMESTAMPTZ | NOT NULL |
updated_at | TIMESTAMPTZ | NOT NULL |
Indexes:
idx_guest_emailonemail(UNIQUE)idx_guest_name_dobonlast_name, date_of_birthidx_guest_loyaltyonloyalty_tier
certifications¶
Guest adventure certifications (scuba, climbing, etc.)
| Column | Type | Constraints |
|---|---|---|
cert_id | UUID | PK |
guest_id | UUID | NOT NULL, FK -> guest_profiles |
cert_type | VARCHAR(50) | NOT NULL |
issuer | VARCHAR(100) | NOT NULL |
issued_date | DATE | NOT NULL |
expiry_date | DATE | NULL |
document_url | TEXT | NULL |
Indexes:
idx_cert_guestonguest_ididx_cert_expiryonexpiry_date
medical_info¶
Guest medical conditions and allergy records (encrypted PII)
| Column | Type | Constraints |
|---|---|---|
medical_id | UUID | PK |
guest_id | UUID | NOT NULL, FK -> guest_profiles |
conditions | JSONB | ENCRYPTED |
allergies | JSONB | ENCRYPTED |
emergency_medications | JSONB | ENCRYPTED |
updated_at | TIMESTAMPTZ | NOT NULL |
Indexes:
idx_medical_guestonguest_id(UNIQUE)
emergency_contacts¶
Emergency contact information for each guest
| Column | Type | Constraints |
|---|---|---|
contact_id | UUID | PK |
guest_id | UUID | NOT NULL, FK -> guest_profiles |
name | VARCHAR(200) | NOT NULL, ENCRYPTED |
phone | VARCHAR(30) | NOT NULL, ENCRYPTED |
relationship | VARCHAR(50) | NOT NULL |
is_primary | BOOLEAN | NOT NULL, DEFAULT TRUE |
Indexes:
idx_emg_guestonguest_id
adventure_history¶
Record of completed adventures per guest for profile display
| Column | Type | Constraints |
|---|---|---|
history_id | UUID | PK |
guest_id | UUID | NOT NULL, FK -> guest_profiles |
trip_id | UUID | NOT NULL |
trip_date | DATE | NOT NULL |
adventure_category | VARCHAR(50) | NOT NULL |
rating | SMALLINT | NULL, CHECK (1-5) |
completed_at | TIMESTAMPTZ | NOT NULL |
Indexes:
idx_hist_guestonguest_id, trip_date DESC
Solutions Affecting This Service¶
| Ticket | Solution | Capabilities | Date |
|---|---|---|---|
| NTK-10008 | Guest Reviews and Ratings Platform | CAP-1.7, CAP-1.2 | 2026-03-06 |
Endpoints (9 total)¶
GET /guests -- Search guests¶
Search and filter the guest registry. Supports partial name matching,
POST /guests -- Register a new guest¶
Create a new guest profile. The email address must be unique across
GET /guests/{guest_id} -- Get guest profile¶
Retrieve the full profile for a specific guest by ID.
PATCH /guests/{guest_id} -- Update guest profile¶
Partially update a guest profile. Only the fields provided in the
GET /guests/{guest_id}/certifications -- List guest certifications¶
Retrieve all certifications on file for a guest, including expired
POST /guests/{guest_id}/certifications -- Add a certification¶
Record a new certification for a guest. Certification documents
GET /guests/{guest_id}/medical-info -- Get guest medical information¶
Retrieve the medical information on file for a guest. Access to this
PUT /guests/{guest_id}/medical-info -- Update guest medical information¶
Replace the medical information record for a guest. This is a full
GET /guests/{guest_id}/adventure-history -- Get guest adventure history¶
Retrieve the adventure participation history for a guest. Each entry
Consuming Applications¶
| Application | Screens Using This Service |
|---|---|
| Guest Portal | Booking Flow, Guest Profile, Waiver Signing |
| Operations Dashboard | Check-In Station, Safety Incident Board |
| Adventure App | Self Check-In, Earn Loyalty Points |
Events Published¶
| Event | Channel | Trigger | Consumers |
|---|---|---|---|
guest.registered | novatrek.guest-identity.guest.registered | POST /guests | svc-loyalty-rewards, svc-analytics |