Service Layer medium complexity mobile
2
Dependencies
1
Dependents
1
Entities
0
Integrations

Description

Orchestrates the organization selection business logic including fetching the active org list, validating that the selected org is active and accessible, performing a shallow org-profile fetch before committing the selection, and coordinating the handoff to the tenant context service. Handles edge cases such as an org being deactivated between list load and selection.

Feature: Organization Selection & Onboarding

org-selection-service

Responsibilities

  • Fetch and return the list of active partner organizations
  • Validate that a selected org is active before proceeding
  • Perform shallow org-profile fetch to confirm availability
  • Delegate tenant seeding to TenantContextService on success
  • Handle and propagate fetch or validation errors

Interfaces

getAvailableOrganizations() -> Future<List<Organization>>
selectOrganization(String orgId) -> Future<SelectionResult>
validateOrgIsActive(String orgId) -> Future<bool>
fetchOrgProfile(String orgId) -> Future<OrgProfile>

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component

API Contract

View full contract →
REST /api/v1/organizations 8 endpoints
GET /api/v1/organizations
GET /api/v1/organizations/:id
POST /api/v1/organizations
PUT /api/v1/organizations/:id
DELETE /api/v1/organizations/:id
GET /api/v1/organizations/selection
+2 more