> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprescience.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Give one plan, get Diamond and Value on top of it

> Send a census and one plan you priced per covered person per month (`pmpm_cents`); get Prescience Diamond and Prescience Value on top of it. Each has your plan's price (`your_plan_pmpm_cents`) plus Prescience's (`prescience_pmpm_cents`) = `pmpm_cents`, the monthly total, your plan's deductible, the member out-of-pocket maximum and the most extra the company pays if every employee reaches it. Anything defaulted (family deductible and out-of-pocket at twice the individual one, ZIP, company) is listed in `assumptions`. `fields` and `exclude` in the body trim the answer. A plan that can't be built on answers `200` with `status: unavailable` and the reason; while pricing runs the answer is `202` with `retry_after_seconds`: send the same body again.



## OpenAPI

````yaml /api-reference/openapi.json post /price-on-plan
openapi: 3.1.0
info:
  title: Prescience Partner API
  version: 1.1.0
  description: >-
    Create employer groups, submit census records, generate preliminary
    market-rate quotes, create iframe sessions, create enrollments, and read
    aggregate account data.


    Money is always integer cents. Dates are `YYYY-MM-DD`; timestamps are ISO
    8601 UTC. Final pricing, eligibility, network availability, and plan
    documents are confirmed during underwriting and onboarding. A BAA and data
    processing agreement are executed before live mode is enabled.


    Field names: broker keys send and receive snake_case (camelCase requests are
    still accepted). HR platform partners use camelCase. Where an operation
    serves both, the broker schema comes first and the camelCase one second.
  contact:
    name: Prescience partner engineering
    email: partners@getprescience.com
servers:
  - url: https://www.getprescience.com/api/partner/v1
    description: >-
      Production. Test and live traffic share this host; mode comes from your
      API key.
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Connectivity and key checks.
  - name: Plans
    description: Static plan metadata.
  - name: Groups
    description: 'Employer groups: the root resource of every integration.'
  - name: Census
    description: Pre-enrollment census intake and ongoing member sync.
  - name: Quotes
    description: >-
      Preliminary quotes built from the stored census and current local
      market-plan snapshot.
  - name: Enrollments
    description: Plan selection and employer provisioning.
  - name: Account
    description: Aggregate, de-identified employer account data.
  - name: Brokers
    description: >-
      Quoting for brokers, the MCP server, and elections for partner-run
      enrollment.
  - name: Webhooks
    description: Signed event delivery (standard-webhooks scheme).
