Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/soker90/finper/llms.txt

Use this file to discover all available pages before exploring further.

Pension entries are point-in-time snapshots of a pension plan’s state. Each record captures what was contributed by both the employee and the employer in a given period, along with the total valuation of the plan at that moment. Snapshots are not incremental events — they represent the full picture of the plan at a specific date.
There is no DELETE endpoint for pensions. To remove an incorrect entry, you must edit it directly in the database. This is an intentional design decision to preserve the audit trail of historical snapshots.

POST /api/pensions

Create a new pension plan snapshot.
date
number
required
Snapshot date as a Unix timestamp (ms).
employeeUnits
number
required
Number of plan units contributed by the employee in this period.
employeeAmount
number
required
Monetary amount contributed by the employee.
companyUnits
number
required
Number of plan units contributed by the employer in this period.
companyAmount
number
required
Monetary amount contributed by the employer.
value
number
required
Total valuation of the pension plan at this snapshot date.
curl -X POST http://localhost:3008/api/pensions \
  -H 'token: <your-jwt>' \
  -H 'Content-Type: application/json' \
  -d '{
    "date": 1704067200000,
    "employeeUnits": 12.5,
    "employeeAmount": 150.00,
    "companyUnits": 6.25,
    "companyAmount": 75.00,
    "value": 4820.50
  }'
Response 201 — the created pension snapshot object.

GET /api/pensions

List all pension snapshots for the authenticated user, sorted by date ascending.
curl http://localhost:3008/api/pensions \
  -H 'token: <your-jwt>'
Response 200
[
  {
    "_id": "66a1c...",
    "date": 1704067200000,
    "employeeUnits": 12.5,
    "employeeAmount": 150.00,
    "companyUnits": 6.25,
    "companyAmount": 75.00,
    "value": 4820.50,
    "user": "alice"
  }
]

PUT /api/pensions/:id

Correct an existing pension snapshot. All six payload fields are required (full replacement).
id
string
required
Pension snapshot ID.
date
number
required
Updated snapshot date (Unix ms).
employeeUnits
number
required
Updated employee units.
employeeAmount
number
required
Updated employee monetary amount.
companyUnits
number
required
Updated company units.
companyAmount
number
required
Updated company monetary amount.
value
number
required
Updated total valuation.
curl -X PUT http://localhost:3008/api/pensions/66a1c... \
  -H 'token: <your-jwt>' \
  -H 'Content-Type: application/json' \
  -d '{
    "date": 1704067200000,
    "employeeUnits": 12.5,
    "employeeAmount": 150.00,
    "companyUnits": 6.25,
    "companyAmount": 75.00,
    "value": 4850.00
  }'
Response 200 — the updated pension snapshot object.

Build docs developers (and LLMs) love