Skip to content

Policy Admin

The configuration backbone — manages parties, accounts, products, plan designs, rule sets, and market profiles used by Enrollment and other services.

Overview

Policy Admin is the system of record for all insurance product configuration. It defines what products exist, what benefit rules apply at each version, and how those products are structured for different market segments. All other services that need to know "what does this plan cover and at what rate?" consult Policy Admin.

The service models a clear hierarchy: a Party is any person or organisation (member, employer, provider, broker). An Account groups parties for billing and relationship management. A Product represents an insurance product line with versioned ProductVersion records. Each version carries RuleSet and Rule records consumed by the Enrollment rule engine. MarketProfile records capture market segment-specific overrides. FieldDefinition records describe configurable fields for product versions, enabling flexible product design without schema changes.

Responsibilities

  • Manage the party master (individuals, organisations, groups) and their roles
  • Manage accounts and account contacts
  • Define and version insurance products with activation/deactivation lifecycle
  • Manage rule sets and individual rules per product version for underwriting enforcement
  • Support config bundle deployment (validate → deploy) for packaged product releases
  • Manage market profiles with versioned configurations per market segment
  • Define field definitions for configurable product attributes
  • Serve internal lookups for rule sets, parties, market profiles, and field definitions

Database

Schema: policy_admin

TablePurpose
partiesPerson and organisation records (members, employers, brokers, providers)
party_rolesRole assignments linking parties to accounts (contact, subscriber, dependent)
accountsAccount records grouping parties for billing and management
productsInsurance product definitions
product_versionsVersioned snapshots of product configuration
rule_setsNamed collections of underwriting rules per product version
rulesIndividual rule conditions and outcomes
rule_evaluationsAudit log of rule evaluation results
market_profilesMarket segment configurations
field_definitionsConfigurable field specifications per product version

API Routes

MethodPathAuthDescription
POST/partiesJWTCreate a party
GET/partiesJWTList parties
GET/parties/{locator}JWTGet party by locator
PATCH/parties/{locator}JWTUpdate party details
GET/parties/{locator}/rolesJWTList roles for a party
POST/accountsJWTCreate an account
GET/accountsJWTList accounts
GET/accounts/{locator}JWTGet account by locator
PATCH/accounts/{locator}JWTUpdate account
PATCH/accounts/{locator}/billing-levelJWTSet billing level
POST/accounts/{locator}/contactsJWTAdd a contact to an account
GET/accounts/{locator}/contactsJWTList contacts for an account
PATCH/accounts/{locator}/contacts/{contactLocator}JWTUpdate a contact
DELETE/accounts/{locator}/contacts/{contactLocator}JWTRemove a contact
POST/accounts/{locator}/number/generateJWTGenerate account display number
POST/productsJWTCreate a product
GET/productsJWTList products
GET/products/{locator}JWTGet product by locator
PATCH/products/{locator}JWTUpdate product
PATCH/products/{locator}/activateJWTActivate a product
PATCH/products/{locator}/deactivateJWTDeactivate a product
POST/products/{locator}/versionsJWTCreate a product version
GET/products/{locator}/versions/{version}JWTGet a specific product version
GET/products/{locator}/versionsJWTList product versions
PATCH/products/{locator}/versions/{version}JWTUpdate a version
PATCH/products/{locator}/versions/{version}/publishJWTPublish a version
POST/products/{locator}/versions/{version}/rule-setsJWTCreate a rule set
GET/products/{locator}/versions/{version}/rule-setsJWTList rule sets for a version
GET/products/{locator}/versions/{version}/rule-sets/{name}JWTGet a named rule set
PUT/products/{locator}/versions/{version}/rule-sets/{name}/rulesJWTReplace all rules in a rule set
PATCH/rules/{locator}JWTUpdate a single rule
POST/config/validateJWTValidate a config bundle
POST/config/deployJWTDeploy a config bundle
GET/config/{productLocator}/versions/{version}/downloadJWTDownload a config bundle
GET/market-profilesJWTList market profiles
POST/market-profilesJWTCreate a market profile
GET/market-profiles/{code}JWTGet market profile by code
GET/market-profiles/{code}/versions/{version}JWTGet a market profile version
PATCH/market-profiles/{code}/versions/{version}/publishJWTPublish a market profile version
GET/internal/products/{productLocator}/versions/{version}/rulesets/{name}InternalFetch rule set for Enrollment
GET/internal/parties/{locator}InternalFetch party for Notifications
GET/internal/market-profiles/{code}/currentInternalFetch current market profile
GET/internal/product-versions/{id}/fieldsInternalFetch field definitions for a version

Events

Publishes

Policy Admin does not publish Kafka events.

Consumes

Policy Admin does not consume Kafka events.

Dependencies

Policy Admin has no runtime service dependencies. It is a dependency of Enrollment, Claims, Billing, Provider, Notifications, Broker API, and Group Scheme Service.

Key Design Decisions

Config bundle deployment: Rather than editing rules and product attributes through individual API calls, operators can assemble a full configuration bundle (product + versions + rule sets) as a YAML/JSON document, validate it via POST /config/validate, then atomically deploy it with POST /config/deploy. This makes product releases reproducible and auditable.

Versioned products: Product configuration is immutable once a version is published. Enrollment always references a specific ProductVersion, ensuring that in-force policies are always adjudicated against the rules that were in effect when they were underwritten.

Olly Health Insurance Platform