Product modules overview

Configure Root for your insurance product

Overview

Being a digital insurance platform, Root abstracts most of the functionality required to issue and administer policies, making it easy to launch new insurance products fast. Most Root platform features are "standard" - they work out-of-the-box and do not need to be configured for each individual insurance product.

At the same time, Root offers the flexibility to configure product-specific requirements. For example, each product will have distinct rating factors, pricing logic, policy documents, and claim information requirements. These are defined within your product modules features guide.

On Root, the term "product module" refers to the set of configurable features that are tied to a specific insurance product. These features interact with and depend on the standard, non-configurable platform features. This is similar to how a video game interacts with a video game console, or a software application interacts with an operating system.

You can configure your product module using the Root Workbench.

Product module definition

The specific configuration and code that exists at a given point in time is called a product module definition.

When you make changes to your product module (for example, by using the Workbench CLI rp push command), a new minor version of the definition is created. When these changes are published to production, a new major version is created. (Live vs draft version)

Live vs. draft version of a product module definition

Every time a new change is pushed to a product module (e.g., via the Workbench CLI rp push command or Dashboard), a new minor version of the product module definition is created. For example, version 1.2 will be created from version 1.1. When draft changes are published (Workbench CLI rp publish) to live, the platform performs a major version bump. The version currently in draft is promoted to the new live version (e.g., 2.0), and a new latest draft is automatically initialised starting at the next minor increment (e.g., 2.1).

Testing draft (Sandbox mode)

The draft product module definition allows you to test logic changes safely before they affect production policies.

  • Dashboard: You can select "Latest draft" in the version dropdown when issuing a new policy in a sandbox environment.
  • API: When creating a quote, you can specify using the draft version by adding ?version=draft to the creating a quote.
📘

The quote determines the version (Live vs Draft)

The ?version=draft parameter is only used when creating a quote. Once a quote is created, it is marked as being on either the Live version or Draft version. This version definition is inherited by the resulting application and policy. You cannot switch a policy from the draft to live (or vice versa).

Environment Constraints - Sandbox vs Production

  • Sandbox: You can issue policies using either the Live or Latest draft version.
  • Production: Only the Live version can be used.
🚧

?version=draft in production

Attempting to create a quote with ?version=draft in a production environment will return a 400 Bad Request error.

Automatic Updates (Latest version)

Policies do not pin to a specific version id (eg. v2.0 or v2.5). Instead, they follow latest.

  • Live Policies: Whenever a new version is published (e.g., v3.0), all policies on the Live version will immediately start using the new v3.0 logic for all subsequent lifecycle hooks (eg. afterPaymentSuccess, afterAlterationPackageApplied).
  • Draft Policies: These policies always execute against the latest available draft in sandbox. As you rp push new code changes (v3.1, v3.2), these policies will automatically use the latest logic.

AI Context API

🧪

Beta feature

The AI Context API is currently in beta. While the endpoints are stable and actively maintained, the documentation content and structure may evolve as we gather feedback and improve coverage.

If you encounter any issues or have suggestions for improvements, please contact us at [email protected].

Root provides programmatic access to comprehensive product module documentation through AI Context API endpoints. These endpoints are designed for AI assistants, development tools, and automated systems that need to access Root's complete configuration reference, code patterns, and guides.

Available endpoints

Get complete AI context

GET /v1/insurance/docs/ai-context

Returns the complete product module documentation as a single text document, including:

  • Configuration guide (.root-config.json reference)
  • Product module code patterns and hooks
  • Schema form definitions (quote & application)
  • Claim workflow blocks
  • Workbench CLI commands
  • Embed iframe configuration

Response: text/plain; charset=utf-8
Cache: public, max-age=3600

curl https://api.rootplatform.com/v1/insurance/docs/ai-context

Get specific documentation section

GET /v1/insurance/docs/ai-context/:section

Returns a specific documentation section. Available sections:

  • configuration-guide - Complete .root-config.json reference
  • product-module-code - Code patterns, hooks, actions, and Root SDK
  • schema-form - Quote and application schema validation
  • claim-blocks - Claim workflow block definitions
  • workbench-cli - CLI commands and usage
  • embed-config - Embed iframe configuration

Response: text/plain; charset=utf-8

# Get only the configuration guide
curl https://api.rootplatform.com/v1/insurance/docs/ai-context/configuration-guide

# Get only the code guide
curl https://api.rootplatform.com/v1/insurance/docs/ai-context/product-module-code

Use cases

For AI assistants:

  • Load complete context for product module development assistance
  • Fetch specific sections for targeted queries to reduce token usage
  • Access up-to-date documentation programmatically

For development tools:

  • Integrate documentation into IDEs and editors
  • Build automated validation tools
  • Generate code snippets and templates

For documentation systems:

  • Keep external documentation in sync
  • Generate formatted documentation from source
  • Build searchable documentation indexes
📘

Caching

All AI Context API endpoints are cached for 1 hour on the server to ensure optimal performance.