paths:
  /price-on-plan:
    post:
      tags:
        - Quotes
      summary: Give one plan, get Diamond and Value on top of it
      description: >-
        Send a census and one plan you priced per covered person per month
        (`pmpm_cents`); get Prescience Diamond and Prescience Value on top of
        it. Each has your plan's price (`your_plan_pmpm_cents`) plus
        Prescience's (`prescience_pmpm_cents`) = `pmpm_cents`, the monthly
        total, your plan's deductible, the member out-of-pocket maximum and the
        most extra the company pays if every employee reaches it. Anything
        defaulted (family deductible and out-of-pocket at twice the individual
        one, ZIP, company) is listed in `assumptions`. `fields` and `exclude` in
        the body trim the answer. A plan that can't be built on answers `200`
        with `status: unavailable` and the reason; while pricing runs the answer
        is `202` with `retry_after_seconds`: send the same body again.
      operationId: priceOnPlan
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PriceOnPlanRequest'
            example:
              census:
                - first_name: Ada
                  last_name: Reyes
                  dob: '1991-04-02'
                  zip: '94110'
              plan:
                carrier: Example Carrier
                plan_name: Catastrophic HDHP
                plan_type: PPO
                hsa_eligible: true
                deductible_individual_cents: 700000
                oop_max_individual_cents: 900000
                pmpm_cents: 42000
      responses:
        '200':
          description: >-
            The plan can't be built on (an HMO, not HSA-eligible, incomplete):
            `status: unavailable` with the reason and `ignored_plans`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceOnPlanResponse'
        '201':
          description: Both versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceOnPlanResponse'
              example:
                quote_id: qt_5b9e2c7f10ad
                status: ready
                group_id: grp_8c2f41d09a3e
                plans:
                  - id: diamond
                    plan_name: Prescience Diamond
                    status: ready
                    your_plan_pmpm_cents: 42000
                    prescience_pmpm_cents: 18000
                    pmpm_cents: 60000
                    monthly_premium_cents: 60000
                    prescience_monthly_cents: 18000
                    deductible_cents: 700000
                    oop_max_cents: 900000
                    max_extra_cents: 450000
                assumptions:
                  - >-
                    No company was sent, so the census is kept under a generated
                    company.
        '202':
          description: Still pricing; send the same body again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotePending'
        '400':
          description: >-
            The request failed validation (for example an HMO or a plan that is
            not HSA-eligible).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          description: Prescience couldn't price this plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Any non-empty string; deterministic keys from your own IDs work best.
        Repeating the same key with the same body on the same endpoint and mode
        within 24 hours returns the stored successful response (with
        `Idempotent-Replay: true`) instead of re-executing. Error responses are
        not stored.
      schema:
        type: string
      example: 9f3b2c61-4a8d-4e2f-b1c7-d5a90e8f1a23
  schemas:
    PriceOnPlanRequest:
      type: object
      required:
        - census
        - plan
      properties:
        census:
          type: array
          description: >-
            Members, as in `PUT /groups/{groupId}/census`. Time Machine needs
            it.
          items:
            $ref: '#/components/schemas/BrokerCensusMemberInput'
        plan:
          type: object
          description: >-
            The one plan to price Prescience on. It must be HSA-eligible and a
            PPO, EPO or POS plan; an HMO is rejected. Money is integer cents.
          required:
            - plan_type
            - hsa_eligible
            - deductible_individual_cents
            - oop_max_individual_cents
          properties:
            carrier:
              type: string
            plan_name:
              type: string
            plan_type:
              type: string
              enum:
                - PPO
                - EPO
                - POS
            network:
              type: string
            hsa_eligible:
              type: boolean
              description: Must be true.
            deductible_individual_cents:
              type: integer
            deductible_family_cents:
              type: integer
              description: Twice the individual deductible when omitted.
            oop_max_individual_cents:
              type: integer
            oop_max_family_cents:
              type: integer
              description: Twice the individual out-of-pocket maximum when omitted.
            pmpm_cents:
              type: integer
              description: >-
                The plan's monthly price per covered person. A household costs
                this times the people on it. Required unless
                `monthly_rates_cents` is sent.
            monthly_rates_cents:
              type: object
              description: >-
                Monthly premium for one household of each shape, used only when
                neither `member_rates_cents` nor `pmpm_cents` is sent.
              properties:
                employee_only:
                  type: integer
                employee_spouse:
                  type: integer
                employee_children:
                  type: integer
                family:
                  type: integer
            member_rates_cents:
              type: array
              maxItems: 10000
              description: >-
                Exact monthly rate for each employee's household (the employee
                and covered dependents), by the employee's census `external_id`.
                Small-group rates are age-rated, so this is the preferred basis.
                Employees missing from it fall back to `pmpm_cents` or
                `monthly_rates_cents`.
              items:
                type: object
                required:
                  - external_id
                  - monthly_cents
                properties:
                  external_id:
                    type: string
                  monthly_cents:
                    type: integer
        company:
          type: object
          description: Optional. Without it the census is kept under a generated company.
          properties:
            name:
              type: string
            domain:
              type: string
            external_id:
              type: string
            zip:
              type: string
              description: 5 digits; the first census ZIP when omitted.
            state:
              type: string
        market_plans:
          type: array
          maxItems: 500
          items:
            $ref: '#/components/schemas/BrokerPlan'
          description: >-
            Optional: every plan you quoted. With a platinum PPO among them,
            `pricing_method` is `engine`.
    PriceOnPlanResponse:
      type: object
      description: >-
        Both plans, or `status: unavailable` with a `reason` when the plan can't
        be built on (a `200`, not an error).
      properties:
        quote_id:
          type: string
        group_id:
          type: string
        status:
          type: string
          enum:
            - ready
            - in_review
            - unavailable
        reason:
          type: string
        plans:
          type: array
          items:
            type: object
            required:
              - id
              - plan_name
              - status
            properties:
              id:
                type: string
                enum:
                  - diamond
                  - value
              plan_name:
                type: string
              status:
                type: string
                enum:
                  - ready
                  - in_review
                  - unavailable
              reason:
                type: string
              your_plan_pmpm_cents:
                type: integer
                description: Your plan's price per covered person per month.
              prescience_pmpm_cents:
                type: integer
                description: What Prescience adds, per covered person per month.
              pmpm_cents:
                type: integer
                description: 'The total: `your_plan_pmpm_cents + prescience_pmpm_cents`.'
              monthly_premium_cents:
                type: integer
                description: The group's monthly total for the joint plan.
              prescience_monthly_cents:
                type: integer
                description: >-
                  What Prescience alone costs per month; your plan's own premium
                  is paid to its carrier.
              deductible_cents:
                type: integer
                description: Your plan's deductible.
              oop_max_cents:
                type: integer
                description: The member's out-of-pocket maximum.
              max_extra_cents:
                type: integer
                description: >-
                  The most extra the company pays if every employee reaches that
                  maximum: a modeled scenario, not a contractual cap or
                  guarantee.
        assumptions:
          type: array
          items:
            type: string
          description: Everything defaulted or assumed, in words.
        ignored_plans:
          type: array
          items:
            $ref: '#/components/schemas/IgnoredPlan'
    QuotePending:
      type: object
      required:
        - status
        - retry_after_seconds
      description: >-
        Pricing is still running. Wait `retry_after_seconds`, then send the same
        request again.
      properties:
        status:
          type: string
          const: pricing
        group_id:
          type: string
        retry_after_seconds:
          type: integer
        message:
          type: string
        ignored_plans:
          type: array
          description: Plans you sent that were skipped, and why.
          items:
            $ref: '#/components/schemas/IgnoredPlan'
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          enum:
            - invalid_request
            - unauthorized
            - live_mode_disabled
            - forbidden
            - not_found
            - conflict
            - rates_pending
            - quote_expired
            - market_unavailable
            - census_required
            - rate_limited
            - server_error
            - not_configured
            - email_not_allowed
            - verification_failed
          description: >-
            Stable machine-readable error code. `email_not_allowed` and
            `verification_failed` come only from the iframe's own endpoints,
            which partners do not call.
        message:
          type: string
          description: >-
            Human-readable explanation. Wording may change; branch on `error`,
            not `message`.
        details:
          type: array
          description: Present on `invalid_request`. One entry per failed field.
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
                example: zip
              message:
                type: string
                example: zip must be a 5-digit ZIP code
              index:
                type: integer
                description: >-
                  For array payloads (census rows), the zero-based index of the
                  failing row.
                example: 7
    BrokerCensusMemberInput:
      type: object
      required:
        - zip
      anyOf:
        - required:
            - dob
        - required:
            - age
      description: >-
        One employee record. Include dependent elections when your platform has
        them; submitted dependents drive covered lives and household tiers. When
        they are unavailable, Prescience uses a disclosed normalized small-group
        household mix for the preliminary model.
      properties:
        external_id:
          type: string
          description: >-
            Your payroll's employee ID (Check `Employee.id`). Required at
            enrollment; the upsert key, and how payroll results find the
            employee.
          example: emp_0001
        first_name:
          type: string
          example: Jordan
        last_name:
          type: string
          example: Reyes
        email:
          type: string
          format: email
          description: Upsert key when present.
          example: jordan@acme.com
        dob:
          type: string
          format: date
          description: >-
            Required for every employee and dependent of a broker; a broker's
            member sent with only an `age` is rejected.
          example: '1992-03-14'
        age:
          type: integer
          description: Alternative to `dob`. One of the two is required.
          example: 34
        zip:
          type: string
          pattern: ^[0-9]{5}$
          description: 5-digit home ZIP. Drives local market selection and rating.
          example: '94110'
        sex_at_birth:
          type: string
          enum:
            - male
            - female
            - other
        employment_type:
          type: string
          enum:
            - full_time
            - part_time
            - contractor
        hire_date:
          type: string
          format: date
          example: '2024-03-01'
        status:
          type: string
          enum:
            - active
            - terminated
          default: active
        dependents:
          type: array
          maxItems: 6
          description: Optional household members already known to your platform.
          items:
            type: object
            required:
              - relationship
            properties:
              relationship:
                type: string
                enum:
                  - spouse
                  - domestic_partner
                  - child
                  - other
              name:
                type: string
                maxLength: 120
              dob:
                type: string
                format: date
    BrokerPlan:
      type: object
      description: >-
        A carrier plan a broker brings. Money is integer cents. Send one rate
        basis: `member_rates_cents` (exact, preferred; wins over the others),
        `pmpm_cents`, or `monthly_rates_cents` per household shape. A plan we
        can't build on is ignored and reported in `ignored_plans`, never
        rejected; an optional field that is invalid is left out.
      required:
        - carrier
        - plan_name
        - plan_type
        - hsa_eligible
        - deductible_individual_cents
        - deductible_family_cents
        - oop_max_individual_cents
        - oop_max_family_cents
      properties:
        carrier:
          type: string
          example: Example Carrier
        plan_name:
          type: string
          example: Gold PPO 1500
        plan_type:
          type: string
          enum:
            - PPO
            - EPO
            - POS
            - HMO
        metal_tier:
          type: string
          example: Gold
        network:
          type: string
        funding_type:
          type: string
          enum:
            - fully_insured
            - level_funded
        hsa_eligible:
          type: boolean
        deductible_individual_cents:
          type: integer
        deductible_family_cents:
          type: integer
        oop_max_individual_cents:
          type: integer
        oop_max_family_cents:
          type: integer
        monthly_rates_cents:
          type: object
          description: >-
            Monthly premium for one household of each shape (all four, above 0).
            Used when neither `member_rates_cents` nor `pmpm_cents` is sent.
          required:
            - employee_only
            - employee_spouse
            - employee_children
            - family
          properties:
            pmpm_cents:
              type: integer
              description: >-
                The plan's monthly price per covered person, cents. A household
                costs this times the people on it. A rate basis: send
                `member_rates_cents`, `pmpm_cents` or `monthly_rates_cents`; the
                quote says which was used in `rate_basis`.
            member_rates_cents:
              type: array
              maxItems: 10000
              description: >-
                Exact monthly rate for each employee's household (employee and
                covered dependents), by the employee's `external_id` in the
                census. Preferred, because small-group rates are age-rated. Wins
                over `pmpm_cents` and `monthly_rates_cents`; an employee missing
                from it takes the average of their household type.
              items:
                type: object
                required:
                  - external_id
                  - monthly_cents
                properties:
                  external_id:
                    type: string
                  monthly_cents:
                    type: integer
            carrier_plan_id:
              type: string
            effective_date:
              type: string
              format: date
              description: When the rates take effect.
            rating_zip:
              type: string
              description: The ZIP (rating area) the rates were quoted for.
            embedded_deductible:
              type: boolean
              description: True when the family deductible embeds an individual one.
            coinsurance_pct:
              type: number
              description: Member coinsurance after the deductible, 0 to 100.
            copays_cents:
              type: object
              description: Copays in cents; any may be left out.
              properties:
                primary_care:
                  type: integer
                specialist:
                  type: integer
                urgent_care:
                  type: integer
                emergency_room:
                  type: integer
                rx_generic:
                  type: integer
                rx_preferred:
                  type: integer
                rx_specialty:
                  type: integer
            rx_deductible_cents:
              type: integer
            referral_required:
              type: boolean
            hsa_deductible_required:
              type: object
              description: >-
                Which benefits require the deductible, so the HSA check can
                verify the plan as it does one Prescience found: `pcp_visit`,
                `specialist_visit`, `hospitalization`, `emergency_room`,
                `urgent_care`, `labs`, `mri`, `surgery`, `mental_health` and
                `drug_tier:<tier name>`, each true, false or null. Without it
                the HSA check uses the deductible and out-of-pocket limits and
                your `hsa_eligible` flag.
              additionalProperties:
                type:
                  - boolean
                  - 'null'
            sbc_url:
              type: string
              description: https URL.
            doctor_search_url:
              type: string
              description: https URL.
            carrier_logo_url:
              type: string
              description: https URL.
            employee_only:
              type: integer
            employee_spouse:
              type: integer
            employee_children:
              type: integer
            family:
              type: integer
        pmpm_cents:
          type: integer
          description: >-
            Monthly price per covered person. A household costs this times the
            people on it. Wins over `monthly_rates_cents`.
        member_rates_cents:
          type: array
          maxItems: 10000
          description: >-
            Exact monthly rate for each employee's household (the employee and
            covered dependents), by the employee's census `external_id`.
            Small-group rates are age-rated, so this is the preferred basis.
            Employees missing from it fall back to `pmpm_cents` or
            `monthly_rates_cents`.
          items:
            type: object
            required:
              - external_id
              - monthly_cents
            properties:
              external_id:
                type: string
              monthly_cents:
                type: integer
        carrier_plan_id:
          type: string
        effective_date:
          type: string
          format: date
          description: The date the rates are effective.
        rating_zip:
          type: string
          description: The ZIP (rating area) the rates were quoted for, 5 digits.
        embedded_deductible:
          type: boolean
          description: True when the family deductible embeds an individual one.
        coinsurance_pct:
          type: number
          minimum: 0
          maximum: 100
          description: Member coinsurance after the deductible.
        copays_cents:
          type: object
          description: Copays in cents.
          properties:
            primary_care:
              type: integer
            specialist:
              type: integer
            urgent_care:
              type: integer
            emergency_room:
              type: integer
            rx_generic:
              type: integer
            rx_preferred:
              type: integer
            rx_specialty:
              type: integer
        rx_deductible_cents:
          type: integer
        referral_required:
          type: boolean
        hsa_deductible_required:
          type: object
          description: >-
            Which benefits require the deductible, so the HSA check can verify
            the plan. Keys: `pcp_visit`, `specialist_visit`, `hospitalization`,
            `emergency_room`, `urgent_care`, `labs`, `mri`, `surgery`,
            `mental_health` and `drug_tier:<tier name>`.
          additionalProperties:
            type:
              - boolean
              - 'null'
        sbc_url:
          type: string
          description: An https URL.
        doctor_search_url:
          type: string
          description: An https URL.
        carrier_logo_url:
          type: string
          description: An https URL.
    IgnoredPlan:
      type: object
      description: A plan you sent that was skipped, and why. Never an error.
      required:
        - index
        - reason
      properties:
        index:
          description: Position in `market_plans`, or `plan` for price-on-plan.
          oneOf:
            - type: integer
            - type: string
              enum:
                - plan
        carrier:
          type: string
        plan_name:
          type: string
        reason:
          type: string
          example: >-
            metalTier: metalTier is required (for example Platinum, Gold,
            Silver, Bronze).
  responses:
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: >-
              Provide a valid partner API key as `Authorization: Bearer
              psk_...`.
    Forbidden:
      description: >-
        Key is live-mode but live mode is not enabled for this account, or the
        key may not access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: live_mode_disabled
            message: >-
              Live mode is not enabled for this account yet. Complete the
              go-live checklist to enable live keys.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Partner API key. `psk_test_<32 hex>` for test mode, `psk_live_<32 hex>`
        for live mode. Store them in your secrets manager on issue. Live keys
        are shown once; the scoped partner portal can show an active sandbox key
        again.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.