Netflix-style multi-profile system with 3-layer architecture: API Gateway → Orchestration → Microservices
View Postman Documentationuser:{user_id}:device:{device_id}:active_profile
This key stores the currently selected profile_id for each user-device combination, enabling per-device profile isolation.
Creates a new profile under the user's account
POST /profiles
POST /profiles
POST /api/profiles
Retrieves all profiles associated with the user's account
GET /profiles
GET /profiles
GET /api/profiles
Retrieves a specific profile by its unique identifier
GET /profiles/{{profile_id}}
GET /profiles/{{profile_id}}
GET /api/profiles/{{profile_id}}
Updates an existing profile's information
PUT /profiles/{{profile_id}}
PUT /profiles/{{profile_id}}
PUT /api/profiles/{{profile_id}}
Permanently removes a profile from the account
DELETE /profiles/{{profile_id}}
DELETE /profiles/{{profile_id}}
DELETE /api/profiles/{{profile_id}}
Sets a profile as the default for the account
GET /profiles/default
GET /profiles/default
PUT /api/profiles/{{profile_id}}
Updates the is_default flag on the profile
Selects a profile to use for the current device session (uses Redis)
POST /profiles/select
POST /profiles/select
POST /api/caching/set
user:{user_id}:device:{device_id}:active_profile
{profile_id}Retrieves the currently active profile for this device (uses Redis + DB)
GET /profiles/active
GET /profiles/active
POST /api/caching/get
user:{user_id}:device:{device_id}:active_profile
Returns the stored profile_id from Redis
GET /api/profiles/{{profile_id}}
Fetches full profile details using the cached profile_id
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────────┐ ┌─────────────────────────┐
│ │ │ │ │ │ │ │
│ Mobile App │───▶│ API Gateway │───▶│ Customer Account │───▶│ Services (Layer 3) │
│ / Web Client │ │ (Layer 1) │ │ (Layer 2) │ │ │
│ │ │ PUBLIC │ │ INTERNAL │ │ INTERNAL │
└─────────────────┘ └──────────────────┘ └──────────────────────┘ └─────────────────────────┘
═══════════════════════════════════════════════════════════════════════════════════════════════════════
SELECT PROFILE FLOW
═══════════════════════════════════════════════════════════════════════════════════════════════════════
│ POST /profiles/select │ │ │
│ { profile_id: "xyz" } │ │ │
│ ─────────────────────────▶ │ │
│ │ POST /profiles/select │ │
│ │ ──────────────────────▶ │
│ │ │ POST /api/caching/set │
│ │ │ Key: user:123:device:abc: │
│ │ │ active_profile │
│ │ │ Value: "xyz" │
│ │ │ ────────────────────────────▶ [Caching Service]
│ │ │ │
│ { success: true } │ ◀───── Response ──────│ │
│ ◀────────────────────────│ │ │
═══════════════════════════════════════════════════════════════════════════════════════════════════════
GET ACTIVE PROFILE FLOW
═══════════════════════════════════════════════════════════════════════════════════════════════════════
│ GET /profiles/active │ │ │
│ ─────────────────────────▶ │ │
│ │ GET /profiles/active │ │
│ │ ──────────────────────▶ │
│ │ │ 1. POST /api/caching/get │
│ │ │ Key: user:123:device: │
│ │ │ abc:active_profile│
│ │ │ ────────────────────────────▶ [Caching Service]
│ │ │ ◀────── Returns: "xyz" │
│ │ │ │
│ │ │ 2. GET /api/profiles/xyz │
│ │ │ ────────────────────────────▶ [Customer User Service]
│ │ │ ◀────── Returns profile │
│ │ │ │
│ { profile: {...} } │ ◀───── Response ──────│ │
│ ◀────────────────────────│ │ │
User "John" (user_id: 123) has 3 profiles:
Active profiles by device:
Public entry point for all profile requests. Handles routing and authentication.
Orchestrates profile operations and coordinates caching with DB operations.
Handles profile CRUD operations and stores profile data in the database.
Redis-backed service for fast profile selection storage per user-device.
Orchestra Internal API Mapping - Multiple Profile Management Module
Last Updated: December 2025