Download OpenAPI specification:
Verify the health of iJoin services before or during an integration rollout. The health check authenticates with your X-API-Key and confirms connectivity to the API service and its backing services.
Checks connectivity from the API service to its backing services (database and cache). Authenticate with your X-API-Key header. Returns 200 OK with status: "up" when every backing service is reachable, and 503 Service Unavailable with status: "down" when any is not. Use this endpoint to verify the health of iJoin services before or during an integration rollout.
curl https://api.ijoin401k.com/api/v3/marketplace/health{- "status": "up"
}All calculation endpoints authenticate with a single mechanism: an API key passed in the X-API-Key request header.
X-API-Key: <your-api-key>
401 Unauthorized. A key that is valid but not permitted for the requested resource returns 403 Forbidden.{
"error": "Unauthorized",
"message": "API key is required",
"statusCode": 401
}
The iJoin AMA endpoint calculates against a managed account provider configured in the iJoin advisor portal. The provider supplies the model the engine runs, and the branding and disclosure content returned alongside every set of allocations, so it has to exist before the endpoint can answer.
Only a provider whose investment methodology is iJoin AMA Methodology can be used. A managedAccountProviderId that is unknown, that your API key is not entitled to, or that is configured with any other methodology all return a 404.
In the advisor portal go to Settings › MAP Providers. The list shows every provider your organization has, with the investment methodology each one uses. Choose Add Provider.
Set a Provider Name, then set Investment Methodology to iJoin AMA Methodology. This is the choice that makes the provider usable from the AMA endpoint.
Upload Logo accepts a PNG, JPG or WEBP up to 1MB. Whatever you upload is returned as the fully qualified logoUri on every calculation, so callers can present your branding beside the allocations.
Everything in Display & Disclosures is returned by the endpoint, so a caller can present the allocations with the disclosure material that has to accompany them:
| Field | Returned as |
|---|---|
| Display Name | displayName |
| Phone | displayPhoneNumber |
displayEmail |
|
| ADV / Other Info Link | advLink |
| Fee Disclosure Message | feeDisclosure |
| Additional Disclosures | additionalDisclosure |
| CONNECT Disclosures | connectDisclosure |
Model Key is required for this methodology. It selects the model the engine runs, and the endpoint takes it from the provider rather than from the request, so a calculation can never contradict what was configured here.
Set Enabled for use to Yes when the provider is ready. Then save.
Every request to the AMA endpoint carries the provider's id as managedAccountProviderId. There are two ways to get it.
From the MAP Providers list, open the row's action menu and choose Copy Provider ID.
Or reopen the provider for editing, where the id is shown at the top with a copy control beside it. It appears only when editing, since a provider has no id until it is saved.
| Convention | Detail |
|---|---|
callId |
Every calculation response includes a unique callId, and error responses include it too whenever the calculation was reached. Treat the callId as your support reference id: quote it whenever you contact iJoin support about a calculation, as it lets iJoin trace the exact execution and diagnose the issue immediately. Log it for every call. |
| Dates | All date fields are strings in strict YYYY-MM-DD format. Any other format is rejected with a 400 validation error. |
| Numbers | Rates and percentages are fractions between 0 and 1 (0.06 means 6%). Employer match amounts are ratios on the same scale (0.5 matches 50 cents per dollar), as are the category allocations you submit and the fund allocations returned, each of which sums to 1. Dollar fields are plain dollar amounts. |
| Rate limiting | Requests are throttled per caller. Handle 429 Too Many Requests with exponential backoff. |
| Required vs Optional | Required fields are marked as such in each request schema. Omitting a required field returns a 400 validation error; defaults are noted where they apply. |
| Tracing | You may send an x-request-id header with any request; iJoin adopts it as the trace id and propagates it through calculation tracing end to end. Every response echoes the id back in the x-request-id response header (iJoin generates one when you do not send it). When contacting support, the response callId is your reference id; include your request id alongside it if you set one. |
| Validation errors | Invalid requests (body or query parameters) return 400 with a message array listing every failed constraint (see Error Reference). |
The calculation endpoints. Authenticate via X-API-Key; every response returns a callId to quote in any support request.
Performs baseline retirement goal calculations and shortfall analysis for plans using a Managed Account Provider (MAP).
All inputs are passed as query parameters. retirementData in the response continues through the participant's full projected retirement horizon.
| birthDate required | string^\d{4}-\d{2}-\d{2}$ Example: birthDate=1985-04-12 Participant's date of birth ( |
| desiredRetirementIncomeAmount | number Example: desiredRetirementIncomeAmount=76000 Annual income target during retirement. |
| desiredRetirementIncomeDate required | string^\d{4}-\d{2}-\d{2}$ Example: desiredRetirementIncomeDate=2050-05-01 Target retirement commencement date ( |
| erMatchTier1DeferralRate | number [ 0 .. 0.15 ] Example: erMatchTier1DeferralRate=0.03 Tier 1: deferral percentage the tier matches up to. |
| erMatchTier1MatchingAmount | number [ 0 .. 5 ] Example: erMatchTier1MatchingAmount=1 Tier 1: match ratio within the tier ( |
| erMatchTier2DeferralRate | number [ 0 .. 0.15 ] Example: erMatchTier2DeferralRate=0.05 Tier 2 deferral ceiling. |
| erMatchTier2MatchingAmount | number [ 0 .. 5 ] Example: erMatchTier2MatchingAmount=0.5 Tier 2 match ratio. |
| erMatchTier3DeferralRate | number [ 0 .. 0.15 ] Tier 3 deferral ceiling. |
| erMatchTier3MatchingAmount | number [ 0 .. 5 ] Tier 3 match ratio. |
| erMatchTier4DeferralRate | number [ 0 .. 0.15 ] Tier 4 deferral ceiling. |
| erMatchTier4MatchingAmount | number [ 0 .. 5 ] Tier 4 match ratio. |
| erMatchTier5DeferralRate | number [ 0 .. 0.15 ] Tier 5 deferral ceiling. |
| erMatchTier5MatchingAmount | number [ 0 .. 5 ] Tier 5 match ratio. |
| erOtherFlatDollarAmount | number >= 0 Non-matching employer contribution, flat dollars per year. |
| erOtherPercentOfCompensation | number [ 0 .. 0.25 ] Example: erOtherPercentOfCompensation=0.01 Non-matching employer contribution as a percent of compensation. |
| estimatedAnnualWages required | number >= 0 Example: estimatedAnnualWages=95000 Current annualized salary. |
| gender | string Enum: "M" "F" Example: gender=F Participant gender. |
| inflation | number Custom annual inflation rate assumption. |
| nqdcDeferralDollars | number Non-qualified deferred compensation deferral dollars. |
| nqdcDeferralPercent | number [ 0 .. 1 ] Non-qualified deferred compensation deferral percent. |
| otherPensionMonth | number Monthly income from an external pension. |
| otherPostTaxBalances | number >= 0 Post-tax balances held outside the employer plan. |
| otherPreTaxBalances | number >= 0 Example: otherPreTaxBalances=45000 Pre-tax balances held outside the employer plan. |
| otherRothBalances | number >= 0 Roth balances held outside the employer plan. |
| percentOrDollar | string Enum: "Dollar" "Percent" Example: percentOrDollar=Percent Whether deferrals are expressed as |
| postTaxBalance required | number >= 0 Default: 0 Current post-tax plan balance. Defaults to |
| postTaxDeferralDollars | number Post-tax deferral as a flat dollar amount per pay period. |
| postTaxDeferralPercent | number [ 0 .. 1 ] Post-tax deferral as a percent of wages. |
| preTaxBalance required | number >= 0 Default: 0 Example: preTaxBalance=120000 Current pre-tax plan balance. Defaults to |
| preTaxDeferralDollars | number Pre-tax deferral as a flat dollar amount per pay period. |
| preTaxDeferralDollarsCatchup | number >= 0 Pre-tax catch-up deferral dollars per pay period. |
| preTaxDeferralDollarsFrequency | number Enum: 52 26 24 12 Pay periods per year for dollar deferrals (e.g. |
| preTaxDeferralPercent | number [ 0 .. 1 ] Example: preTaxDeferralPercent=0.06 Pre-tax deferral as a percent of wages. |
| preTaxDeferralPercentCatchup | number [ 0 .. 1 ] Pre-tax catch-up deferral percent. |
| rorDiy | number Expected annual rate of return driving the projection. |
| rothBalance | number >= 0 Example: rothBalance=15000 Current Roth balance in the plan. |
| rothDeferralDollars | number Roth deferral as a flat dollar amount per pay period. |
| rothDeferralDollarsCatchup | number >= 0 Roth catch-up deferral dollars per pay period. |
| rothDeferralDollarsFrequency | number Enum: 52 26 24 12 Pay periods per year for Roth dollar deferrals. |
| rothDeferralPercent | number [ 0 .. 1 ] Example: rothDeferralPercent=0.02 Roth deferral as a percent of wages. |
| rothDeferralPercentCatchup | number [ 0 .. 1 ] Roth catch-up deferral percent. |
curl "https://api.ijoin401k.com/api/v3/calcs/goal-projection?birthDate=1985-04-12&desiredRetirementIncomeAmount=76000&desiredRetirementIncomeDate=2050-05-01&erMatchTier1DeferralRate=0.03&erMatchTier1MatchingAmount=1&erMatchTier2DeferralRate=0.05&erMatchTier2MatchingAmount=0.5&erOtherPercentOfCompensation=0.01&estimatedAnnualWages=95000&gender=F&otherPreTaxBalances=45000&percentOrDollar=Percent&postTaxBalance=0&preTaxBalance=120000&preTaxDeferralPercent=0.06&rothBalance=15000&rothDeferralPercent=0.02" \ -H "X-API-Key: ${IJOIN_API_KEY}"
{- "callId": "7b3f9d21-6c48-4a0e-b5d7-2e9f8c4a1d06",
- "currentEstimate": 1148392.55,
- "retirementData": [
- {
- "annualAnnuityIncome": 0,
- "annualEeplanIncome": 45865.8,
- "annualOtherInvIncome": 3900,
- "annualSocialSecurityIncome": 29415.12,
- "discretionarySpend": 22800,
- "essentialSpend": 53200,
- "retirementYear": 2050
}, - {
- "annualAnnuityIncome": 0,
- "annualEeplanIncome": 46783.12,
- "annualOtherInvIncome": 3978,
- "annualSocialSecurityIncome": 30003.42,
- "discretionarySpend": 23256,
- "essentialSpend": 54264,
- "retirementYear": 2051
}, - {
- "annualAnnuityIncome": 0,
- "annualEeplanIncome": 47718.78,
- "annualOtherInvIncome": 4057.56,
- "annualSocialSecurityIncome": 30603.49,
- "discretionarySpend": 23721.12,
- "essentialSpend": 55349.28,
- "retirementYear": 2052
}
], - "riskProfile": "Moderate",
- "shortfall": 0,
- "totalProjGoalCompletionAtRet": 104.2,
- "totalProjMnthlyERplanAtRet": 3822.15,
- "totalProjMnthlyIncomeAtRet": 6598.41,
- "totalProjMnthlyNeedAtRet": 6333.33,
- "totalProjMnthlyOtherInvAtRet": 325,
- "totalProjMnthlySocSecAtRet": 2451.26
}Calculates a personal rate of return (PRR) over a period using a money-weighted, annualized method that accounts for the timing and size of every cash flow.
Supply beginningBalance, endingBalance, and the cashFlows that occurred between them, and the return is computed entirely from the values you pass. Each cash flow amount is negative for a contribution (money paid in) and positive for a withdrawal (money taken out). Omit cashFlows when there was no activity between the two balances.
When startDate is omitted it defaults to the earliest cash flow; when endDate is omitted it defaults to today.
| beginningBalance required | number Portfolio value at the start of the measurement period. |
Array of objects (CashFlowDto) <= 5000 items Dated contributions and withdrawals over the period. A contribution is a negative amount; a withdrawal is a positive amount. Omit or pass an empty array when there was no activity between the two balances. | |
| endDate | string^\d{4}-\d{2}-\d{2}$ End of the measurement period ( |
| endingBalance required | number Portfolio value at the end of the measurement period. |
| startDate | string^\d{4}-\d{2}-\d{2}$ Start of the measurement period ( |
{- "beginningBalance": 120000,
- "cashFlows": [
- {
- "amount": -6000,
- "date": "2024-06-30"
}, - {
- "amount": -6000,
- "date": "2024-12-31"
}
], - "endDate": "2025-06-30",
- "endingBalance": 148392.55,
- "startDate": "2024-01-01"
}{- "annualizedReturn": 0.0842,
- "beginningBalance": 120000,
- "endingBalance": 148392.55,
- "growthMultiple": 1.2366,
- "investmentGain": 16392.55,
- "netContributions": 12000,
- "periodYears": 1.5,
- "prr": 0.0842,
- "totalContributions": 12000,
- "totalFees": 0,
- "totalWithdrawals": 0
}Advice engine endpoints that generate asset allocations and fund selections for a participant. Authenticate via X-API-Key; every response returns a callId to quote in any support request.
Generates asset allocations for a participant’s risk profile across the submitted fund lineup, and returns the disclosure material that must accompany them.
Every request identifies the provider by managedAccountProviderId. The provider's ADV / other information link, logo and disclosures are returned alongside the allocations so they can be presented together.
The provider must be configured with the iJoin AMA methodology. A managedAccountProviderId that is unknown, that your API key is not entitled to, or that is configured with any other methodology all return a 404.
The model is taken from the provider's configuration, so there is no modelKey on this request.
Each fund is identified by its cusip, and every returned allocation echoes the cusip of the matching submitted fund. Supply allocations to steer the result toward category-level targets. Each category is a Morningstar category name (Large Blend, Intermediate Core Bond), not a broad asset-class label, and each allocation is a decimal between 0 and 1 with the set summing to 1. A category the engine cannot map, or one no submitted fund belongs to, is reported back in messages. When none of the submitted funds can be allocated (for example, unrecognized CUSIPs), the request returns a 422 carrying the callId to quote in any support request and a messages array explaining what could not be allocated.
Don't know the participant's risk profile? Call the Goal Projection endpoint first and use the riskProfile from its response to select the riskProfile value here.
Array of objects (LeafHouseAllocationDto) Category-level allocation targets to map from an external allocation. | |
| birthDate required | string Participant's date of birth ( |
required | Array of objects (LeafHouseFundDto) non-empty Fund universe to allocate across. Must contain at least one fund. |
| managedAccountProviderId required | string\S+ Managed account provider requesting the calculation. Must be a provider your organization
is entitled to that is configured with the iJoin AMA methodology; anything else returns
a |
| riskProfile required | string Enum: "Agg" "Con" "Mod" "ModAgg" "ModCon" Participant risk profile tier. |
| submodel | string^EP\d+$ Franklin Templeton GOE submodel (e.g. |
{- "allocations": [
- {
- "allocation": 0.45,
- "category": "Large Blend"
}, - {
- "allocation": 0.2,
- "category": "Small Blend"
}, - {
- "allocation": 0.3,
- "category": "Intermediate Core Bond"
}, - {
- "allocation": 0.05,
- "category": "Inflation Protected Bond"
}
], - "birthDate": "1985-04-12",
- "funds": [
- {
- "cusip": "922908363"
}, - {
- "cusip": "922031869"
}, - {
- "cusip": "464287655"
}, - {
- "cusip": "921937835"
}
], - "managedAccountProviderId": "51754dce-65e0-4d63-8ec9-acff9fd4b9a9",
- "riskProfile": "ModAgg"
}{- "additionalDisclosure": "Registration does not imply a certain level of skill or training.",
- "allocations": [
- {
- "allocation": 0.55,
- "cusip": "922908363"
}, - {
- "allocation": 0.45,
- "cusip": "464287655"
}
], - "callId": "string",
- "connectDisclosure": "LeafHouse is a registered investment advisor.",
- "displayEmail": "service@leafhousefinancial.com",
- "displayName": "LeafHouse Financial",
- "displayPhoneNumber": "+15125551234",
- "feeDisclosure": "An annual advisory fee of 0.35% is deducted quarterly.",
- "messages": [
- "Failed to allocate any fund in category Small Blend. Allocation missed 20.0000%"
]
}Generates asset allocations and fund selections for a participant's risk profile and chosen model via the LeafHouse engine.
Each fund is identified by its cusip, and every returned allocation echoes the cusip of the matching submitted fund. When none of the submitted funds can be allocated (for example, unrecognized CUSIPs), the request returns a 422 carrying the callId to quote in any support request and a messages array explaining what could not be allocated.
birthDate is required: the engine resolves its models by the participant's age, so the participant's date of birth must be supplied. Age also drives fund selection directly — CPGTD1 allocates to the target-date fund matching the participant's projected retirement year, so the submitted lineup must include those funds.
Supply allocations to steer the result toward category-level targets. Each category is a Morningstar category name (Large Blend, Intermediate Core Bond), not a broad asset-class label, and each allocation is a decimal between 0 and 1 with the set summing to 1. A category the engine cannot map, or one no submitted fund belongs to, is reported back in messages.
FKGOE1 resolves its age profiles per submodel; the optional submodel (e.g. EP1, the default) is only used with this model key.
Don't know the participant's risk profile? Call the Goal Projection endpoint first and use the riskProfile from its response to select the riskProfile value here.
Array of objects (LeafHouseAllocationDto) Category-level allocation targets to map from an external allocation. | |||||||||||||
| birthDate required | string Participant's date of birth ( | ||||||||||||
required | Array of objects (LeafHouseFundDto) non-empty Fund universe to allocate across. Must contain at least one fund. | ||||||||||||
| modelKey | string Default: "IJN001"
Model identifier. Defaults to | ||||||||||||
| riskProfile required | string
Participant risk profile tier. | ||||||||||||
| submodel | string^EP\d+$ Franklin Templeton GOE submodel (e.g. |
{- "allocations": [
- {
- "allocation": 0.45,
- "category": "Large Blend"
}, - {
- "allocation": 0.2,
- "category": "Small Blend"
}, - {
- "allocation": 0.3,
- "category": "Intermediate Core Bond"
}, - {
- "allocation": 0.05,
- "category": "Inflation Protected Bond"
}
], - "birthDate": "1985-04-12",
- "funds": [
- {
- "cusip": "922908363"
}, - {
- "cusip": "922031869"
}, - {
- "cusip": "464287655"
}, - {
- "cusip": "921937835"
}
], - "modelKey": "IJN001",
- "riskProfile": "ModAgg"
}{- "additionalDisclosure": "Allocations are provided by LeafHouse Financial Advisors, LLC and are for illustrative purposes only. Past performance does not guarantee future results.",
- "allocations": [
- {
- "allocation": 0.38,
- "cusip": "922908363"
}, - {
- "allocation": 0.22,
- "cusip": "922031869"
}, - {
- "allocation": 0.3,
- "cusip": "464287655"
}, - {
- "allocation": 0.1,
- "cusip": "921937835"
}
], - "callId": "c1d9e7a4-3f52-48b6-9e0d-7a2b4c8f1e63",
- "messages": [
- "Failed to allocate any fund in category Small Blend. Allocation missed 20.0000%"
]
}Produces optimized asset allocations and custom target-date tracks using PIMCO's Income-Guided Personalized Solutions (IGPS) methodology.
Deferral pairs: provide exactly one of preTaxDeferralDollars or preTaxDeferralPercent, and exactly one of rothDeferralDollars or rothDeferralPercent. Sending both values of a pair, or neither, returns a 400 validation error.
| birthDate required | string^\d{4}-\d{2}-\d{2}$ Participant's date of birth ( |
| desiredRetirementIncomeAmount | number Desired annual distribution target. |
| desiredRetirementIncomeDate required | string^\d{4}-\d{2}-\d{2}$ Planned retirement target date ( |
| erMatchTier1DeferralRate | number [ 0 .. 0.15 ] Tier 1: deferral percentage the tier matches up to. |
| erMatchTier1MatchingAmount | number [ 0 .. 5 ] Tier 1: match ratio within the tier ( |
| erMatchTier2DeferralRate | number [ 0 .. 0.15 ] Tier 2 deferral ceiling. |
| erMatchTier2MatchingAmount | number [ 0 .. 5 ] Tier 2 match ratio. |
| erMatchTier3DeferralRate | number [ 0 .. 0.15 ] Tier 3 deferral ceiling. |
| erMatchTier3MatchingAmount | number [ 0 .. 5 ] Tier 3 match ratio. |
| erMatchTier4DeferralRate | number [ 0 .. 0.15 ] Tier 4 deferral ceiling. |
| erMatchTier4MatchingAmount | number [ 0 .. 5 ] Tier 4 match ratio. |
| erMatchTier5DeferralRate | number [ 0 .. 0.15 ] Tier 5 deferral ceiling. |
| erMatchTier5MatchingAmount | number [ 0 .. 5 ] Tier 5 match ratio. |
| erOtherFlatDollarAmount | number >= 0 Non-matching employer contribution, flat dollars per year. |
| erOtherPercentOfCompensation | number [ 0 .. 0.25 ] Non-matching employer contribution as a percent of compensation. |
| estimatedAnnualWages required | number >= 0 Current annual base wages. |
| inflation | number Inflation assumption modifier. |
| nqdcDeferralDollars | number Non-qualified deferred compensation deferral dollars. |
| nqdcDeferralPercent | number [ 0 .. 1 ] Non-qualified deferred compensation deferral percent. |
| percentOrDollar | string Enum: "Dollar" "Percent" Whether deferrals are expressed as |
| postTaxBalance required | number >= 0 Default: 0 Current post-tax portfolio balance. Defaults to |
| postTaxDeferralDollars | number Post-tax deferral dollars per pay period. |
| postTaxDeferralPercent | number [ 0 .. 1 ] Post-tax deferral percent. |
| preTaxBalance required | number >= 0 Default: 0 Current pre-tax portfolio balance. Defaults to |
| preTaxDeferralDollars | number Pre-tax deferral dollars per pay period. Mutually exclusive with |
| preTaxDeferralDollarsCatchup | number >= 0 Pre-tax catch-up deferral dollars per pay period. |
| preTaxDeferralDollarsFrequency | number Enum: 52 26 24 12 Pay periods per year for dollar deferrals. |
| preTaxDeferralPercent | number [ 0 .. 1 ] Pre-tax deferral percent. Mutually exclusive with |
| preTaxDeferralPercentCatchup | number [ 0 .. 1 ] Pre-tax catch-up deferral percent. |
| rbprRetirement | number PIMCO IGPS risk parameter (risk-based personalization at retirement). |
| reprRetirement | number PIMCO IGPS return parameter (return expectation at retirement). |
| rothDeferralDollars | number Roth deferral dollars per pay period. Mutually exclusive with |
| rothDeferralDollarsCatchup | number >= 0 Roth catch-up deferral dollars per pay period. |
| rothDeferralDollarsFrequency | number Enum: 52 26 24 12 Pay periods per year for Roth dollar deferrals. |
| rothDeferralPercent | number [ 0 .. 1 ] Roth deferral percent. Mutually exclusive with |
| rothDeferralPercentCatchup | number [ 0 .. 1 ] Roth catch-up deferral percent. |
{- "birthDate": "1990-02-27",
- "desiredRetirementIncomeAmount": 54400,
- "desiredRetirementIncomeDate": "2057-03-01",
- "erMatchTier1DeferralRate": 0.05,
- "erMatchTier1MatchingAmount": 0.5,
- "estimatedAnnualWages": 68000,
- "percentOrDollar": "Percent",
- "postTaxBalance": 0,
- "preTaxBalance": 42000,
- "preTaxDeferralPercent": 0.05,
- "rothDeferralPercent": 0.03
}{- "additionalDisclosure": "PIMCO Income-Guided Personalized Solutions allocations are based on the inputs provided and are not individualized investment advice.",
- "allocations": [
- {
- "allocation": 0.55,
- "cusip": "72201F433"
}, - {
- "allocation": 0.3,
- "cusip": "72201F441"
}, - {
- "allocation": 0.15,
- "cusip": "72201F458"
}
], - "callId": "a9c2f5e8-1b74-4d30-96a5-8e3b6d0c7f21",
- "description": "IGPS glide path allocation for a participant 31 years from the target retirement date, income-guided toward a $54,400 annual distribution target.",
}| Status | Meaning | Typical cause |
|---|---|---|
400 |
Bad Request | Request failed validation (body or query parameters); message lists each failed constraint. |
401 |
Unauthorized | Missing, malformed, expired, or revoked API key. |
403 |
Forbidden | API key is valid but is not permitted to call this endpoint. |
404 |
Not Found | The requested resource does not exist. |
422 |
Unprocessable Entity | The request was valid, but the calculation could not produce a valid result for the provided inputs (e.g. values that lead to an impossible projection, such as an annual wage of 0). The response includes the callId of the failed calculation; quote it as your reference id when contacting support. Adjust the inputs rather than retrying unchanged. |
429 |
Too Many Requests | Rate limit exceeded; retry with exponential backoff. |
500 |
Internal Server Error | Unexpected failure; retry once, then contact support with the callId or request timestamp. |
Validation error example:
{
"error": "BadRequest",
"message": [
"birthDate must be in YYYY-MM-DD format",
"risk must be one of the following values: Con, ModCon, Mod, ModAgg, Agg"
],
"statusCode": 400
}
Calculation error example (422); the callId is your support reference id for the failed calculation:
{
"callId": "395262fa-d014-4632-b6ad-d89cb113359d",
"error": "UnprocessableEntity",
"message": "the calculation could not produce a valid result for the provided inputs",
"statusCode": 422
}
Add iJoin's embeddable widgets -- the retirement goal projection, the social security calculator, and the managed account enrollment and post-enrollment widgets -- to your site. Two integrations are available and both render the same widgets: a framework-agnostic Web Component (<ijoin-embed>) and a dependency-free React component for React 18+.
Domain allowlisting required. Widgets only render on domains iJoin has allowlisted for your organization -- on any other domain the iframe will not load. Request allowlisting for every domain you embed on, including staging hosts, through your iJoin representative before integrating.
The participant data a widget renders never travels through the browser. Your backend submits it to iJoin when requesting a token, and the page only ever handles that opaque token:
your backend ── POST /embed/token { embedType, data } ──▶ iJoin
│ (stores data, returns token)
▼
your page ── <ijoin-embed type token> ──▶ sandboxed iframe
(widget rendered by iJoin from the stored data)
embedType, and that widget's data payload (see Widgets). iJoin stores the payload and returns a token that expires after 1 hour.Your backend calls the Create Embed Token endpoint with your API key. Never expose your API key in client-side code. The embedType in the request determines which widget the token is for and the shape of its data payload; see Widgets for what each widget does and expects, and the endpoint reference for the full schemas.
Hold on to the returned token value -- you'll pass it to the front end.
<script> tag registers <ijoin-embed> globally; works with any (or no) framework.Both integrations take the same inputs (base-url/baseUrl, type, token) and will not render until all three are present. The type must match the embedType used when requesting the token: goal-projection, managed-account, post-enrollment-managed, or social-security-calculator.
Server-side token exchange for the <ijoin-embed> widgets. Authenticate with your X-API-Key; the returned JWT drives one widget session.
Exchanges your API key and a widget payload for a short-lived embed token. Call this endpoint from your backend only and pass the returned token to the <ijoin-embed> element on your page; never expose your API key in client-side code.
The embedType field determines the shape of data (see the schema below). Tokens expire after 1 hour; the response expiresAt tells you when. Setting a fresh token attribute on the element updates the existing session without a full reload.
required | any Shape depends on |
| embedType required | string Enum: "goal-projection" "managed-account" "post-enrollment-managed" "social-security-calculator" |
{- "data": {
- "annualSalary": 95000,
- "dateOfBirth": "1970-01-15",
- "dateOfHire": "2005-06-01",
- "employerMatchingContributionYtdDollars": 2850,
- "gender": "M",
- "maritalStatus": "M",
- "matchTiers": [
- {
- "employeeContributionAmount": 3,
- "sponsorContributionAmount": 100,
- "tierLevel": 1
}, - {
- "employeeContributionAmount": 2,
- "sponsorContributionAmount": 50,
- "tierLevel": 2
}
], - "outsidePreTax": 32000,
- "outsideRoth": 18500,
- "payPeriodsPerYear": 26,
- "planId": "132051",
- "planType": "401k plan",
- "postTaxBalance": 0,
- "preTaxBalance": 125000,
- "preTaxContribution": 6,
- "preTaxContributionMax": 100,
- "retirementAge": 65,
- "rolloverBalance": 15000,
- "rothBalance": 45000,
- "rothContribution": 4,
- "rothContributionMax": 100,
- "socialSecurityNumber": "987654321",
- "stateOfResidency": "CA",
- "stateOfRetirement": "CA"
}, - "embedType": "goal-projection"
}{- "expiresAt": "2025-07-01T13:00:00.000Z",
- "token": "eyJhbGciOiJIUzI1NiIs..."
}If your site sets a CSP header, add the following directives (both integrations load the widget in an iframe from the iJoin host; the Web Component additionally loads its script from it):
script-src https://api.ijoin401k.com;
frame-src https://api.ijoin401k.com;
Four widgets are available. Everything on this page describes the server-side token request: the embedType your backend sends to Create Embed Token selects the widget (the component's type must match it), and it determines the shape of the data payload submitted alongside it. None of these fields are passed to the component in the browser -- the component only receives the resulting token, and iJoin renders the widget from the data stored with it. The field tables below are generated from the same schemas that validate your requests.
goal-projection renders an interactive retirement goal projection: projected income at retirement versus the participant's goal, contribution modeling, and shortfall analysis, computed from the demographic and account data you supply. dateOfBirth and socialSecurityNumber identify the participant and are required; planId, planType, annualSalary, and the balance/contribution fields shape the projection, with defaults applied where marked.
data fields| Field | Type | Required | Default | Description |
|---|---|---|---|---|
annualMatchLimitAmount |
number | No | ||
annualSalary |
number | No | ||
autoEnrollment |
boolean | No | false |
|
autoIncreasePreTaxAnnualPercent |
number | No | ||
autoIncreasePreTaxMaximumPercent |
number | No | ||
autoIncreaseRothAnnualPercent |
number | No | ||
autoIncreaseRothMaximumPercent |
number | No | ||
combinedContributionMax |
number | No | ||
contributionRetirementAge |
number | No | ||
dateOfBirth |
string | Yes | ||
dateOfHire |
string | No | ||
employeeAutoIncreaseAllowed |
boolean | No | ||
employeeMaximumContributionLimit |
number | No | ||
employerMatchBalance |
number | No | 0 |
|
employerMatchingContributionYtdDollars |
number | No | 0 |
|
employerOtherBalance |
number | No | 0 |
|
employerOtherContributionYtdDollars |
number | No | 0 |
|
gender |
string | No | Allowed: F, M. |
|
isCatchupContributionAllowed |
boolean | No | ||
isRothCatchupContributionAllowed |
boolean | No | ||
maritalStatus |
string | No | "S" |
Allowed: M, S. |
matchTiers |
EmbedMatchTier[] | No | ||
monthlySavingsNeededAtRetirement |
number | No | ||
nqdcDeferralPercent |
number | No | 0 |
|
nqdcDeferralYtdDollars |
number | No | 0 |
|
otherEmployerContributionDollars |
number | No | 0 |
|
otherEmployerContributionPercent |
number | No | 0 |
|
outsideMonthlyPension |
number | No | 0 |
|
outsidePostTax |
number | No | 0 |
|
outsidePreTax |
number | No | 0 |
|
outsideRoth |
number | No | 0 |
|
payPeriodsPerYear |
number | No | 26 |
|
planId |
string | No | ||
planType |
string | No | Allowed: 401k, 401k plan, 401k plan with roth, 401k-roth, 403b, 403(b), … 12 more (see the endpoint schema). |
|
postTaxBalance |
number | No | 0 |
|
postTaxContributionMax |
number | No | ||
postTaxDeferralYtdDollars |
number | No | 0 |
|
preTaxAutoIncreaseFrequency |
string | No | ||
preTaxBalance |
number | No | 0 |
|
preTaxContribution |
number | No | 0 |
|
preTaxContributionMax |
number | No | ||
preTaxDeferralCatchupPercent |
number | No | ||
preTaxDeferralYtd |
number | No | ||
preTaxDeferralYtdCatchupDollars |
number | No | ||
retirementAge |
number | No | ||
rolloverBalance |
number | No | 0 |
|
rothAutoIncreaseMax |
number | No | ||
rothAutoIncreasePercent |
number | No | ||
rothBalance |
number | No | 0 |
|
rothContribution |
number | No | 0 |
|
rothContributionMax |
number | No | ||
rothDeferralCatchupPercent |
number | No | ||
rothDeferralYtdCatchupDollars |
number | No | 0 |
|
rothDeferralYtdDollars |
number | No | 0 |
|
rothTaxAutoIncreaseFrequency |
string | No | ||
socialSecurityNumber |
string | Yes | ||
stateOfResidency |
string | No | Allowed: AK, AL, AR, AZ, CA, CO, … 45 more (see the endpoint schema). |
|
stateOfRetirement |
string | No | "TX" |
Allowed: AK, AL, AR, AZ, CA, CO, … 45 more (see the endpoint schema). |
matchTiers entries describe the employer match design:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
employeeContributionAmount |
number | No | ||
sponsorContributionAmount |
number | No | ||
tierLevel |
number | No |
{
"data": {
"annualSalary": 95000,
"dateOfBirth": "1970-01-15",
"dateOfHire": "2005-06-01",
"employerMatchingContributionYtdDollars": 2850,
"gender": "M",
"maritalStatus": "M",
"matchTiers": [
{
"employeeContributionAmount": 3,
"sponsorContributionAmount": 100,
"tierLevel": 1
},
{
"employeeContributionAmount": 2,
"sponsorContributionAmount": 50,
"tierLevel": 2
}
],
"outsidePreTax": 32000,
"outsideRoth": 18500,
"payPeriodsPerYear": 26,
"planId": "132051",
"planType": "401k plan",
"postTaxBalance": 0,
"preTaxBalance": 125000,
"preTaxContribution": 6,
"preTaxContributionMax": 100,
"retirementAge": 65,
"rolloverBalance": 15000,
"rothBalance": 45000,
"rothContribution": 4,
"rothContributionMax": 100,
"socialSecurityNumber": "987654321",
"stateOfResidency": "CA",
"stateOfRetirement": "CA"
},
"embedType": "goal-projection"
}
managed-account displays MAP-provider-specific enrollment content for a plan as a single step: a provider overview (About Our Managed Solution) with a View Associated Disclosures link that reveals the disclosure list and a single agreement checkbox in place, without navigating away from the step. All fields are optional; planId associates the session with a plan, and iJoin renders the managed account program content and disclosures configured for your organization server-side.
data fields| Field | Type | Required | Default | Description |
|---|---|---|---|---|
planId |
string | No |
{
"data": {
"planId": "132051"
},
"embedType": "managed-account"
}
Whenever the participant toggles the disclosures agreement checkbox, the widget raises an event with the current checked state (true when the participant has agreed, false when they clear it) so your page can gate document delivery on the participant's consent.
Web Component (action event with detail.action of managed-account-agreement-changed; detail.accepted carries the state):
const embed = document.querySelector('ijoin-embed');
embed.addEventListener('action', event => {
if (event.detail.action === 'managed-account-agreement-changed') {
documentDeliveryButton.disabled = !event.detail.accepted;
}
});
React (dedicated callback prop):
<IJoinEmbed
onAgreementChanged={setDocumentDeliveryEnabled}
{...otherProps}
/>
post-enrollment-managed displays managed account content for a participant after they have completed enrollment. As with the enrollment widget, all fields are optional; planId associates the session with a plan, and iJoin renders the content configured for your organization server-side.
data fields| Field | Type | Required | Default | Description |
|---|---|---|---|---|
planId |
string | No |
{
"data": {
"planId": "132051"
},
"embedType": "post-enrollment-managed"
}
social-security-calculator renders an interactive social security benefit calculator. All fields are optional; providing planId and socialSecurityNumber lets iJoin look up the participant's record to seed the calculation, and the participant can adjust the retirement age and wage assumptions inside the widget either way.
data fields| Field | Type | Required | Default | Description |
|---|---|---|---|---|
planId |
string | No | ||
socialSecurityNumber |
string | No |
{
"data": {
"planId": "132051",
"socialSecurityNumber": "987654321"
},
"embedType": "social-security-calculator"
}
A dedicated React component for React 18+, with typed props and callback-based events. It ships as a single ES module with no bundled dependencies: react and react/jsx-runtime are imported from your application, so it adds ~1.3 kB (gzipped) to your bundle.
The component is published as an npm package tarball at a stable URL. Add it to your package.json like any other dependency:
{
"dependencies": {
"@ijoin/embed-react": "https://api.ijoin401k.com/embed/ijoin-embed-react.tgz"
}
}
Or install it from the command line with your package manager of choice; each resolves the tarball URL, records it in your lockfile, and exposes the package as @ijoin/embed-react:
npm install https://api.ijoin401k.com/embed/ijoin-embed-react.tgz
yarn add @ijoin/embed-react@https://api.ijoin401k.com/embed/ijoin-embed-react.tgz
pnpm add https://api.ijoin401k.com/embed/ijoin-embed-react.tgz
To pick up a newer release, remove and re-add the dependency; a plain npm update cannot detect changes behind a static URL, and the lockfile's integrity pin blocks in-place changes (see the warning below).
The tarball is integrity-pinned by your lockfile. npm, Yarn, and pnpm all record a SHA-512 hash of the downloaded tarball on first install (the package.json and command-line installs above pin it the same way). When iJoin publishes a new version at this URL, existing installs fail with an integrity error (npm EINTEGRITY, Yarn YN0018, pnpm ERR_PNPM_TARBALL_INTEGRITY) rather than silently updating -- typically surfacing in CI first, while machines with a warm cache keep installing the old version. When that happens, re-resolve the dependency: remove and re-add it, or delete its lockfile entry and reinstall. We plan to publish versioned tarball URLs in a future release so each version keeps a stable hash and upgrades become explicit. Until then, you can avoid the lockfile pin entirely by vendoring the raw module and its type declarations into your project (see the curl downloads below).
If you prefer to vendor the source instead, the raw module and its TypeScript declarations are served alongside the tarball:
curl -O https://api.ijoin401k.com/embed/ijoin-embed-react.js
curl -O https://api.ijoin401k.com/embed/ijoin-embed-react.d.ts
import { useEffect, useState } from 'react';
import { IJoinEmbed } from '@ijoin/embed-react';
export const ManagedAccountEnrollment = () => {
const [token, setToken] = useState('');
const [agreementAccepted, setAgreementAccepted] = useState(false);
useEffect(() => {
fetch('/your-backend/embed-token')
.then(r => r.json())
.then(body => setToken(body.token));
}, []);
if (!token) return null;
return (
<>
<IJoinEmbed
baseUrl='https://api.ijoin401k.com'
embedTitle='Managed Account Enrollment'
onAgreementChanged={setAgreementAccepted}
token={token}
type='managed-account'
/>
<button disabled={!agreementAccepted} type='button'>
Deliver documents
</button>
</>
);
};
Each public widget event has a dedicated, typed callback prop; widget-specific actions are documented per widget in Widgets.
The component renders nothing until baseUrl, type, and token are all present, so it is safe to mount before the token arrives.
| Prop | Required | Description |
|---|---|---|
baseUrl |
Yes | iJoin environment URL (e.g. https://api.ijoin401k.com) |
type |
Yes | Embed type; must match the embedType used when requesting the token. Typed as the union of supported widgets. |
token |
Yes | JWT returned from the token endpoint |
embedTitle |
No | Accessible label for the iframe (see Accessibility). |
sandbox |
No | iframe sandbox permissions override (see Sandboxing). |
onAgreementChanged |
No | (accepted: boolean) => void -- fired when the participant toggles the managed account disclosures agreement (see Widgets). |
onLoaded |
No | () => void -- fired once when the widget finishes its initial load. |
onResize |
No | (height: number) => void -- fired when the widget content height changes; the iframe resizes itself automatically. |
Passing a new token prop (e.g. after fetching a fresh one) updates the existing iframe session via postMessage without a full reload -- identical to the web component's token attribute behavior. Changing baseUrl or type reloads the widget.
The <ijoin-embed> custom element works with any framework, or none. It is self-contained (no dependencies to install) and registered globally by one script tag.
<script src="https://api.ijoin401k.com/embed/ijoin-embed.iife.js"></script>
If your build system supports ES modules, you can use the module version instead:
<script type="module" src="https://api.ijoin401k.com/embed/ijoin-embed.js"></script>
<ijoin-embed
base-url="https://api.ijoin401k.com"
type="goal-projection"
embed-title="Retirement Goal Projection"
token="eyJhbGciOiJIUzI1NiIs...">
</ijoin-embed>
| Attribute | Required | Description |
|---|---|---|
base-url |
Yes | iJoin environment URL (e.g. https://api.ijoin401k.com) |
type |
Yes | Embed type; must match the embedType used when requesting the token. |
token |
Yes | JWT returned from the token endpoint |
embed-title |
No | Accessible label for the iframe (see Accessibility). |
sandbox |
No | iframe sandbox permissions override (see Sandboxing). |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>iJoin Embed Demo</title>
<script src="https://api.ijoin401k.com/embed/ijoin-embed.iife.js"></script>
</head>
<body>
<h1>Retirement Projection</h1>
<ijoin-embed
id="projection"
base-url="https://api.ijoin401k.com"
type="goal-projection"
embed-title="Retirement Goal Projection"
token="">
</ijoin-embed>
<script>
fetch('/your-backend/embed-token')
.then(r => r.json())
.then(({ token }) => {
document.getElementById('projection').token = token;
});
</script>
</body>
</html>
All attributes can be set or updated at any time via JavaScript. The component reacts to changes and re-renders automatically:
const widget = document.querySelector<IJoinEmbedElement>('ijoin-embed');
widget?.setAttribute('base-url', 'https://api.uat.ijoin401k.com');
widget?.setAttribute('type', 'goal-projection');
widget?.setAttribute('embed-title', 'Retirement Goal Projection');
widget?.setAttribute('token', token);
When only the token attribute changes (e.g. after a refresh), the component updates the existing iframe session via postMessage without a full reload.
If you're using TypeScript, declare the custom element to avoid type errors.
First, define the attribute value types:
type IJoinEmbedType =
| 'goal-projection'
| 'managed-account'
| 'post-enrollment-managed'
| 'social-security-calculator';
type IJoinBaseUrl = 'https://api.ijoin401k.com' | 'https://api.uat.ijoin401k.com';
interface IJoinEmbedAttributes {
'base-url': IJoinBaseUrl;
'type': IJoinEmbedType;
'token': string;
'embed-title'?: string;
'sandbox'?: string;
}
For non-React TypeScript projects, extend HTMLElement with the attribute properties, override setAttribute for type-safe attribute assignment, and register the element on HTMLElementTagNameMap:
interface IJoinEmbedElement extends HTMLElement {
'base-url': IJoinBaseUrl;
'type': IJoinEmbedType;
'token': string;
'embed-title': string;
'sandbox': string;
setAttribute<K extends keyof IJoinEmbedAttributes>(
name: K,
value: IJoinEmbedAttributes[K]
): void;
}
declare global {
interface HTMLElementTagNameMap {
'ijoin-embed': IJoinEmbedElement;
}
}
The generic setAttribute override ensures that the value passed for each attribute name matches its declared type, so typos in attribute names and invalid values for type or base-url are caught at compile time. With the HTMLElementTagNameMap declaration in place, document.querySelector('ijoin-embed') is automatically typed as IJoinEmbedElement | null.
The element dispatches DOM CustomEvents:
| Event | When | Detail |
|---|---|---|
action |
A widget raises a user action; detail.action identifies it and the remaining detail fields carry the payload. Actions are documented per widget in Widgets. |
{ action: string, ...payload } |
resize |
The widget content height changes (the iframe resizes itself automatically). | { height: number } |
Using React? Prefer the dedicated React component over wiring the custom element into JSX.
The widget iframe is sandboxed by default with allow-scripts allow-same-origin allow-forms, limiting its capabilities to only what the embed needs. Override via the sandbox attribute (Web Component) or prop (React) only if your integration requires additional capabilities (e.g. allow-popups).
Both integrations include the same built-in accessibility support:
embed-title attribute (embedTitle prop in React) sets the iframe's title, which screen readers announce when a user navigates into the widget. Always provide a descriptive value that explains what the widget does in your page's context. Defaults to iJoin {type} if not set.aria-live region announces loading status to assistive technology.| Symptom | Cause |
|---|---|
| Nothing renders | One or more required inputs (base-url/baseUrl, type, token) are missing or empty. Check the browser console for specific warnings. |
| Blank embed / iframe won't load | Your domain isn't allowlisted -- contact iJoin |
401 on token endpoint |
Missing, malformed, expired, or revoked API key (see Error Reference) |
| Embed loads then goes blank | Token may have expired -- request a new one and set it again |
| CSP errors in browser console | Add script-src and frame-src for api.ijoin401k.com to your CSP |