Run a governed retirement simulation
const url = 'https://indepai.app/api/v1/fire-decision/scenarios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/retirement-simulation';const options = { method: 'POST', headers: { 'Idempotency-Key': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"revisionId":"550e8400-e29b-41d4-a716-446655440000","seed":"example","pathCount":1,"horizonYears":1,"stressScenarioId":"baseline","targetSuccessProbability":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://indepai.app/api/v1/fire-decision/scenarios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/retirement-simulation \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "revisionId": "550e8400-e29b-41d4-a716-446655440000", "seed": "example", "pathCount": 1, "horizonYears": 1, "stressScenarioId": "baseline", "targetSuccessProbability": 1 }'Runs the bounded synchronous joint nominal return/inflation/FX model for an owner-scoped immutable revision. The endpoint returns a blocked result when no approved compatible parameter set is available; it never substitutes request-supplied or legacy IID data.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner-scoped decision scenario UUID
Header Parameters
Section titled “Header Parameters”Client-generated replay key
Request Body
Section titled “Request Body”Responses
Section titled “Responses”Completed or explicitly blocked planning execution
object
Always true for success responses
object
Unique identifier (UUID v4)
Unique identifier (UUID v4)
Unique identifier (UUID v4)
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Timestamp in ISO 8601 format
Timestamp in ISO 8601 format
Timestamp in ISO 8601 format
Timestamp in ISO 8601 format
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Response timestamp
API version
Example
{ "success": true, "data": { "schemaVersion": "planning-execution/1", "scenarioId": "550e8400-e29b-41d4-a716-446655440000", "revisionId": "550e8400-e29b-41d4-a716-446655440000", "idempotencyKey": "550e8400-e29b-41d4-a716-446655440000", "execution": { "mode": "synchronous", "status": "completed" }, "receipt": { "persisted": false, "reason": "APPROVED_PARAMETER_DATA_UNAVAILABLE" }, "kind": "retirement_simulation", "result": { "ok": true, "value": { "readiness": "ready", "identity": { "engineVersion": "retirement-sim/1", "modelVersion": "historical-block-regime/1", "prngVersion": "mulberry32-derived-streams/1" }, "parameterManifest": { "modelVersion": "historical-block-regime/1", "sourceSeries": [ { "kind": "nominal_return" } ], "observationPeriod": { "frequency": "annual" }, "blockLength": { "method": "reviewer_selected" }, "missingDataTreatment": "complete_joint_rows_only", "portfolioProjectionRule": "native_factor_return_then_position_fee", "residualTailTreatment": "none", "fxQuoteConvention": "usd_per_currency_unit", "approval": { "status": "draft", "approvedAt": "2024-01-15T10:30:00Z", "effectiveFrom": "2024-01-15T10:30:00Z", "warningExpiresAt": "2024-01-15T10:30:00Z", "hardExpiresAt": "2024-01-15T10:30:00Z" }, "legacyComparator": "iid-lognormal-real/legacy" }, "successDefinition": "all_required_net_spending_funded_through_horizon", "representativePaths": [ { "percentile": "p10" } ], "warnings": [ { "code": "PARAMETER_SET_WARNING_EXPIRY" } ] } } }, "meta": { "timestamp": "2024-01-15T10:30:00Z", "version": "1.0" }}Invalid planning contract
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}Authentication required
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}Owned scenario revision not found
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}Idempotency key conflict
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}Request body exceeds 64 KiB
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}Content type must be application/json
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}Rate limit exceeded
object
Always false for error responses
Error type
Machine-readable error code
Detailed validation errors
object
Path to the invalid field
Error message
Example
{ "success": false, "error": "Validation error", "code": "VALIDATION_ERROR", "details": [ { "path": "currentAge", "message": "Must be between 18 and 100" } ]}