<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1063935717132479&amp;ev=PageView&amp;noscript=1 https://www.facebook.com/tr?id=1063935717132479&amp;ev=PageView&amp;noscript=1 "> The Course Data

The Course Data

Overview

Throughout this course, you’ll work on the API for a fictional insurance company. It holds two kinds of data:

  • Policyholders: the company’s customers
  • Policies: the insurance each policyholder owns (auto, home, life, or renters)

This page shows the data the API starts with, so you know what to expect before writing a query. Field names are shown exactly as you’d use them in a query.

Policyholders

id name email
ph1 Maria Alvarez maria.alvarez@example.com
ph2 James Okafor james.okafor@example.com
ph3 Priya Raman priya.raman@example.com

Policies

policyNumber type monthlyPremium effectiveDate riskTier policyholder
AUTO-100001 AUTO 142.50 2025-01-15 MEDIUM Maria Alvarez
HOME-100002 HOME 98.00 2024-06-01 LOW Maria Alvarez
AUTO-100003 AUTO 210.75 2025-03-10 HIGH James Okafor
LIFE-100004 LIFE 45.00 2023-11-20 LOW Priya Raman
RENTERS-100005 RENTERS 18.25 2025-08-01 MEDIUM Priya Raman

Each policy also has an id (p1 through p5, in the order above).

How the data is connected

Each policy belongs to one policyholder, and a policyholder can have several policies. Maria Alvarez, for example, has both an auto and a home policy.

ph1 Maria Alvarez owns p1 AUTO-100001 and p2 HOME-100002. ph2 James Okafor owns p3 AUTO-100003. ph3 Priya Raman owns p4 LIFE-100004 and p5 RENTERS-100005.
Which policyholder owns which policy.

In a query, you follow that connection with nested fields: from a policy to its policyholder, or from a policyholder to their policies. You’ll do this in Writing Queries.

Good to know

  • Your changes are saved. Policies you add or change are written to services/policies/data.json, and claims to services/policies/claims.json, so they’re still there after the server restarts. To go back to the starting data, stop the server, run npm run reset-data in services/policies, and start it again.
  • monthlyPremium is in US dollars. The API returns it as a number, so trailing zeros are dropped: 210.75 comes back as 210.75, but 98.00 comes back as 98.