@instabrain-sdks/api-client 2.2.2 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,11 +28,12 @@ Credentials (`userId` and `accessToken`) are provisioned during onboarding.
28
28
  14. [Beneficiary Reference](#beneficiary-reference)
29
29
  15. [Error Handling](#error-handling)
30
30
  16. [APIErrorCode Reference](#apierrorcode-reference)
31
- 17. [Environment Configuration](#environment-configuration)
32
- 18. [Token Management](#token-management)
33
- 19. [Examples Directory](#examples-directory)
34
- 20. [Changelog](#changelog)
35
- 21. [Support](#support)
31
+ 17. [Field-Level Error Messages](#field-level-error-messages)
32
+ 18. [Environment Configuration](#environment-configuration)
33
+ 19. [Token Management](#token-management)
34
+ 20. [Examples Directory](#examples-directory)
35
+ 21. [Changelog](#changelog)
36
+ 22. [Support](#support)
36
37
 
37
38
  ---
38
39
 
@@ -550,24 +551,41 @@ See [Secure Sign Flow](#secure-sign-flow) and [Final Submit](#final-submit).
550
551
 
551
552
  ## IB Term Flow
552
553
 
553
- > **Note:** IB Term is not yet fully available in this SDK release. This section is provided for reference only. Primary products for integration are GIGDB and ADB.
554
- >
555
- > **Not available in:** WY, NY
554
+ > **Eligibility:** Ages 18–60. **Not available in:** WY, NY.
556
555
 
557
556
  ### Complete flow
558
557
 
559
558
  ```
560
- getQuote()
559
+ getIBTermRiderDetails() ← optional pre-quote — check state availability & filter riders by age + nicotine
561
560
  ↓
562
- startApplication()
561
+ getQuote() ← IB Term quote (current SDK uses the generic getQuote method)
563
562
  ↓
564
- prepareDocsAndGetDeliveryChannels()
563
+ startIBTermApplication() ← NEW — typed IB Term Start Application wrapper
565
564
  ↓
566
- sendPinAndGetDocumentsLink() → verifyPin()
565
+ saveEftPayment() ← shared with GIGDB / ADB
566
+ ↓
567
+ prepareDocsAndGetDeliveryChannels() → sendPinAndGetDocumentsLink() → verifyPin()
567
568
  ↓
568
569
  finalSubmit()
569
570
  ```
570
571
 
572
+ ### Step 0 - `getIBTermRiderDetails(stateCode, age, flagNicotineUse)` (optional pre-step)
573
+
574
+ Call this before `getQuote()` to check whether IB Term is available for the applicant's state, age, and nicotine-use status, and to collect the rider codes available for that combination.
575
+
576
+ ```typescript
577
+ const riderDetails = await client.getIBTermRiderDetails('TX', 35, false);
578
+
579
+ if (riderDetails.flagProductNotAvailableForState) {
580
+ // IB Term is not available for this state/age/nicotine combo — do not proceed
581
+ return;
582
+ }
583
+
584
+ // riderDetails.riders[].riderCode → pass into ThirdPartyQuoteReq.riders[n].rider on the quote
585
+ ```
586
+
587
+ > `flagProductNotAvailableForState: true` is a valid business state (not an error). The SDK returns it as-is; do not throw.
588
+
571
589
  ### Step 1 - `getQuote(request: ThirdPartyQuoteReq)`
572
590
 
573
591
  Provide exactly one of three mutually exclusive rating inputs:
@@ -605,32 +623,259 @@ const { quoteResponseId } = quoteResp.selectedQuote;
605
623
 
606
624
  **Field priority rules:**
607
625
 
608
- - `zipCode` takes priority over `stateCode` if both are provided
626
+ - `zipCode` takes priority over `stateCode` if both are provided *(ADB / GIGDB only)*
609
627
  - `dateOfBirth` takes priority over `age` if both are provided
610
628
 
611
- ### Step 2 - `startApplication(request: ThirdPartyStartApplicationReq)`
629
+ > **IB Term — do not send `zipCode`**. Per the updated `ThirdPartyIbTermQuoteDocs.md`, the IB Term quote endpoint only accepts `stateCode`; the `zipCode` field on `ThirdPartyQuoteReq` (used here for cross-product convenience) is ignored by IB Term. Pass `null`.
630
+
631
+ **Required-field rules (enforced server-side):**
632
+
633
+ - `benefitPeriod` is **required**.
634
+ - **Rating input** — supply exactly ONE group: `rateClass`, OR `healthClass`, OR `height` + `weightInLbs` together. `height` is optional in the type (omit it when rating via `rateClass`/`healthClass`).
635
+ - **Age** — supply `age` OR `dateOfBirth`; resolved age must be **18–60**.
636
+ - **Location** — supply `stateCode` (for IB Term) or `stateCode` / `zipCode` (other products).
637
+ - **`flagTobaccoUse`** defaults to `false` when omitted on the IB Term quote — explicit `true` indicates nicotine use.
638
+
639
+ > The IB Term Quote endpoint returns failures in **two shapes**:
640
+ >
641
+ > 1. **Request validation** (HTTP 400, `value.fields`) — top-level `error` is usually `InvalidRequestFormat`. The two cross-field eligibility checks below can also be returned as top-level codes in this same shape:
642
+ > - `BenefitPeriodNotAvailable` — `BenefitPeriod` is not allowed for the selected state, age, and smoker status (carrier params).
643
+ > - `CoverageNotAvailable` — `FaceAmount` is outside the min/max/step for the selected state, age, and smoker status (carrier params).
644
+ > 2. **Business rules** (HTTP 400, `value: null`) — top-level `error` is `BenefitPeriodNotAvailable`, `CoverageNotAvailable`, `outsideBuildChart`, `QuoteNotEligibleForGivenConditions`, `NotAvailableForState`, `RiderNotAvailable`, or `RiderFaceAmountNotValid`.
645
+ >
646
+ > Detect specific failures with `err.isErrorType(APIErrorCode.X)`. See [APIErrorCode Reference → IB Term Quote Business Errors](#ib-term-quote-business-errors).
647
+
648
+ ### Step 1a - `getExistingIBTermQuote(opportunityId)` (resume / review an existing quote)
649
+
650
+ Retrieve a previously created IB Term quote by its opportunity ID — useful for resuming or reviewing a quote without re-quoting.
612
651
 
613
652
  ```typescript
614
- const appResp = await client.startApplication({
653
+ const quoteResp = await client.getExistingIBTermQuote(opportunityId);
654
+ const { quoteResponseId, quoteAmount } = quoteResp.selectedQuote;
655
+ ```
656
+
657
+ > A not-found result is an **error** (surfaced via the SDK error model), not a valid business state. Invalid/missing `opportunityId` → `APIValidationError` (`InvalidRequestFormat`); a non-IB-Term opportunity → field-level `Opportunity does not match the IB Term product`; an opportunity with no stored quote → `QuoteNotFound`.
658
+
659
+ ### Step 2 - `startIBTermApplication(request: IBTermStartApplicationReq)`
660
+
661
+ The IB Term Start Application takes a fully typed request with applicant info, address, birth jurisdiction, height/weight, driver license, primary care physician, structured tobacco/nicotine usage, beneficiary details, and (when the Dependent Child Rider was selected on the quote) child rider info.
662
+
663
+ > **Progressive disclosure:** the following top-level fields are **optional** — `address`, `socialSecurityNumber`, `dateOfBirth`, `birthJurisdiction`, `hasPrimaryCarePhysician`, `hasExistingCoverage`, `beneficiaryDetails`, `tobaccoNicotineUsage`. Within `childRiderInfo`, `hasExistingCoverageForChildren` and `childrenToBeInsuredDetails` are also optional. The full example below shows them populated for illustration; omit any of them if your flow collects them at a later step. Backend validation fires only when each parent is present.
664
+
665
+ ```typescript
666
+ import {
667
+ BeneficiaryType,
668
+ BeneficiaryRelationship,
669
+ Gender,
670
+ TobaccoNicotineLastUsedPeriod,
671
+ TobaccoNicotineProductType,
672
+ } from '@instabrain-sdks/api-client';
673
+
674
+ const appResp = await client.startIBTermApplication({
615
675
  quoteResponseId: quoteResp.selectedQuote.quoteResponseId,
616
676
  firstName: 'John',
617
677
  lastName: 'Smith',
618
678
  email: 'john.smith@example.com',
619
- phoneNumber: '5559876543'
679
+ phoneNumber: '5559876543', // 10-digit local OR E.164 ('+15559876543')
680
+ isUsCitizenOrIsPermanentResident: true,
681
+ isPayerAlsoOwnerAndInsured: true, // must be true; knockout otherwise
682
+ dateOfBirth: '1988-03-20',
683
+ socialSecurityNumber: '123456789',
684
+ address: {
685
+ addressLine1: '456 Oak Ave',
686
+ city: 'Dallas',
687
+ state: 'TX',
688
+ zipcode: '75201',
689
+ },
690
+ birthJurisdiction: { country: 'US', state: 'TX' },
691
+ height: { feet: 5, inches: 10 },
692
+ weight: 175,
693
+ isHoldingValidDriverLicense: true,
694
+ driverLicenseState: 'TX', // flat field, NOT nested
695
+ driverLicenseNumber: 'D12345678', // flat field, NOT nested
696
+ hasPrimaryCarePhysician: false,
697
+ physicianDetails: null,
698
+ tobaccoNicotineUsage: {
699
+ lastUsedPeriod: TobaccoNicotineLastUsedPeriod.Never,
700
+ lastTimeUsed: null, // null when lastUsedPeriod === Never
701
+ productTypesUsed: null, // null when lastUsedPeriod === Never
702
+ },
703
+ areListedConditionsNotApplicable: true, // false → declined (knockout)
704
+ hasExistingCoverage: false,
705
+ beneficiaryDetails: {
706
+ beneficiaryType: BeneficiaryType.Person,
707
+ beneficiaryPerson: {
708
+ firstName: 'Mary',
709
+ lastName: 'Smith',
710
+ relationship: BeneficiaryRelationship.Spouse,
711
+ },
712
+ },
620
713
  });
621
714
 
622
- const { opportunityId, agentLink, eAppAgentLink, applicantLink } = appResp;
715
+ if (appResp.isDeclined) {
716
+ // Valid knockout — stop the flow
717
+ return;
718
+ }
719
+
720
+ const { opportunityId } = appResp;
721
+ ```
722
+
723
+ **Knockout rules — returns `isDeclined: true` (not an error, not thrown):**
724
+
725
+ - `isPayerAlsoOwnerAndInsured === false` → declined
726
+ - `isUsCitizenOrIsPermanentResident === false` → declined
727
+ - `isHoldingValidDriverLicense === false` → declined (driver license attestation)
728
+ - `areListedConditionsNotApplicable === false` → declined (one or more of the listed health conditions applies to the applicant)
729
+ - Any child knockout (`isAnyChildTakingMedication`, `isAnyChildDiagnosedWithDisability`, `isAnyChildDiagnosedWithSevereCondition`, `isAnyChildAdvisedForSurgery`) set to `true` → declined when Dependent Child Rider is selected
730
+ - Applicant height / weight outside the build chart → declined
731
+
732
+ > The physician-age-55 knockout was **removed** — applicants aged 55+ without primary care physician details are no longer declined.
733
+
734
+ > IB Term does **NOT** use `ApplicationLimitReached` (that applies to ADB / GIGDB only).
735
+
736
+ **Beneficiary type restriction:** IB Term accepts only `Person`, `Trust`, `Insured Estate`, `All Children Of The Insured Equally`, and `All Children Of The Marriage Equally`. The Business / Corporation / Charitable Organization / Employer / Other named-entity types are **not accepted** by IB Term — the SDK uses the shared `BeneficiaryDetails` union but the restriction is enforced server-side.
737
+
738
+ #### Applicant Disclosure (`areListedConditionsNotApplicable`)
739
+
740
+ This field corresponds to *"By checking the box I confirm the conditions listed are not applicable and able to proceed with the application."*
741
+
742
+ IB Term is designed for applicants who have **not** been diagnosed with the serious medical conditions below and have **not** had recent legal, driving, or insurance history issues that affect coverage availability.
743
+
744
+ | Value | Meaning | API behavior |
745
+ |---|---|---|
746
+ | `true` | None of the listed conditions apply to the applicant | Application may proceed (`isDeclined=false`). |
747
+ | `false` | One or more listed conditions apply | Immediate decline (`isDeclined=true`). |
748
+
749
+ Third-party integrations send a single boolean for the entire disclosure. Individual conditions are **not** separate request fields — your applicant-facing UI should present the full list and only set `areListedConditionsNotApplicable: true` when the applicant confirms none of the items below apply.
750
+
751
+ ##### Listed conditions (by category)
752
+
753
+ **Cardiovascular & Heart Conditions**
754
+
755
+ - Angina, Heart Attack or Stroke
756
+ - Aortic or Brain Aneurysm
757
+ - Atrial Fibrillation and/or Arrhythmia (Irregular Heartbeat)
758
+ - Cardiomyopathy, Congestive Heart Failure
759
+ - Cerebral Vascular Accident (Stroke) or multiple Transient Ischemic Attacks (TIAs)
760
+ - Coronary Artery Blockage, Bypass, Stent Placement
761
+ - Myocardial Infarction (Heart Attack)
762
+ - Myocarditis
763
+
764
+ **Neurological Conditions**
765
+
766
+ - ALS (Lou Gehrig's Disease)
767
+ - Alzheimer's, Dementia or Cognitive Impairment
768
+ - Cerebral Palsy
769
+ - Multiple Sclerosis
770
+ - Parkinson's Disease
771
+ - Seizures including Grand Mal, Partial or Focal with moderate control
772
+
773
+ **Metabolic & Endocrine Conditions**
774
+
775
+ - Diagnosed with Diabetes Type I
776
+ - Diagnosed with Diabetes Type II below age 40
777
+ - Liver Disease including Cirrhosis, elevated Liver Function tests and/or Hemochromatosis
778
+
779
+ **Mental Health & Developmental Conditions**
780
+
781
+ - Autism
782
+ - Mental Illness (Schizophrenia or Psychosis)
783
+ - Mentally Challenged (Down's Syndrome, Autism, etc)
784
+
785
+ **Other Serious Medical Conditions**
786
+
787
+ - Any pending medical test or exams
788
+ - Lupus (SLE)
789
+ - Muscular Dystrophy
790
+ - Organ Transplant
791
+ - Sleep Apnea (non-compliant or within 6 months of diagnosis)
792
+ - Treatment for Alcohol and/or Drug Use within the past 5 years
793
+ - Ventilator use
794
+
795
+ **Legal & Insurance History**
796
+
797
+ - Adverse action by another Insurance carrier
798
+ - Convicted of a misdemeanor within the past 8 years
799
+ - Convicted of a felony
800
+ - Currently disabled
801
+ - Declined by or submitted more than 3 applications to life insurance carrier in the past year
802
+ - Do not currently have a valid drivers license
803
+ - DUI, License Suspension/Revoked, Reckless/Negligent Driving within last 2 years
804
+ - Pending criminal charges or current probation
805
+
806
+ #### Driver license
807
+
808
+ Driver license is two **flat fields** on the request (not a nested object): `driverLicenseState` and `driverLicenseNumber`. They are **independent** of `isHoldingValidDriverLicense` — validated only when sent. Pass `null` (or omit) when you don't have them; the backend will only validate state-code / number-against-state format when present. Note that `isHoldingValidDriverLicense === false` is still a knockout decline (driver-license attestation), but that decline is independent of whether you supply the actual license values.
809
+
810
+ #### Primary care physician
811
+
812
+ The whole `hasPrimaryCarePhysician` / `physicianDetails` pair is **optional**. When `hasPrimaryCarePhysician === true`, supply `physicianDetails.{physicianName, city, stateCode, lastSeen}`. `lastSeen` is `YYYY-MM` and must not be after the current month — the current month is allowed; only future months are rejected. When `false`, `physicianDetails` must be `null`. Physician's `stateCode` cannot be "Outside Of The USA". No decline is issued for applicants ≥ 55 without physician details (the physician knockout was removed).
813
+
814
+ #### Tobacco / nicotine usage
815
+
816
+ IB Term uses a structured `tobaccoNicotineUsage` object — **not** a boolean `isSmoker` flag like ADB / GIGDB.
817
+
818
+ - When `lastUsedPeriod === TobaccoNicotineLastUsedPeriod.Never` (`'never used'`), both `lastTimeUsed` and `productTypesUsed` **must be `null`**.
819
+ - Otherwise: supply `lastTimeUsed` (`YYYY-MM`) AND at least one `productTypesUsed` value. If `productTypesUsed` includes `Cigars`, `cigarUsagePerYear` (1–999) is required.
820
+
821
+ #### Child rider (when Dependent Child Rider was selected on the quote)
822
+
823
+ > Backend field-name quirks: child `dateOfBirth` serializes as **`dob`**, child `relationship` serializes as **`relation`**. The SDK field names match the wire format (`dob`, `relation`) — don't use `dateOfBirth` / `relationship`, they will be silently dropped.
824
+
825
+ ```typescript
826
+ childRiderInfo: {
827
+ hasExistingCoverageForChildren: true,
828
+ isAnyChildTakingMedication: false,
829
+ isAnyChildDiagnosedWithDisability: false,
830
+ isAnyChildDiagnosedWithSevereCondition: false,
831
+ isAnyChildAdvisedForSurgery: false,
832
+ childrenToBeInsuredDetails: [{
833
+ firstName: 'Alice',
834
+ lastName: 'Smith',
835
+ gender: Gender.Female,
836
+ dob: '2020-05-10', // 15 days – under 18 years (BE field: DOB → dob)
837
+ height: { feet: 3, inches: 6 },
838
+ weight: 40,
839
+ relation: 'Daughter', // BE field: Relation → relation
840
+ }],
841
+ existingCoverageInfoForChildren: [{
842
+ nameOfTheCompany: 'KidsCo',
843
+ insuranceAmount: '25000', // string, NOT number (matches adult coverage shape)
844
+ policyNumber: 'POL-1',
845
+ dateOfIssue: '2022-01',
846
+ toBeReplaced: false, // required
847
+ toBeFinanced: false, // required
848
+ }],
849
+ }
623
850
  ```
624
851
 
625
- **Response links:**
852
+ Max 10 children. Max 10 child existing-coverage entries. Total "not-being-replaced" coverage amounts must not exceed $100,000.
853
+
854
+ #### State-specific existing-coverage fields (Q-08)
855
+
856
+ IB Term enforces the **same state-specific matrix as GIGDB** — see the [GIGDB state-specific Other Insurance fields](#state-specific-other-insurance-fields-q-08) section. When `hasExistingCoverage === true`:
857
+
858
+ | State | Field on `existingCoverages[]` | Type |
859
+ |-----------|------------------------------------|-----------|
860
+ | MA | `requestsYieldIndices` | `boolean` |
861
+ | OK | `notifyPresentInsurer` | `boolean` |
862
+ | DE / GA | `wantsPolicySummary` | `boolean` |
863
+ | FL | `wantsComparativeInformationForm` | `boolean` |
626
864
 
865
+ For **RI** / **WV**, set `existingCoverageData.areExistingPoliciesIssuedByFidelity`. For **KS** / **WA** with `willOtherCoverageBeReplacedOrFinanced=true`, populate the top-level `willOtherCoverageBeReplacedOrFinancedData` block — same shape as GIGDB (see the GIGDB section for the full WA `otherInsuranceReplacementData` field table).
627
866
 
628
- | Field | Description |
629
- | --------------- | -------------------------------------------------------------------- |
630
- | `agentLink` | URL for the agent to complete their section in the InstaBrain portal |
631
- | `eAppAgentLink` | Alternate agent URL used in eApp mode (some partner configurations) |
632
- | `applicantLink` | URL sent to the proposed insured for their self-service section |
867
+ ### Legacy `startApplication(request: ThirdPartyStartApplicationReq)`
633
868
 
869
+ The original 5-field `startApplication()` method remains available for backward compatibility but **`startIBTermApplication()` is the recommended path**. The legacy method only returns iframe links (`agentLink`, `eAppAgentLink`, `applicantLink`) — it does not give you a typed `opportunityId` you can hand off to EFT / Secure Sign / Final Submit.
870
+
871
+ ```typescript
872
+ // Legacy iframe-driven flow:
873
+ const appResp = await client.startApplication({
874
+ quoteResponseId, firstName: 'John', lastName: 'Smith',
875
+ email: 'john.smith@example.com', phoneNumber: '5559876543',
876
+ });
877
+ const { agentLink, applicantLink } = appResp;
878
+ ```
634
879
 
635
880
  ### Steps 3–4 - Secure Sign → Final Submit
636
881
 
@@ -919,7 +1164,7 @@ filters: [
919
1164
  | `wantsComparativeInformationForm` | `boolean | null` | No | Required when `address.state === "FL"` (per-coverage Q-08) |
920
1165
 
921
1166
 
922
- `**GigdbWillOtherCoverageBeReplacedOrFinancedData`:** *(new — IBS-63)*
1167
+ `**GigdbWillOtherCoverageBeReplacedOrFinancedData`:**
923
1168
 
924
1169
 
925
1170
  | Field | Type | Required | Notes |
@@ -928,7 +1173,7 @@ filters: [
928
1173
  | `otherInsuranceReplacementData` | `GigdbOtherInsuranceReplacementData | null` | No | Required when `address.state === "WA"` AND `willOtherCoverageBeReplacedOrFinanced === true` |
929
1174
 
930
1175
 
931
- `**GigdbOtherInsuranceReplacementData`:** *(new — IBS-63, WA-only)*
1176
+ `**GigdbOtherInsuranceReplacementData`:** *(WA-only)*
932
1177
 
933
1178
  > All 7 booleans are server-required (must be non-null). For each boolean set to `true`, the paired `specify*` string must be a non-empty explanation. When the boolean is `false`, the paired `specify*` may be omitted or `null`.
934
1179
 
@@ -977,7 +1222,7 @@ filters: [
977
1222
  | `firstName` | `string` | No | Max 35 chars |
978
1223
  | `lastName` | `string` | No | Max 35 chars |
979
1224
  | `email` | `string` | No | Valid email format |
980
- | `phoneNum` | `string` | No | 10-digit numeric |
1225
+ | `phoneNum` | `string` | No | 10-digit local or E.164 (e.g. `+11234567890`) |
981
1226
 
982
1227
 
983
1228
  ### `ThirdPartyAdbAppReq`
@@ -989,7 +1234,7 @@ filters: [
989
1234
  | `firstName` | `string` | Yes | Max 35 chars |
990
1235
  | `lastName` | `string` | Yes | Max 35 chars |
991
1236
  | `email` | `string` | Yes | Valid email format |
992
- | `phoneNumber` | `string` | Yes | 10-digit numeric |
1237
+ | `phoneNumber` | `string` | Yes | 10-digit local or E.164 (e.g. `+11234567890`) |
993
1238
  | `isUsCitizen` | `boolean` | Yes | |
994
1239
  | `isLegalUsResident` | `boolean` | No | Required when `isUsCitizen = false` |
995
1240
  | `isPayerAlsoOwnerAndInsured` | `boolean` | Yes | Must be `true`; knockout if `false` |
@@ -1054,23 +1299,224 @@ filters: [
1054
1299
 
1055
1300
  > Use `saveEftPayment()` for both GIGDB and ADB — both products share the same `POST /api/ThirdPartyPayment/save-eft-payment` endpoint.
1056
1301
 
1302
+ ### `IBTermStartApplicationReq`
1303
+
1304
+
1305
+ | Field | Type | Required | Constraints |
1306
+ | --- | --- | --- | --- |
1307
+ | `quoteResponseId` | `string` | Yes | UUID from IB Term quote response |
1308
+ | `firstName` | `string` | Yes | Alphabetic only |
1309
+ | `lastName` | `string` | Yes | Alphabetic only |
1310
+ | `email` | `string` | Yes | Valid email format |
1311
+ | `phoneNumber` | `string` | Yes | 10-digit local or E.164 (e.g. `+11234567890`) |
1312
+ | `isUsCitizenOrIsPermanentResident` | `boolean` | Yes | Single combined field (IB Term variant) |
1313
+ | `isPayerAlsoOwnerAndInsured` | `boolean` | Yes | Must be `true`; knockout otherwise |
1314
+ | `dateOfBirth` | `string \| null` | No | ISO date; when sent, age 18–60. Optional — captured on the originating quote |
1315
+ | `socialSecurityNumber` | `string \| null` | No | 9 consecutive digits (`XXXXXXXXX`); dashed values rejected |
1316
+ | `address` | `IBTermAddress \| null` | No | See sub-fields below. Optional — state code is captured on the quote |
1317
+ | `birthJurisdiction` | `IBTermBirthJurisdiction \| null` | No | See sub-fields below |
1318
+ | `height` | `IBTermHeight` | Yes | See sub-fields below |
1319
+ | `weight` | `number` | Yes | Must be > 0 |
1320
+ | `isHoldingValidDriverLicense` | `boolean` | Yes | `false` → knockout (declined) |
1321
+ | `driverLicenseState` | `string \| null` | No (optional) | 2-letter US state. **Optional and independent of `isHoldingValidDriverLicense`** — validated only when sent. BE field: `DriverLicenseState` (top-level flat). |
1322
+ | `driverLicenseNumber` | `string \| null` | No (optional) | **Optional and independent of `isHoldingValidDriverLicense`** — validated against `driverLicenseState` when both are present. BE field: `DriverLicenseNumber` (top-level flat). |
1323
+ | `hasPrimaryCarePhysician` | `boolean \| null` | No | The whole physician pair is optional. Physician-age-55 knockout removed. |
1324
+ | `physicianDetails` | `IBTermPhysicianDetails \| null` | No | Required when `hasPrimaryCarePhysician === true`; must be `null` when `false` |
1325
+ | `tobaccoNicotineUsage` | `IBTermTobaccoNicotineUsage \| null` | No | Structured object — see sub-fields. Optional under progressive disclosure |
1326
+ | `areListedConditionsNotApplicable` | `boolean` | Yes | Required acknowledgement. `false` → knockout (declined) |
1327
+ | `hasExistingCoverage` | `boolean \| null` | No | When `true`, supply `existingCoverageData` and `willOtherCoverageBeReplacedOrFinanced` |
1328
+ | `willOtherCoverageBeReplacedOrFinanced` | `boolean` | No | Required when `hasExistingCoverage = true` |
1329
+ | `existingCoverageData` | `IBTermExistingCoverageData` | No | Required when `hasExistingCoverage = true` |
1330
+ | `willOtherCoverageBeReplacedOrFinancedData` | `IBTermWillOtherCoverageBeReplacedOrFinancedData` | No | Required when `address.state` is `"KS"` or `"WA"` AND `willOtherCoverageBeReplacedOrFinanced === true` |
1331
+ | `beneficiaryDetails` | `BeneficiaryDetails \| null` | No | Restricted to Person / Trust / Insured Estate / All-children-of-insured-equally / All-children-of-marriage-equally |
1332
+ | `childRiderInfo` | `IBTermChildRiderInfo` | No | Required when Dependent Child Rider was selected on the quote |
1333
+
1334
+
1335
+ `**IBTermAddress`:**
1336
+
1337
+
1338
+ | Field | Type | Constraints |
1339
+ | -------------- | -------- | ------------------------------------------- |
1340
+ | `addressLine1` | `string` | Avoid special characters |
1341
+ | `city` | `string` | Letters and spaces only |
1342
+ | `state` | `string` | 2-char; must match state used at quote time |
1343
+ | `zipcode` | `string` | 5-digit numeric |
1344
+
1345
+
1346
+ `**IBTermBirthJurisdiction`:**
1347
+
1348
+
1349
+ | Field | Type | Required | Notes |
1350
+ | --------- | -------- | -------- | --------------------------------------------- |
1351
+ | `country` | `string` | Yes | ISO country code (e.g. `"US"`) |
1352
+ | `state` | `string` | No | 2-letter US state; required when `country === "US"` |
1353
+
1354
+
1355
+ `**IBTermHeight`:**
1356
+
1357
+
1358
+ | Field | Type | Constraints |
1359
+ | -------- | -------- | ---------------- |
1360
+ | `feet` | `number` | 1–8 inclusive |
1361
+ | `inches` | `number` | 0–11 inclusive |
1362
+
1363
+
1364
+ `**IBTermPhysicianDetails`:**
1365
+
1366
+
1367
+ | Field | Type | Constraints |
1368
+ | --------------- | -------- | ------------------------------------------------------ |
1369
+ | `physicianName` | `string` | Required when `hasPrimaryCarePhysician === true`. BE field: `PhysicianDetails.PhysicianName` |
1370
+ | `city` | `string` | Physician's city. BE field: `PhysicianDetails.City` |
1371
+ | `stateCode` | `string` | 2-letter US; "Outside Of The USA" not accepted. BE field: `PhysicianDetails.StateCode` |
1372
+ | `lastSeen` | `string` | `YYYY-MM`. Must **not be after the current month** (current month is allowed; only future months are rejected). |
1373
+
1374
+
1375
+ `**IBTermTobaccoNicotineUsage`:**
1376
+
1377
+
1378
+ | Field | Type | Required | Constraints |
1379
+ | -------------------- | ------------------------------------------ | --------------- | ------------------------------------------------------ |
1380
+ | `lastUsedPeriod` | `TobaccoNicotineLastUsedPeriod` | Yes | Use enum values |
1381
+ | `lastTimeUsed` | `string | null` | Yes (nullable) | `YYYY-MM`. **Must be `null`** when `lastUsedPeriod === Never` (`'never used'`); non-null otherwise. |
1382
+ | `productTypesUsed` | `TobaccoNicotineProductType[] | null` | Yes (nullable) | **Must be `null`** when `lastUsedPeriod === Never`; non-null with ≥1 entry otherwise. BE field: `TobaccoNicotineUsage.ProductTypesUsed` |
1383
+ | `cigarUsagePerYear` | `number` | No | 1–999; required when `productTypesUsed` includes `Cigars` |
1384
+
1385
+
1386
+ `**IBTermExistingCoverageData`:**
1387
+
1388
+
1389
+ | Field | Type | Required | Notes |
1390
+ | ------------------------------------- | --------------------------------- | -------- | ----- |
1391
+ | `isExistingPolicyBeingTerminated` | `boolean` | Yes | |
1392
+ | `existingCoverages` | `IBTermExistingCoverageInfo[]` | Yes | At least one entry when present |
1393
+ | `areExistingPoliciesIssuedByFidelity` | `boolean` | No | Required when `address.state` is `"RI"` or `"WV"` |
1394
+
1395
+
1396
+ `**IBTermExistingCoverageInfo`:**
1397
+
1398
+
1399
+ | Field | Type | Required | Notes |
1400
+ | --------------------------------- | --------- | -------- | ----- |
1401
+ | `nameOfTheCompany` | `string` | Yes | |
1402
+ | `insuranceAmount` | `string` | Yes | |
1403
+ | `dateOfIssue` | `string` | Yes | `YYYY-MM` |
1404
+ | `toBeReplaced` | `boolean` | Yes | |
1405
+ | `toBeFinanced` | `boolean` | Yes | |
1406
+ | `requestsYieldIndices` | `boolean` | No | Required when `address.state === "MA"` |
1407
+ | `notifyPresentInsurer` | `boolean` | No | Required when `address.state === "OK"` |
1408
+ | `wantsPolicySummary` | `boolean` | No | Required when `address.state` is `"DE"` or `"GA"` |
1409
+ | `wantsComparativeInformationForm` | `boolean` | No | Required when `address.state === "FL"` |
1410
+
1411
+
1412
+ `**IBTermWillOtherCoverageBeReplacedOrFinancedData`:**
1413
+
1414
+
1415
+ | Field | Type | Required | Notes |
1416
+ | -------------------------------------- | ------------------------------------- | -------- | ----- |
1417
+ | `areReplacedPoliciesIssuedByFidelity` | `boolean` | No | Required when `address.state === "KS"` AND `willOtherCoverageBeReplacedOrFinanced === true` |
1418
+ | `otherInsuranceReplacementData` | `IBTermOtherInsuranceReplacementData` | No | Required when `address.state === "WA"` AND `willOtherCoverageBeReplacedOrFinanced === true` |
1419
+
1420
+
1421
+ `**IBTermOtherInsuranceReplacementData`:** *(WA only; mirrors `GigdbOtherInsuranceReplacementData`)*
1422
+
1423
+ > All 7 booleans are server-required. Each `specify*` string is required when its paired boolean is `true`; may be omitted or `null` otherwise.
1424
+
1425
+ | Field | Type | Notes |
1426
+ | -------------------------------------- | -------- | ----- |
1427
+ | `mayReduceBenefitsIncreasePremiums` | `boolean` | Always required |
1428
+ | `specifyReduceBenefitsIncreasePremiums`| `string` | Required when `mayReduceBenefitsIncreasePremiums === true` |
1429
+ | `hasNewPolicyCharges` | `boolean` | Always required |
1430
+ | `specifyNewPolicyCharges` | `string` | Required when `hasNewPolicyCharges === true` |
1431
+ | `hasPriorPolicyCharges` | `boolean` | Always required |
1432
+ | `specifyPriorPolicyCharges` | `string` | Required when `hasPriorPolicyCharges === true` |
1433
+ | `hasTaxConsequences` | `boolean` | Always required |
1434
+ | `specifyTaxConsequences` | `string` | Required when `hasTaxConsequences === true` |
1435
+ | `hasInterestConsiderations` | `boolean` | Always required |
1436
+ | `specifyInterestConsiderations` | `string` | Required when `hasInterestConsiderations === true` |
1437
+ | `hasMinRequirementsBeforeInterest` | `boolean` | Always required |
1438
+ | `specifyMinRequirementsBeforeInterest` | `string` | Required when `hasMinRequirementsBeforeInterest === true` |
1439
+ | `hasOtherAdverseEffects` | `boolean` | Always required |
1440
+ | `specifyOtherAdverseEffects` | `string` | Required when `hasOtherAdverseEffects === true` |
1441
+
1442
+
1443
+ `**IBTermChildRiderInfo`:**
1444
+
1445
+
1446
+ | Field | Type | Required | Notes |
1447
+ | ------------------------------------------- | --------------------------------- | -------- | ----- |
1448
+ | `hasExistingCoverageForChildren` | `boolean \| null` | No | When `true`, supply `existingCoverageInfoForChildren` (max 10 entries) |
1449
+ | `isAnyChildTakingMedication` | `boolean` | Yes | Knockout when `true` |
1450
+ | `isAnyChildDiagnosedWithDisability` | `boolean` | Yes | Knockout when `true` |
1451
+ | `isAnyChildDiagnosedWithSevereCondition` | `boolean` | Yes | Knockout when `true` |
1452
+ | `isAnyChildAdvisedForSurgery` | `boolean` | Yes | Knockout when `true` |
1453
+ | `childrenToBeInsuredDetails` | `IBTermChildToBeInsured[] \| null` | No | When provided, each entry is validated (max 10). The previous "at least 1 required" constraint has been removed. |
1454
+ | `existingCoverageInfoForChildren` | `IBTermChildExistingCoverage[]` | No | Required when `hasExistingCoverageForChildren === true`; max 10 entries; total non-replaced coverage ≤ $100,000 |
1455
+
1456
+
1457
+ `**IBTermChildToBeInsured`:**
1458
+
1459
+
1460
+ | Field | Type | Constraints |
1461
+ | ------------- | --------------- | --------------------------------------------------- |
1462
+ | `firstName` | `string` | Alphabetic only |
1463
+ | `lastName` | `string` | Alphabetic only |
1464
+ | `gender` | `Gender` | Use enum |
1465
+ | `dob` | `string` | ISO date; 15 days – under 18 years old. BE field name: `DOB` (serializes as `dob`) |
1466
+ | `height` | `IBTermHeight` | Child: feet 0–8, inches 0–11 |
1467
+ | `weight` | `number` | > 0 |
1468
+ | `relation` | `string` | Free-form (e.g. "Daughter", "Son", "Stepchild"). BE field name: `Relation` (serializes as `relation`) |
1469
+
1470
+
1471
+ `**IBTermChildExistingCoverage`:**
1472
+
1473
+
1474
+ | Field | Type | Constraints |
1475
+ | ------------------ | --------- | --------------------------------------------- |
1476
+ | `nameOfTheCompany` | `string` | |
1477
+ | `insuranceAmount` | `string` | Matches adult `IBTermExistingCoverageInfo.insuranceAmount`. Non-replaced totals must not exceed $100,000 |
1478
+ | `policyNumber` | `string` | |
1479
+ | `dateOfIssue` | `string` | `YYYY-MM` |
1480
+ | `toBeReplaced` | `boolean` | Whether this child policy is being replaced |
1481
+ | `toBeFinanced` | `boolean` | Whether premiums on the new policy will be financed from this existing child policy |
1482
+
1483
+
1484
+ ### `IBTermRiderDetailsResp` *(returned by `getIBTermRiderDetails`)*
1485
+
1486
+
1487
+ | Field | Type | Notes |
1488
+ | ---------------------------------- | ---------------- | ----- |
1489
+ | `flagProductNotAvailableForState` | `boolean` | `true` → IB Term not available for this state/age/nicotine combo |
1490
+ | `riders` | `IBTermRider[]` | Empty when product is not available |
1491
+
1492
+
1493
+ `**IBTermRider`:**
1494
+
1495
+
1496
+ | Field | Type | Notes |
1497
+ | ----------------- | -------- | ----- |
1498
+ | `riderCode` | `string` | Pass into `ThirdPartyQuoteReq.riders[n].rider` on the quote |
1499
+ | `riderTitle` | `string` | Display title |
1500
+ | `riderDescription`| `string` | Display description |
1501
+
1502
+
1057
1503
  ### `ThirdPartyQuoteReq` (IB Term - Secondary)
1058
1504
 
1059
1505
 
1060
1506
  | Field | Type | Required | Constraints |
1061
1507
  | ---------------- | ---------------------------------- | -------- | ----------------------------------------------- |
1062
- | `faceAmount` | `number` | Yes | See age-based limits below |
1063
- | `benefitPeriod` | `number` | Yes | 10, 20, or 30 (age-dependent - see table below) |
1508
+ | `faceAmount` | `number` | Yes | See age-based limits below. `CoverageNotAvailable` if not offered for state+age |
1509
+ | `benefitPeriod` | `number` | Yes | 10, 20, or 30 (age-dependent - see table below). `BenefitPeriodNotAvailable` if not offered for state+age |
1064
1510
  | `flagTobaccoUse` | `boolean` | Yes | |
1065
1511
  | `gender` | `Gender` | Yes | |
1066
- | `stateCode` | `string | null` | Yes* |
1067
- | `zipCode` | `string | null` | Yes* |
1068
- | `rateClass` | `RateClass | null` | Yes* |
1069
- | `healthClass` | `HealthClass | null` | Yes* |
1070
- | `height` | `{ feet: number, inches: number }` | Yes* | Required if `weightInLbs` provided |
1071
- | `weightInLbs` | `number | null` | Yes* |
1072
- | `age` | `number | null` | Yes* |
1073
- | `dateOfBirth` | `string | null` | Yes* |
1512
+ | `stateCode` | `string | null` | Yes* (one of stateCode / zipCode) |
1513
+ | `zipCode` | `string | null` | Yes* (zipCode wins if both) |
1514
+ | `rateClass` | `RateClass | null` | Yes† (one of rateClass / healthClass / height+weight) |
1515
+ | `healthClass` | `HealthClass | null` | Yes† (rating OR-group) |
1516
+ | `height` | `{ feet, inches } | null` | Yes† — optional; required only with `weightInLbs` (height+weight rating path) |
1517
+ | `weightInLbs` | `number | null` | Yes† (paired with `height`) |
1518
+ | `age` | `number | null` | Yes‡ (one of age / dateOfBirth; resolved 18–60) |
1519
+ | `dateOfBirth` | `string | null` | Yes‡ (dateOfBirth wins if both) |
1074
1520
  | `riders` | `ThirdPartyQuoteReqRider[] | null` | No |
1075
1521
  | `paymentFreq` | `PaymentFrequency` | Yes | |
1076
1522
  | `firstName` | `string | null` | No |
@@ -1078,6 +1524,8 @@ filters: [
1078
1524
  | `email` | `string | null` | No |
1079
1525
  | `phoneNum` | `string | null` | No |
1080
1526
 
1527
+ > `*` one of `stateCode` / `zipCode` required · `†` one rating group required (`rateClass` OR `healthClass` OR `height`+`weightInLbs`) · `‡` one of `age` / `dateOfBirth` required
1528
+
1081
1529
 
1082
1530
  **Face amount limits (age-based):**
1083
1531
 
@@ -1337,6 +1785,40 @@ Rider codes accepted by `ThirdPartyAdbQuoteRequest.riders` and `ThirdPartyAdbUpd
1337
1785
 
1338
1786
  > **Note:** ADB has its own rider enum. Do NOT reuse the Term product's `RiderType` — those values (`'ADB Rider'`, `'Dependent Child Rider'`) are display titles, not the codes the ADB API expects.
1339
1787
 
1788
+ ### `TobaccoNicotineLastUsedPeriod` (IB Term Start Application)
1789
+
1790
+ Bucket describing how recently the applicant last used tobacco/nicotine. Used on `IBTermTobaccoNicotineUsage.lastUsedPeriod`. Values match the backend `TobaccoNicotineLastUsedPeriodOptions` list — **case-sensitive, lowercase**.
1791
+
1792
+ | Enum Member | Value |
1793
+ | -------------------------------------------------------- | ------------------------------ |
1794
+ | `TobaccoNicotineLastUsedPeriod.WithinLastTwelveMonths` | `'within the last 12 months'` |
1795
+ | `TobaccoNicotineLastUsedPeriod.TwelveToTwentyThreeMonths`| `'12 to 23 months'` |
1796
+ | `TobaccoNicotineLastUsedPeriod.TwentyFourToThirtyFiveMonths` | `'24 to 35 months'` |
1797
+ | `TobaccoNicotineLastUsedPeriod.ThirtySixMonthsOrGreater` | `'36 months or greater'` |
1798
+ | `TobaccoNicotineLastUsedPeriod.Never` | `'never used'` |
1799
+
1800
+ ### `TobaccoNicotineProductType` (IB Term Start Application)
1801
+
1802
+ Tobacco / nicotine product types the applicant has used. Used as a non-empty array on `IBTermTobaccoNicotineUsage.productTypesUsed`. Values match the backend `TobaccoNicotineProductTypeOptions` list — **case-sensitive, lowercase**.
1803
+
1804
+ | Enum Member | Value |
1805
+ | -------------------------------------------- | ---------------------- |
1806
+ | `TobaccoNicotineProductType.ChewingTobacco` | `'chewing tobacco'` |
1807
+ | `TobaccoNicotineProductType.Cigarettes` | `'cigarettes'` |
1808
+ | `TobaccoNicotineProductType.Cigars` | `'cigars'` |
1809
+ | `TobaccoNicotineProductType.ECigarettes` | `'e-cigarettes'` |
1810
+ | `TobaccoNicotineProductType.Hookah` | `'hookah'` |
1811
+ | `TobaccoNicotineProductType.NicotineGum` | `'nicotine gum'` |
1812
+ | `TobaccoNicotineProductType.NicotinePatches` | `'nicotine patches'` |
1813
+ | `TobaccoNicotineProductType.None` | `'none'` |
1814
+ | `TobaccoNicotineProductType.Other` | `'other'` |
1815
+ | `TobaccoNicotineProductType.Pipes` | `'pipes'` |
1816
+ | `TobaccoNicotineProductType.SmokelessTobacco`| `'smokeless tobacco'` |
1817
+ | `TobaccoNicotineProductType.Snuff` | `'snuff'` |
1818
+ | `TobaccoNicotineProductType.Vaping` | `'vaping'` |
1819
+
1820
+ > When `productTypesUsed` includes `Cigars`, `cigarUsagePerYear` (1–999) becomes required on the `tobaccoNicotineUsage` object.
1821
+
1340
1822
  ### `State`
1341
1823
 
1342
1824
  All 50 US states + DC and 12 Canadian provinces/territories:
@@ -1507,76 +1989,446 @@ try {
1507
1989
 
1508
1990
  Always use `APIErrorCode` enum members with `err.isErrorType()`. Do not compare `errorCode` as a raw string - the API uses inconsistent casing.
1509
1991
 
1510
- ### General / Quote
1992
+ > **How error responses work**
1993
+ >
1994
+ > - **Validation failures** (the common case across all products) return HTTP 400 with `error: "InvalidRequestFormat"` and a `value.fields: { <FieldPath>: ["<message>"] }` map. Detect specific failures by inspecting field-level messages — see the [Field-Level Error Messages](#field-level-error-messages) section below.
1995
+ > - **IB Term Quote business errors** return HTTP 400 with one of the codes in the *IB Term Quote Business Errors* table below; `value` is `null` and there is no `fields` map.
1996
+ > - **Get-Existing-Quote business error**: `QuoteNotFound` is returned when the opportunity exists but no quote is stored.
1997
+ > - **`ApplicationLimitReached`**: ADB / GIGDB Start Application only — same SSN, email, or phone matched a policy generated in the last 30 days. IB Term does NOT use this code.
1998
+ > - Codes marked **`@deprecated`** below were returned by older versions of the API. The current API surfaces those failures as field-level messages under `InvalidRequestFormat`. Use the equivalent field-level checks instead. Deprecated codes will remain in the enum until the next major release for backward compatibility.
1999
+
2000
+ ### Universal validation envelope
2001
+
2002
+ | Enum Member | String Value | Description |
2003
+ | ---------------------- | ------------------------ | ---------------------------------------------------------------------------- |
2004
+ | `InvalidRequestFormat` | `'InvalidRequestFormat'` | Top-level code for every FluentValidation failure. Inspect `value.fields`. |
2005
+
2006
+ ### Quote Business Errors (ADB / GIGDB / IB Term)
2007
+
2008
+ Returned by the quote endpoints with `value: null` and `flagStatus: false`. IB Term Quote additionally returns `BenefitPeriodNotAvailable` and `CoverageNotAvailable` in the request-validation envelope (`value.fields`). Personal-info validation failures (first name, last name, email, phone format) and rating-input validation failures (rateClass / healthClass / zip) are surfaced as **field-level messages under `InvalidRequestFormat`** — see [Field-Level Error Messages](#field-level-error-messages).
1511
2009
 
2010
+ | Enum Member | String Value | Applies to | Description |
2011
+ | ------------------------------------ | -------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- |
2012
+ | `StateNotFound` | `'stateNotFound'` | All quotes | State code missing, invalid, or not found |
2013
+ | `NotAvailableForState` | `'NotAvailableForState'` | All quotes | Product not offered for the selected state |
2014
+ | `QuoteNotEligibleForGivenConditions` | `'QuoteNotEligibleForGivenConditions'` | All quotes | Combination of state / age / smoker status not eligible |
2015
+ | `CoverageNotAvailable` | `'CoverageNotAvailable'` | All quotes | Face amount not available for the selected state, age, and smoker status |
2016
+ | `RiderNotAvailable` | `'RiderNotAvailable'` | ADB | Rider not available for the product or state |
2017
+ | `RiderFaceAmountNotValid` | `'RiderFaceAmountNotValid'` | ADB | Rider benefit amount outside the allowed range |
2018
+ | `AgeNotFound` | `'AgeNotFound'` | IB Term | Neither `Age` nor `DateOfBirth` supplied |
2019
+ | `BenefitPeriodNotAvailable` | `'BenefitPeriodNotAvailable'` | IB Term | Benefit period not allowed for the state + age + smoker combination. Returned as either top-level or via `value.fields`. |
2020
+ | `OutsideBuildChart` | `'outsideBuildChart'` | IB Term | Height / weight outside the carrier's build chart |
2021
+ | `HeightNotValid` | `'HeightNotValid'` | IB Term | Height / weight value or combination is invalid |
1512
2022
 
1513
- | Enum Member | String Value | Description |
1514
- | ------------------------------------ | -------------------------------------- | ---------------------------------------------------------------- |
1515
- | `StateNotFound` | `'stateNotFound'` | State code not recognized |
1516
- | `RateClassNotFound` | `'RateClassNotFound'` | Rating input required (rateClass, healthClass, or height/weight) |
1517
- | `RiderNotAvailable` | `'RiderNotAvailable'` | Rider not available in this state or for this age |
1518
- | `HeightNotValid` | `'HeightNotValid'` | Height value is not valid |
1519
- | `InvalidRateclass` | `'InvalidRateclass'` | Rate class value not recognized |
1520
- | `InvalidHealthClass` | `'InvalidHealthClass'` | Health class value not recognized |
1521
- | `ZipCodeNotFound` | `'ZipCodeNotFound'` | ZIP code not recognized |
1522
- | `OutsideBuildChart` | `'outsideBuildChart'` | Height/weight combination not eligible |
1523
- | `QuoteNotEligibleForGivenConditions` | `'QuoteNotEligibleForGivenConditions'` | Product not available for this state/age/tobacco combination |
1524
- | `NotAvailableForState` | `'NotAvailableForState'` | Product not available in the specified state |
1525
- | `BenefitPeriodNotAvailable` | `'BenefitPeriodNotAvailable'` | Benefit period not available for this age/tobacco combination |
1526
- | `CoverageNotAvailable` | `'CoverageNotAvailable'` | Coverage amount not available for the given conditions |
1527
- | `RiderFaceAmountNotValid` | `'RiderFaceAmountNotValid'` | Rider coverage amount outside permitted range |
1528
- | `ThirdPartyQuoteError` | `'ThirdPartyQuoteError'` | General quote generation error |
1529
- | `InvalidQuoteParameters` | `'InvalidQuoteParameters'` | Quote parameters are not valid |
1530
- | `InvalidRequestFormat` | `'InvalidRequestFormat'` | Request format invalid; check required fields |
1531
- | `QuoteNotFound` | `'QuoteNotFound'` | No previous quote found; create a quote first |
2023
+ ### Get Existing Quote
1532
2024
 
2025
+ | Enum Member | String Value | Description |
2026
+ | --------------- | ----------------- | -------------------------------------------------------------------------- |
2027
+ | `QuoteNotFound` | `'QuoteNotFound'` | Returned by ADB / GIGDB / IB Term `get-existing-quote` when no saved quote exists for the opportunity. |
1533
2028
 
1534
- ### GIGDB
2029
+ ### Start Application — duplicate-detection limit
1535
2030
 
2031
+ Fires on ADB / GIGDB Start Application when SSN, email, or phone matches a policy generated within the last 30 days. **IB Term does not use this code.**
1536
2032
 
1537
- | Enum Member | String Value | Description |
1538
- | -------------------------------------------- | ---------------------------------------------- | ----------------------------------------------- |
1539
- | `AgeNotFound` | `'AgeNotFound'` | Age outside 50–85 range |
1540
- | `AgentLogout` | `'AgentLogout'` | Agent session expired; re-authenticate |
1541
- | `DataNotFound` | `'dataNotFound'` | Requested data not found |
1542
- | `StateMismatchIdentified` | `'StateMismatchIdentified'` | State mismatch between quote and application |
1543
- | `InvalidBirthCountry` | `'InvalidBirthCountry'` | Birth country not recognized |
1544
- | `InvalidBirthState` | `'InvalidBirthState'` | Birth state not recognized |
1545
- | `InvalidResidenceState` | `'InvalidResidenceState'` | Residence state not valid |
1546
- | `OneOfTheExistingCoveragesQuestionsNotFound` | `'OneOfTheExistingCoveragesQuestionsNotFound'` | Existing coverage questions incomplete |
1547
- | `PaymentAlreadyMade` | `'PaymentAlreadyMade'` | Payment already submitted for this application |
1548
- | `ErrorInSaveEftPaymentDetails` | `'ErrorInSaveEftPaymentDetails'` | Failed to save EFT details; verify account info |
1549
- | `InvalidPaymentScheduledDate` | `'InvalidPaymentScheduledDate'` | Scheduled payment date is not valid |
2033
+ | Enum Member | String Value | Description |
2034
+ | ------------------------- | --------------------------- | ------------------------------------------------------------------------------ |
2035
+ | `ApplicationLimitReached` | `'ApplicationLimitReached'` | An application with the same SSN, email, or phone has a policy generated within the last 30 days. |
1550
2036
 
2037
+ ### Start Application — business errors (ADB / GIGDB / IB Term)
1551
2038
 
1552
- ### ADB
2039
+ Returned as top-level codes (HTTP 400, `value: null`) when the request body is well-formed but the application cannot be started. Apply to **all three** Start Application endpoints.
1553
2040
 
2041
+ | Enum Member | String Value | Description |
2042
+ | ------------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------- |
2043
+ | `StateMismatchIdentified` | `'StateMismatchIdentified'` | Quote state and `Address.State` on Start App refer to different US states (case-insensitive). Re-quote with the correct residence state. |
2044
+ | `AgentNotFound` | `'agentNotFound'` | The quote cannot be linked to an agent account. Verify the agent token. |
2045
+ | `InternalServerError` | `'internalServerError'`| Unexpected backend failure. Retry; if it persists, contact InstaBrain support. |
1554
2046
 
1555
- | Enum Member | String Value | Description |
1556
- | -------------------- | ---------------------- | ---------------------------------------------------------------------------- |
1557
- | `InvalidStateCode` | `'InvalidStateCode'` | State not supported for ADB (MA, NH, AK unavailable; CA coming next release) |
1558
- | `InvalidAdbAgeRange` | `'InvalidAdbAgeRange'` | Age outside 20–59 range |
2047
+ > Knockout and underwriting **decline** are returned as HTTP 200 with `isDeclined: true` in the response body — **not** as top-level error codes.
1559
2048
 
2049
+ ### Session
1560
2050
 
1561
- ### Final Submit
2051
+ | Enum Member | String Value | Description |
2052
+ | -------------- | ---------------- | ------------------------------------------------------ |
2053
+ | `AgentLogout` | `'AgentLogout'` | Agent session expired; re-authenticate |
1562
2054
 
2055
+ ### Deprecated codes
1563
2056
 
1564
- | Enum Member | String Value | Description |
1565
- | ---------------- | ------------------ | ------------------------------------------------- |
1566
- | `PaymentNotMade` | `'paymentNotMade'` | EFT payment must be completed before final submit |
2057
+ The following codes were returned by older API versions and are kept in the enum for backward compatibility. **They are no longer returned by the current API.** Detect the equivalent failures via field-level messages under `InvalidRequestFormat` — see the [Field-Level Error Messages](#field-level-error-messages) section.
1567
2058
 
2059
+ | Enum Member (deprecated) | Use this field-level message instead |
2060
+ | ---------------------------------------------- | ----------------------------------------------------------------------------------------------- |
2061
+ | ~~`InvalidBirthCountry`~~ | `BirthJurisdiction.Country` → "Birth country code is invalid." |
2062
+ | ~~`InvalidBirthState`~~ | `BirthJurisdiction.State` → "Birth state code is invalid." |
2063
+ | ~~`InvalidResidenceState`~~ | `Address.State` → "Residence state code is invalid." |
2064
+ | ~~`OneOfTheExistingCoveragesQuestionsNotFound`~~ | (no longer returned) |
2065
+ | ~~`PaymentAlreadyMade`~~ | `OpportunityId` → "Quote update is not allowed when payment is already made." |
2066
+ | ~~`ErrorInSaveEftPaymentDetails`~~ | Field-level on EFT request (account holder name / routing / account number) |
2067
+ | ~~`InvalidPaymentScheduledDate`~~ | (no longer returned) |
2068
+ | ~~`ThirdPartyQuoteError`~~ | (generic legacy code; no longer returned) |
2069
+ | ~~`InvalidQuoteParameters`~~ | (generic legacy code; no longer returned) |
2070
+ | ~~`InvalidStateCode`~~ | `Address.State` → "Residence state code is invalid." or quote-specific state messages |
2071
+ | ~~`InvalidAdbAgeRange`~~ | `DateOfBirth` → "Age must be between 20 and 59 for ADB." |
2072
+ | ~~`PaymentNotMade`~~ | `opportunityId` (Final Submit) → "Application has already been final submitted." |
2073
+ | ~~`SecureSignRelatedError`~~ | Field-level on Secure Sign endpoint |
2074
+ | ~~`SigningPackageNotCreated`~~ | Field-level on Secure Sign endpoint |
2075
+ | ~~`SecureSignPinMismatch`~~ | `Pin` → "Pin is required." (Verify PIN endpoint) |
2076
+ | ~~`PinExpired`~~ | Field-level on Verify PIN endpoint |
2077
+ | ~~`DocumentsNotViewed`~~ | Field-level on Verify PIN endpoint |
2078
+ | ~~`DocumentsAlreadySigned`~~ | `OpportunityId` → "Documents are already signed." (Secure Sign endpoints) |
2079
+
2080
+
2081
+ ---
1568
2082
 
1569
- ### Secure Sign
2083
+ ## Field-Level Error Messages
1570
2084
 
2085
+ When the API returns `error: "InvalidRequestFormat"`, inspect `value.fields` (a `Record<string, string[]>`) for per-field messages. The catalog below lists every field path and its exact message text returned by the backend, organized by endpoint family.
2086
+
2087
+ > Use the field paths as map keys. **Case matters** — keys are PascalCase / dotted paths matching the backend DTO property names, not the SDK's camelCase TypeScript field names.
2088
+
2089
+ ### Common patterns (used across ADB / GIGDB / IB Term Start Application)
2090
+
2091
+ | Field path | Message |
2092
+ |---|---|
2093
+ | `QuoteResponseId` | QuoteResponseId is required. |
2094
+ | `QuoteResponseId` | QuoteResponseId does not exist or does not belong to the requested product. |
2095
+ | `FirstName` | First name is required. |
2096
+ | `FirstName` | First name is invalid. Only alphabetic characters are allowed. |
2097
+ | `LastName` | Last name is required. |
2098
+ | `LastName` | Last name is invalid. Only alphabetic characters are allowed. |
2099
+ | `Email` | Email is required. |
2100
+ | `Email` | Please enter a valid email address. |
2101
+ | `PhoneNumber` | Phone number is required. |
2102
+ | `PhoneNumber` | Phone number format is incorrect. Use 10 digits or +1XXXXXXXXXX. |
2103
+ | `PhoneNumber` | Phone number is invalid. |
2104
+ | `IsPayerAlsoOwnerAndInsured` | IsPayerAlsoOwnerAndInsured field is required. |
2105
+ | `DateOfBirth` | Date of birth is required. |
2106
+ | `DateOfBirth` | Date of birth must be a valid date in the past. |
2107
+ | `SocialSecurityNumber` | Social Security Number is required. |
2108
+ | `SocialSecurityNumber` | Social Security Number must be in valid format (e.g., XXX-XX-XXXX). |
2109
+ | `Address` | Address is required. |
2110
+ | `Address.AddressLine1` | Address line is required. |
2111
+ | `Address.AddressLine1` | Street address is invalid. Avoid special characters. |
2112
+ | `Address.City` | Address city is required. |
2113
+ | `Address.City` | City name is invalid. Only letters and spaces are allowed. |
2114
+ | `Address.State` | Residence state is required. |
2115
+ | `Address.State` | Residence state code is invalid. |
2116
+ | `Address.Zipcode` | Zip code is required. |
2117
+ | `Address.Zipcode` | Zip code is invalid. It must be in 5-digit format. |
2118
+ | `Address.Zipcode` | Zip code is not found. |
2119
+ | `HasExistingCoverage` | Existing coverage field is required |
2120
+ | `ExistingCoverageData` | Existing coverage details must be provided when HasExistingCoverage is true. |
2121
+ | `ExistingCoverageData` | Existing coverage details must be null when HasExistingCoverage is false. |
2122
+ | `ExistingCoverageData.ExistingCoverages` | At least one existing coverage entry is required. |
2123
+ | `ExistingCoverageData.IsExistingPolicyBeingTerminated` | Please indicate whether any existing policy is being terminated. |
2124
+ | `ExistingCoverageData.ExistingCoverages[n].NameOfTheCompany` | Please provide the name of the insurance company. |
2125
+ | `ExistingCoverageData.ExistingCoverages[n].InsuranceAmount` | Insurance amount must be provided. |
2126
+ | `ExistingCoverageData.ExistingCoverages[n].DateOfIssue` | Please provide Date of Issue in YYYY-MM format |
2127
+ | `ExistingCoverageData.ExistingCoverages[n].DateOfIssue` | Date of issue must be in YYYY-MM format. |
2128
+ | `ExistingCoverageData.ExistingCoverages[n].ToBeReplaced` | Replacement coverage answer must be specified. |
2129
+ | `ExistingCoverageData.ExistingCoverages[n].ToBeFinanced` | Financing coverage answer must be specified. |
2130
+ | `WillOtherCoverageBeReplacedOrFinanced` | Please indicate whether any other coverage will be replaced or financed. |
2131
+ | `WillOtherCoverageBeReplacedOrFinanced` | Other Coverage be replaced or financed must be either null or false as no existing coverage passed. |
2132
+ | `BeneficiaryDetails` | Beneficiary details are required. |
2133
+ | `BeneficiaryDetails.BeneficiaryType` | Please select a valid beneficiary option. |
2134
+ | `BeneficiaryDetails.BeneficiaryPerson` | Beneficiary person details must be provided. |
2135
+ | `BeneficiaryDetails.BeneficiaryPerson.FirstName` | Beneficiary first name is required. |
2136
+ | `BeneficiaryDetails.BeneficiaryPerson.FirstName` | Beneficiary's first name is invalid. |
2137
+ | `BeneficiaryDetails.BeneficiaryPerson.LastName` | Beneficiary last name is required. |
2138
+ | `BeneficiaryDetails.BeneficiaryPerson.LastName` | Beneficiary's last name is invalid. |
2139
+ | `BeneficiaryDetails.BeneficiaryPerson.Relationship` | Please specify the relationship with the beneficiary. |
2140
+ | `BeneficiaryDetails.NamedEntity` | Named entity details must be provided for this beneficiary type. |
2141
+ | `BeneficiaryDetails.NamedEntity.Name` | Beneficiary name is required. |
2142
+ | `BeneficiaryDetails.NamedEntity.TrustDate` | Trust date must be in YYYY-MM format. |
2143
+ | `IsUsCitizen` | US citizenship status is required. |
2144
+ | `IsLegalUsResident` | Legal US residency status is required for non-US citizens. |
2145
+ | `Email` *(top-level on Start App; ADB / GIGDB only)* | `error: "ApplicationLimitReached"` → "An application with the same email has a policy generated within the last 30 days." |
2146
+ | `PhoneNumber` *(top-level on Start App; ADB / GIGDB only)* | `error: "ApplicationLimitReached"` → "Two applications with the same phone have policies generated within the last 30 days." |
2147
+ | `SocialSecurityNumber` *(top-level on Start App; ADB / GIGDB only)* | `error: "ApplicationLimitReached"` → "An application with the same SSN has a policy generated within the last 30 days." |
2148
+
2149
+ ### ADB — additional messages
2150
+
2151
+ | Field path | Message |
2152
+ |---|---|
2153
+ | `DateOfBirth` | Age must be between 20 and 59 for ADB. |
2154
+ | `Address.State` | This state is currently not supported. |
2155
+ | `Address.State` | This product is not available for the selected state. |
2156
+ | `Occupation` | At least one occupation is required when residence state is CA. |
2157
+ | `Occupation` | One or more selected occupations are invalid. |
2158
+ | `HasMedicalCoverage` | Medical coverage acknowledgement is required when residence state is DC. |
2159
+ | `UnderstandsBenefits` | Supplemental policy benefits acknowledgement is required when residence state is DC. |
2160
+ | `UnderstandsLimitedBenefits` | Limited benefits acknowledgement is required when residence state is DC. |
2161
+ | `ExistingCoverageData.ExistingCoverages[n].NotifyPresentInsurer` | Notify present insurer response is required for Oklahoma when existing coverage is provided. |
2162
+ | `ExistingCoverageData.ExistingCoverages[n].WantsComparativeInformationForm` | Comparative information form preference is required for Florida when existing coverage is provided. |
2163
+ | `ExistingCoverageData.ExistingCoverages[n].WantsPolicySummary` | Policy summary preference is required for Delaware when existing coverage is provided. |
2164
+
2165
+ ### ADB — Update Quote / Get Existing Quote
2166
+
2167
+ | Field path | Message |
2168
+ |---|---|
2169
+ | `OpportunityId` | OpportunityId is required. |
2170
+ | `OpportunityId` | OpportunityId does not exist. |
2171
+ | `OpportunityId` | OpportunityId does not match selected product. |
2172
+ | `OpportunityId` | Quote update is not allowed when payment is already made. |
2173
+ | `FaceAmount` | Coverage amount (FaceAmount) is required. |
2174
+ | `PaymentFreq` | Payment frequency is required. |
2175
+ | `PaymentFreq` | Invalid payment frequency. |
2176
+ | `Riders` | Riders are required. *(Update Quote only)* |
2177
+ | `Riders` | Riders are invalid. |
2178
+
2179
+ ### GIGDB — additional messages
2180
+
2181
+ | Field path | Message |
2182
+ |---|---|
2183
+ | `DateOfBirth` | Age must be between 50 and 85 for GIGDB. |
2184
+ | `Address.State` | This state is currently not supported. |
2185
+ | `Address.State` | This product is not available for the selected state. |
2186
+ | `IsSmoker` | Smoker status is required. |
2187
+ | `NicotineInfo` | Nicotine details are required when applicant is a smoker. |
2188
+ | `NicotineInfo.LastUseDate` | Last nicotine use date is required when applicant is a smoker. |
2189
+ | `NicotineInfo.LastUseDate` | Nicotine last use date must be in YYYY-MM format. |
2190
+ | `BirthJurisdiction` | Birth jurisdiction details are required. |
2191
+ | `BirthJurisdiction.Country` | Birth country is required when applicant is not a U.S. citizen. |
2192
+ | `BirthJurisdiction.Country` | Birth country code is invalid. |
2193
+ | `BirthJurisdiction.State` | Birth state is required when applicant is a U.S. citizen. |
2194
+ | `BirthJurisdiction.State` | Birth state code is invalid. |
2195
+ | `ExistingCoverageData.AreExistingPoliciesIssuedByFidelity` | Please indicate whether any existing policies are issued by Fidelity Life Association (required for RI and WV). |
2196
+ | `ExistingCoverageData.ExistingCoverages[n].RequestsYieldIndices` | Please indicate whether yield indices for cash value policies are requested (required for Massachusetts). |
2197
+ | `ExistingCoverageData.ExistingCoverages[n].NotifyPresentInsurer` | Please indicate whether to notify present insurer(s) (required for Oklahoma). |
2198
+ | `ExistingCoverageData.ExistingCoverages[n].WantsPolicySummary` | Please indicate whether you want a policy summary statement (required for Delaware and Georgia). |
2199
+ | `ExistingCoverageData.ExistingCoverages[n].WantsComparativeInformationForm` | Please indicate whether you want a Comparative Information Form (required for Florida). |
2200
+ | `WillOtherCoverageBeReplacedOrFinancedData` | State-specific replacement data is required when other coverage will be replaced or financed. |
2201
+ | `WillOtherCoverageBeReplacedOrFinancedData.AreReplacedPoliciesIssuedByFidelity` | Please indicate whether any policies being replaced are issued by Fidelity Life Association (required for Kansas when replacing or financing coverage). |
2202
+ | `WillOtherCoverageBeReplacedOrFinancedData.OtherInsuranceReplacementData` | Washington replacement disclosure answers are required when replacing or financing coverage. |
2203
+ | `WillOtherCoverageBeReplacedOrFinancedData.OtherInsuranceReplacementData[n]` | Each Washington replacement disclosure question must be answered. |
2204
+ | `WillOtherCoverageBeReplacedOrFinancedData.OtherInsuranceReplacementData[n].Explain` | Please explain is required when the answer is Yes. |
2205
+
2206
+ ### GIGDB — Update Quote / Get Existing Quote
2207
+
2208
+ | Field path | Message |
2209
+ |---|---|
2210
+ | `OpportunityId` | OpportunityId is required. |
2211
+ | `OpportunityId` | OpportunityId does not exist. |
2212
+ | `OpportunityId` | OpportunityId does not match selected product. |
2213
+ | `OpportunityId` | Quote update is not allowed when payment is already made. |
2214
+ | `FaceAmount` | Coverage amount (FaceAmount) is required. |
2215
+ | `PaymentFreq` | Payment frequency is required. |
2216
+ | `PaymentFreq` | Invalid payment frequency. |
2217
+
2218
+ ### IB Term — Start Application additional messages
2219
+
2220
+ > **Progressive disclosure note:** for IB Term, the following common-pattern "is required" messages above no longer fire (the parent field is optional under progressive disclosure): `DateOfBirth`, `SocialSecurityNumber`, `Address`, `Address.*`, `BirthJurisdiction.*`, `HasExistingCoverage`, `BeneficiaryDetails`, `TobaccoNicotineUsage`. The format / sub-field validators below still apply when the parent block is sent.
2221
+
2222
+ | Field path | Message |
2223
+ |---|---|
2224
+ | `DateOfBirth` | Age must be between 18 and 60 for IB Term. |
2225
+ | `QuoteResponseId` | Child rider was not included in the quote. Cannot add child rider details. |
2226
+ | `ChildRiderInfo` | Child rider details are required because Dependent Child Rider is selected in the quote. |
2227
+ | `AreListedConditionsNotApplicable` | AreListedConditionsNotApplicable is required. |
2228
+ | `IsUsCitizenOrIsPermanentResident` | US citizenship or permanent residency status is required. |
2229
+ | `Height` | Height is required. |
2230
+ | `Height.Feet` | Height feet is required. |
2231
+ | `Height.Feet` | Height feet must be between 1 and 8. |
2232
+ | `Height.Inches` | Height inches is required. |
2233
+ | `Height.Inches` | Height inches must be between 0 and 11. |
2234
+ | `Weight` | Weight is required. |
2235
+ | `Weight` | Weight must be greater than 0. |
2236
+ | `IsHoldingValidDriverLicense` | IsHoldingValidDriverLicense is required. |
2237
+ | `DriverLicenseState` | Driver license state code is invalid. *(Returned only when sent — driver license fields are independent of `IsHoldingValidDriverLicense`.)* |
2238
+ | `DriverLicenseNumber` | Driver license number format is invalid for the selected driver license state. *(Returned only when both fields are sent — driver license fields are independent of `IsHoldingValidDriverLicense`.)* |
2239
+ | `BirthJurisdiction.Country` | Birth jurisdiction country is required (when `BirthJurisdiction` is sent). |
2240
+ | `BirthJurisdiction.State` | Birth jurisdiction state is required when birth country is US. |
2241
+ | `BirthJurisdiction.State` | Birth state code is invalid. |
2242
+ | `PhysicianDetails` | Physician details are required when HasPrimaryCarePhysician is true. |
2243
+ | `PhysicianDetails` | Physician details must be null when HasPrimaryCarePhysician is false. |
2244
+ | `PhysicianDetails.PhysicianName` | Physician name is required when HasPrimaryCarePhysician is true. |
2245
+ | `PhysicianDetails.City` | Physician city/address is required when HasPrimaryCarePhysician is true. |
2246
+ | `PhysicianDetails.StateCode` | Physician state is required when HasPrimaryCarePhysician is true. |
2247
+ | `PhysicianDetails.StateCode` | Outside Of The USA is not allowed for physician state. |
2248
+ | `PhysicianDetails.StateCode` | Physician state code is invalid. |
2249
+ | `PhysicianDetails.LastSeen` | Physician last-seen date is required when HasPrimaryCarePhysician is true. |
2250
+ | `PhysicianDetails.LastSeen` | Physician last-seen date must be in YYYY-MM format (year-month only, e.g. 2025-04; not 2025/04) and must not be after the current month. *(Current month is allowed; only future months are rejected — relaxed.)* |
2251
+ | `TobaccoNicotineUsage.LastUsedPeriod` | Last used period is required *(when `TobaccoNicotineUsage` is sent)*. |
2252
+ | `TobaccoNicotineUsage.LastUsedPeriod` | Last used period must be one of: *(allowed values)*. |
2253
+ | `TobaccoNicotineUsage.LastTimeUsed` | Last time used tobacco/nicotine date is required. |
2254
+ | `TobaccoNicotineUsage.LastTimeUsed` | Last time used tobacco/nicotine date must be in YYYY-MM format. |
2255
+ | `TobaccoNicotineUsage.ProductTypesUsed` | At least one tobacco or nicotine product type must be selected. |
2256
+ | `TobaccoNicotineUsage.ProductTypesUsed` | Each product type must be one of: *(allowed values)*. |
2257
+ | `TobaccoNicotineUsage.CigarUsagePerYear` | Number of times cigars are smoked per year is required when Cigars is selected (i.e. when `ProductTypesUsed` includes `Cigars`). |
2258
+ | `TobaccoNicotineUsage.CigarUsagePerYear` | Cigar usage per year must be greater than 0. |
2259
+ | `TobaccoNicotineUsage.CigarUsagePerYear` | Cigar usage per year must be less than or equal to 999. |
2260
+
2261
+ IB Term shares the state-specific Q-08 messages (MA / OK / DE / GA / FL / RI / WV / KS / WA) with GIGDB — see the GIGDB table above; the field paths are identical.
2262
+
2263
+ ### IB Term — Child Rider
2264
+
2265
+ | Field path | Message |
2266
+ |---|---|
2267
+ | `ChildRiderInfo.IsAnyChildTakingMedication` | Child medication knockout question is required. |
2268
+ | `ChildRiderInfo.IsAnyChildDiagnosedWithDisability` | Child disability knockout question is required. |
2269
+ | `ChildRiderInfo.IsAnyChildDiagnosedWithSevereCondition` | Child severe condition knockout question is required. |
2270
+ | `ChildRiderInfo.IsAnyChildAdvisedForSurgery` | Child surgery knockout question is required. |
2271
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails` | Maximum 10 children to be insured details allowed. |
2272
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren` | Existing coverage details required when HasExistingCoverageForChildren is true. |
2273
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren` | Maximum 10 child existing coverage entries allowed. |
2274
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren` | Total insurance amount for child coverages marked as not replacing existing policies must not exceed 100000. |
2275
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren` | Existing coverage details must be empty when HasExistingCoverageForChildren is false. |
2276
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].FirstName` | Child first name is required. |
2277
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].FirstName` | Invalid child first name. |
2278
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].LastName` | Child last name is required. |
2279
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].LastName` | Invalid child last name. |
2280
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Gender` | Child gender is required. |
2281
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Gender` | Gender must be Male or Female. |
2282
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Height` | Child height is required. |
2283
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Height.Feet` | Child height feet is required. |
2284
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Height.Feet` | Child height feet must be between 0 and 8. |
2285
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Height.Inches` | Child height inches is required. |
2286
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Height.Inches` | Child height inches must be between 0 and 11. |
2287
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Weight` | Child weight is required. |
2288
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Weight` | Child weight must be greater than 0. |
2289
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].DOB` | Child date of birth is required. |
2290
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].DOB` | Child date of birth must be in the past. |
2291
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].DOB` | Child must be between 15 days and under 18 years old. |
2292
+ | `ChildRiderInfo.ChildrenToBeInsuredDetails[n].Relation` | Child relationship is required. |
2293
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren[n].NameOfTheCompany` | Name of the company is required for child existing coverage. |
2294
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren[n].InsuranceAmount` | Insurance amount is required for child existing coverage. |
2295
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren[n].InsuranceAmount` | Insurance amount must be a positive number. |
2296
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren[n].PolicyNumber` | Policy number is required for child existing coverage. |
2297
+ | `ChildRiderInfo.ExistingCoverageInfoForChildren[n].DateOfIssue` | Date of issue is required for child existing coverage. |
2298
+
2299
+ ## IB Term Start Application — Field-to-Question Mapping
2300
+
2301
+ The table below maps every request field on `startIBTermApplication()` to the underwriting question or disclosure it answers, and to the API-level purpose / data shape of the field. The **Question** column is the regulated wording the applicant must see — integrators should display this exact text (or a close adaptation that preserves meaning) in their applicant-facing UI to satisfy state insurance disclosure rules. The **Purpose** column describes what the field represents on the API contract (data type, allowed values, role in the request). Fields with no applicant-facing question (data captures like name / address / IDs) show `—` in the Question column. Source: `IBTermStartApplicationDocs.md` § "Field to Question Mapping".
2302
+
2303
+ > See the `IBTermStartApplicationReq` reference table above for the always-required vs optional split; this table additionally maps the *meaning* of each field.
2304
+
2305
+ | API Field | Question | Purpose | When Required |
2306
+ |---|---|---|---|
2307
+ | `quoteResponseId` | — | Links the application to a previously generated quote. | Always required. |
2308
+ | `firstName` | — | First name of the proposed insured. | Always required. |
2309
+ | `lastName` | — | Last name of the proposed insured. | Always required. |
2310
+ | `email` | — | Email address of the proposed insured. | Always required. |
2311
+ | `phoneNumber` | — | Phone number of the proposed insured. | Always required. |
2312
+ | `isUsCitizenOrIsPermanentResident` | Are you a US citizen or lawful permanent resident who has resided in the US for more than 2 years? | Citizenship / residency knockout flag. | Always required. `false` results in a decline. |
2313
+ | `isPayerAlsoOwnerAndInsured` | Are you the insured, owner, and payor of this policy? | Confirms applicant role — the payer must also be the owner and the insured. | Always required. `false` results in a decline. |
2314
+ | `height.feet` | — | Height — feet component (1–8). | Always required. |
2315
+ | `height.inches` | — | Height — inches component (0–11). | Always required. |
2316
+ | `weight` | — | Weight in pounds (must be > 0). | Always required. |
2317
+ | `areListedConditionsNotApplicable` | By checking the box I confirm the conditions listed are not applicable and able to proceed with the application. | Single-boolean health / legal-history knockout disclosure covering the full conditions list (see "Applicant Disclosure" section above). | Always required. `false` results in a decline. |
2318
+ | `isHoldingValidDriverLicense` | Do you hold a valid driver's license? | Driver license attestation knockout flag. | Always required. `false` results in a decline. |
2319
+ | `driverLicenseState` | — | State that issued the driver's license (2-letter US state). | Optional. Validated when sent. |
2320
+ | `driverLicenseNumber` | — | Driver's license number; format validated against `driverLicenseState`. | Optional. Validated when sent with `driverLicenseState`. |
2321
+ | `dateOfBirth` | — | Date of birth of the proposed insured. | Optional. When sent, age must be 18–60. |
2322
+ | `socialSecurityNumber` | — | Social security number of the proposed insured (9 digits, no dashes). | Optional. |
2323
+ | `address.addressLine1` | — | Street address line 1. | When `address` is sent. |
2324
+ | `address.city` | — | City. | When `address` is sent. |
2325
+ | `address.state` | — | State of residence (must match the quote state). | When `address` is sent. |
2326
+ | `address.zipcode` | — | 5-digit US zip code. | When `address` is sent. |
2327
+ | `birthJurisdiction.country` | — | Country of birth (ISO country code). | When `birthJurisdiction` is sent. |
2328
+ | `birthJurisdiction.state` | — | State of birth (US state selection). | When `birthJurisdiction.country` is `"US"`. |
2329
+ | `tobaccoNicotineUsage.lastUsedPeriod` | When did you last use tobacco or nicotine products? | Usage-period bucket: `"never used"`, `"within the last 12 months"`, `"12 to 23 months"`, `"24 to 35 months"`, `"36 months or greater"`. | When `tobaccoNicotineUsage` is sent. |
2330
+ | `tobaccoNicotineUsage.productTypesUsed` | Which tobacco or nicotine products have you used? | Array of product-type strings. | When `tobaccoNicotineUsage` is sent and `lastUsedPeriod` is not `"never used"`. |
2331
+ | `tobaccoNicotineUsage.lastTimeUsed` | When was the most recent time you used tobacco or nicotine? | Year-month (`YYYY-MM`) of last use. | When `tobaccoNicotineUsage` is sent and `lastUsedPeriod` is not `"never used"`. |
2332
+ | `tobaccoNicotineUsage.cigarUsagePerYear` | How many cigars do you smoke per year? | Integer 1–999. | When `productTypesUsed` contains cigars only. |
2333
+ | `hasPrimaryCarePhysician` | Do you have a primary care physician? | Yes/no flag; when `true`, supply `physicianDetails`. | Optional. |
2334
+ | `physicianDetails.physicianName` | What is the name of your primary care physician? | Physician name string. | When `hasPrimaryCarePhysician` is `true`. |
2335
+ | `physicianDetails.city` | In which city does your physician practice? | Physician city string. | When `hasPrimaryCarePhysician` is `true`. |
2336
+ | `physicianDetails.stateCode` | In which state does your physician practice? | 2-letter US state (`"Outside Of The USA"` is rejected). | When `hasPrimaryCarePhysician` is `true`. |
2337
+ | `physicianDetails.lastSeen` | When did you last see your physician? | Year-month (`YYYY-MM`); current month or earlier. | When `hasPrimaryCarePhysician` is `true`. |
2338
+ | `beneficiaryDetails.beneficiaryType` | Who is your primary beneficiary? | Type of primary beneficiary. Must be one of the IB Term-specific values: `"Person"`, `"Trust"`, `"Insured Estate"`, `"All Children Of The Insured Equally"`, `"All Children Of The Marriage Equally"`. | When `beneficiaryDetails` is sent. |
2339
+ | `beneficiaryDetails.beneficiaryPerson.firstName` | What is your beneficiary's first name? | Beneficiary's first name. | Required when `beneficiaryType` is `"Person"`. |
2340
+ | `beneficiaryDetails.beneficiaryPerson.lastName` | What is your beneficiary's last name? | Beneficiary's last name. | Required when `beneficiaryType` is `"Person"`. |
2341
+ | `beneficiaryDetails.beneficiaryPerson.relationship` | What is your relationship to the beneficiary? | Beneficiary's relationship to the insured. | Required when `beneficiaryType` is `"Person"`. |
2342
+ | `beneficiaryDetails.namedEntity.name` | What is the name of the trust or estate? | Name of the trust or estate. | Required when `beneficiaryType` is `"Trust"`. |
2343
+ | `beneficiaryDetails.namedEntity.trustDate` | When was the trust established? | Year-month (`YYYY-MM`) of trust formation. | Optional. |
2344
+ | `beneficiaryDetails.namedEntity.taxId` | What is the trust's tax ID? | Tax identifier for the trust. | Optional. |
2345
+ | `hasExistingCoverage` | Do you have any existing life insurance or annuity contracts in force? | Triggers the existing-coverage replacement-disclosure block. | When sent as `true` or `false`. |
2346
+ | `existingCoverageData.isExistingPolicyBeingTerminated` | Are you considering terminating an existing policy? | Yes/no flag per state replacement-disclosure rules. | Required when `hasExistingCoverage` is `true`. |
2347
+ | `existingCoverageData.areExistingPoliciesIssuedByFidelity` | Are any of your existing policies issued by Fidelity Life Association? | RI / WV-specific disclosure flag. | Required for RI and WV. |
2348
+ | `existingCoverageData.existingCoverages[].nameOfTheCompany` | What is the name of the insurance company for this existing coverage? | Per-policy insurer name. | Required per existing coverage entry. |
2349
+ | `existingCoverageData.existingCoverages[].insuranceAmount` | What is the coverage amount of this existing policy? | Per-policy face amount (string). | Required per existing coverage entry. |
2350
+ | `existingCoverageData.existingCoverages[].dateOfIssue` | When was this existing policy issued? | Year-month (`YYYY-MM`) of policy issuance. | Required per existing coverage entry. |
2351
+ | `existingCoverageData.existingCoverages[].toBeReplaced` | Will this existing policy be replaced? | Per-policy replacement flag. | Required per existing coverage entry. |
2352
+ | `existingCoverageData.existingCoverages[].toBeFinanced` | Will funds from this policy be used to pay premiums on the new policy? | Per-policy financing flag. | Required per existing coverage entry. |
2353
+ | `existingCoverageData.existingCoverages[].requestsYieldIndices` | Would you like to request yield indices for cash value policies? | MA-only per-policy disclosure flag. | Required for MA only. |
2354
+ | `existingCoverageData.existingCoverages[].notifyPresentInsurer` | Should we notify your present insurer(s) regarding this transaction? | OK-only per-policy disclosure flag. | Required for OK only. |
2355
+ | `existingCoverageData.existingCoverages[].wantsPolicySummary` | Do you want a policy summary statement from your existing insurer? | DE / GA-only per-policy disclosure flag. | Required for DE and GA only. |
2356
+ | `existingCoverageData.existingCoverages[].wantsComparativeInformationForm` | Do you wish to receive a Comparative Information Form? | FL-only per-policy disclosure flag. | Required for FL only. |
2357
+ | `willOtherCoverageBeReplacedOrFinanced` | Will any existing coverage be cancelled, lapsed, or financed as part of this application? | Top-level replacement question; when `true`, supply the `willOtherCoverageBeReplacedOrFinancedData` block. | Required when `hasExistingCoverage` is `true`. |
2358
+ | `willOtherCoverageBeReplacedOrFinancedData.areReplacedPoliciesIssuedByFidelity` | Are any of the policies being replaced issued by Fidelity Life Association? | KS-specific disclosure flag. | Required for KS when replacing or financing. |
2359
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.mayReduceBenefitsIncreasePremiums` | Can there be reduced benefits or increased premiums in later years? | WA adverse-effect disclosure flag. | Required for WA when replacing or financing. |
2360
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.specifyReduceBenefitsIncreasePremiums` | If yes, please explain. | Free-text explanation when the preceding boolean is `true`. | Required when the corresponding boolean is `true`. |
2361
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.hasNewPolicyCharges` | Are there penalties or surrender charges for the new policy? | WA adverse-effect disclosure flag. | Required for WA when replacing or financing. |
2362
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.specifyNewPolicyCharges` | If yes, please explain (emphasising early-withdrawal costs). | Free-text explanation when the preceding boolean is `true`. | Required when the corresponding boolean is `true`. |
2363
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.hasPriorPolicyCharges` | Will there be penalties or surrender charges under the existing insurance? | WA adverse-effect disclosure flag. | Required for WA when replacing or financing. |
2364
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.specifyPriorPolicyCharges` | If yes, please explain. | Free-text explanation when the preceding boolean is `true`. | Required when the corresponding boolean is `true`. |
2365
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.hasTaxConsequences` | Are there adverse tax consequences from the replacement? | WA adverse-effect disclosure flag. | Required for WA when replacing or financing. |
2366
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.specifyTaxConsequences` | If yes, please explain. | Free-text explanation when the preceding boolean is `true`. | Required when the corresponding boolean is `true`. |
2367
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.hasInterestConsiderations` | Are interest earnings a consideration in this replacement? | WA adverse-effect disclosure flag. | Required for WA when replacing or financing. |
2368
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.specifyInterestConsiderations` | If yes, please explain which portions of premiums will produce limited or no earnings. | Free-text explanation when the preceding boolean is `true`. | Required when the corresponding boolean is `true`. |
2369
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.hasMinRequirementsBeforeInterest` | Are minimum amounts required before excess interest will be paid? | WA adverse-effect disclosure flag. | Required for WA when replacing or financing. |
2370
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.specifyMinRequirementsBeforeInterest` | If yes, please explain. | Free-text explanation when the preceding boolean is `true`. | Required when the corresponding boolean is `true`. |
2371
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.hasOtherAdverseEffects` | Are there other short or long-term effects that might be materially adverse? | WA adverse-effect disclosure flag. | Required for WA when replacing or financing. |
2372
+ | `willOtherCoverageBeReplacedOrFinancedData.otherInsuranceReplacementData.specifyOtherAdverseEffects` | If yes, please explain. | Free-text explanation when the preceding boolean is `true`. | Required when the corresponding boolean is `true`. |
2373
+ | `childRiderInfo.isAnyChildDiagnosedWithDisability` | Has any Proposed Child (Children) to be Insured been diagnosed with or treated by a Physician for any physical or mental disability? | Child rider health knockout. | Required when child rider is on the quote. `true` declines. |
2374
+ | `childRiderInfo.isAnyChildDiagnosedWithSevereCondition` | Has any Proposed Child (Children) to be Insured ever been diagnosed with or treated by a physician for any disorder of the heart, lung or for cancer? | Child rider health knockout. | Required when child rider is on the quote. `true` declines. |
2375
+ | `childRiderInfo.isAnyChildTakingMedication` | Is any Proposed Child (Children) to be Insured now taking medication, by prescription or over the counter (OTC), or undergoing treatment or therapy of any kind by a member of the medical profession? | Child rider health knockout. | Required when child rider is on the quote. `true` declines. |
2376
+ | `childRiderInfo.isAnyChildAdvisedForSurgery` | Within the last 5 years, has any Proposed Child (Children) to be Insured been advised by a member of the medical profession to have any surgery or hospitalization which has not yet been completed? | Child rider health knockout. | Required when child rider is on the quote. `true` declines. |
2377
+ | `childRiderInfo.childrenToBeInsuredDetails[].firstName` | — | Child's first name. | Required per child when that child entry is sent. |
2378
+ | `childRiderInfo.childrenToBeInsuredDetails[].lastName` | — | Child's last name. | Required per child when that child entry is sent. |
2379
+ | `childRiderInfo.childrenToBeInsuredDetails[].gender` | — | Child's gender (`Male` / `Female` or integer 1 / 2). | Required per child when that child entry is sent. |
2380
+ | `childRiderInfo.childrenToBeInsuredDetails[].height.feet` | — | Child's height — feet component. | Required per child when that child entry is sent. |
2381
+ | `childRiderInfo.childrenToBeInsuredDetails[].height.inches` | — | Child's height — inches component. | Required per child when that child entry is sent. |
2382
+ | `childRiderInfo.childrenToBeInsuredDetails[].weight` | — | Child's weight in pounds. | Required per child when that child entry is sent. |
2383
+ | `childRiderInfo.childrenToBeInsuredDetails[].dob` | — | Child's date of birth (15 days – under 18 years). | Required per child when that child entry is sent. |
2384
+ | `childRiderInfo.childrenToBeInsuredDetails[].relation` | — | Child's relationship to the proposed insured. | Required per child when that child entry is sent. |
2385
+ | `childRiderInfo.existingCoverageInfoForChildren[].nameOfTheCompany` | — | Name of the company holding the child's existing coverage. | Required per child existing coverage entry when `hasExistingCoverageForChildren` is `true`. |
2386
+ | `childRiderInfo.existingCoverageInfoForChildren[].policyNumber` | — | Policy number of the child's existing coverage. | Required per child existing coverage entry. |
2387
+ | `childRiderInfo.existingCoverageInfoForChildren[].insuranceAmount` | — | Insurance amount of the child's existing coverage (string). | Required per child existing coverage entry. |
2388
+ | `childRiderInfo.existingCoverageInfoForChildren[].dateOfIssue` | — | Year-month (`YYYY-MM`) of policy issuance. | Required per child existing coverage entry. |
2389
+ | `childRiderInfo.existingCoverageInfoForChildren[].toBeReplaced` | Will the child's existing policy be replaced? | Per-policy replacement flag. | Required per child existing coverage entry. |
2390
+ | `childRiderInfo.existingCoverageInfoForChildren[].toBeFinanced` | Will funds from the child's existing policy be used to pay premiums? | Per-policy financing flag. | Required per child existing coverage entry. |
2391
+
2392
+ ### Shared APIs — EFT Payment
2393
+
2394
+ `POST /api/ThirdPartyPayment/save-eft-payment`
2395
+
2396
+ | Field path | Message |
2397
+ |---|---|
2398
+ | `OpportunityId` | OpportunityId is required. |
2399
+ | `AccountHolderName` | Account holder name is required. |
2400
+ | `AccountHolderName` | Account holder name must be 100 characters or fewer. |
2401
+ | `RoutingNumber` | Routing number is required. |
2402
+ | `RoutingNumber` | Routing number must be 9 digits. |
2403
+ | `AccountNumber` | Account number is required. |
2404
+ | `AccountNumber` | Account number must be 4 to 17 digits. |
2405
+
2406
+ ### Shared APIs — Secure Sign (Prepare / Send PIN / Resend PIN / Verify PIN)
2407
+
2408
+ | Field path | Message | Endpoints |
2409
+ |---|---|---|
2410
+ | `OpportunityId` | OpportunityId is required. | All four |
2411
+ | `OpportunityId` | OpportunityId does not exist. | All four |
2412
+ | `OpportunityId` | Documents are already signed. | All four (terminal state — do not retry) |
2413
+ | `FlagSendSms` | FlagSendSms is required. | Send PIN, Resend PIN |
2414
+ | `FlagSendEmail` | FlagSendEmail is required. | Send PIN, Resend PIN |
2415
+ | `FlagSendSms` / `FlagSendEmail` | At least one delivery channel (SMS or Email) must be selected. | Send PIN, Resend PIN |
2416
+ | `FlagSendSms` / `FlagSendEmail` | Only one delivery channel can be selected at a time. | Send PIN, Resend PIN |
2417
+ | `Pin` | Pin is required. | Verify PIN |
2418
+ | `IsScriptReadConfirmed` | IsScriptReadConfirmed is required. | Verify PIN |
2419
+ | `IsScriptReadConfirmed` | IsScriptReadConfirmed must be true. | Verify PIN |
2420
+
2421
+ ### Shared APIs — Final Submit
2422
+
2423
+ `POST /api/ThirdPartyApplication/final-submit`
2424
+
2425
+ | Field path | Message |
2426
+ |---|---|
2427
+ | `opportunityId` | OpportunityId is required. |
2428
+ | `opportunityId` | OpportunityId does not exist. |
2429
+ | `opportunityId` | Application has already been final submitted. *(terminal state — do not retry)* |
1571
2430
 
1572
- | Enum Member | String Value | Description |
1573
- | -------------------------- | ---------------------------- | -------------------------------------------------------- |
1574
- | `SecureSignRelatedError` | `'SecureSignRelatedError'` | General signing error |
1575
- | `SigningPackageNotCreated` | `'SigningPackageNotCreated'` | No signing package exists; complete previous steps first |
1576
- | `SecureSignPinMismatch` | `'SecureSignPinMismatch'` | PIN entered is incorrect |
1577
- | `PinExpired` | `'PinExpired'` | PIN has expired; request a new one |
1578
- | `DocumentsNotViewed` | `'DocumentsNotViewed'` | All documents must be viewed before verifying PIN |
1579
- | `DocumentsAlreadySigned` | `'DocumentsAlreadySigned'` | Documents already signed for this application |
2431
+ > **Authorization** (Secure Sign + Final Submit): HTTP `403` when the `opportunityId` is not authorized for the agent token. This is enforced by middleware and not captured in the `error` / `value.fields` envelope.
1580
2432
 
1581
2433
 
1582
2434
  ---