REST /api/v1/expense-type-config 6 endpoints
GET /api/v1/expense-type-config/api/v1/expense-type-config

List all expense type definitions with metadata, formulas, and compatibility matrix

Public

Response Example

{
  "data": [
    {
      "id": "kilometers",
      "label": "Kilometers",
      "icon": "car",
      "category": "vehicle",
      "metadata": {
        "display_order": 1,
        "is_active": true,
        "requires_receipt": false,
        "unit": "km"
      },
      "formula": {
        "type": "per_unit",
        "rate": 0.5,
        "currency": "EUR",
        "unit": "km",
        "description": "€0.50 per kilometer driven"
      },
      "compatible_with": [
        "tolls",
        "parking"
      ],
      "incompatible_with": [
        "publicTransit"
      ]
    },
    {
      "id": "publicTransit",
      "label": "Public Transit",
      "icon": "train",
      "category": "transit",
      "metadata": {
        "display_order": 4,
        "is_active": true,
        "requires_receipt": true,
        "unit": "trip"
      },
      "formula": {
        "type": "reimbursed_at_cost",
        "currency": "EUR",
        "description": "Reimbursed at actual cost with receipt"
      },
      "compatible_with": [],
      "incompatible_with": [
        "kilometers",
        "tolls",
        "parking"
      ]
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 4
  }
}
GET /api/v1/expense-type-config/api/v1/expense-type-config/:id

Get full configuration for a specific expense type

Public

Response Example

{
  "id": "parking",
  "label": "Parking",
  "icon": "parking",
  "category": "vehicle",
  "metadata": {
    "display_order": 3,
    "is_active": true,
    "requires_receipt": true,
    "unit": "hours"
  },
  "formula": {
    "type": "per_unit",
    "rate": null,
    "currency": "EUR",
    "unit": "hours",
    "description": "Reimbursed at actual hourly rate with receipt"
  },
  "compatible_with": [
    "kilometers",
    "tolls"
  ],
  "incompatible_with": [
    "publicTransit"
  ]
}
POST /api/v1/expense-type-config/api/v1/expense-type-config

Create a new expense type definition (admin only)

Public

Request Example

{
  "id": "ferry",
  "label": "Ferry",
  "icon": "anchor",
  "category": "transit",
  "metadata": {
    "display_order": 5,
    "is_active": true,
    "requires_receipt": true,
    "unit": "trip"
  },
  "formula": {
    "type": "reimbursed_at_cost",
    "currency": "EUR",
    "description": "Reimbursed at actual ticket cost with receipt"
  },
  "compatible_with": [
    "parking"
  ],
  "incompatible_with": [
    "publicTransit"
  ]
}

Response Example

{
  "id": "ferry",
  "label": "Ferry",
  "icon": "anchor",
  "category": "transit",
  "metadata": {
    "display_order": 5,
    "is_active": true,
    "requires_receipt": true,
    "unit": "trip"
  },
  "formula": {
    "type": "reimbursed_at_cost",
    "currency": "EUR",
    "description": "Reimbursed at actual ticket cost with receipt"
  },
  "compatible_with": [
    "parking"
  ],
  "incompatible_with": [
    "publicTransit"
  ],
  "created_at": "2026-03-26T16:00:00Z"
}
PUT /api/v1/expense-type-config/api/v1/expense-type-config/:id

Update expense type configuration (e.g. rate change, compatibility update)

Public

Request Example

{
  "formula": {
    "type": "per_unit",
    "rate": 0.55,
    "currency": "EUR",
    "unit": "km",
    "description": "€0.55 per kilometer driven (updated rate 2026)"
  }
}

Response Example

{
  "id": "kilometers",
  "label": "Kilometers",
  "icon": "car",
  "category": "vehicle",
  "metadata": {
    "display_order": 1,
    "is_active": true,
    "requires_receipt": false,
    "unit": "km"
  },
  "formula": {
    "type": "per_unit",
    "rate": 0.55,
    "currency": "EUR",
    "unit": "km",
    "description": "€0.55 per kilometer driven (updated rate 2026)"
  },
  "compatible_with": [
    "tolls",
    "parking"
  ],
  "incompatible_with": [
    "publicTransit"
  ],
  "updated_at": "2026-03-26T16:30:00Z"
}
DELETE /api/v1/expense-type-config/api/v1/expense-type-config/:id

Deactivate or remove an expense type definition (admin only)

Public

Response Example

{
  "success": true,
  "deleted_id": "ferry"
}
GET /api/v1/expense-type-config/api/v1/expense-type-config/compatibility-matrix

Get the full compatibility matrix across all expense types

Public

Response Example

{
  "matrix": {
    "kilometers": {
      "tolls": true,
      "parking": true,
      "publicTransit": false
    },
    "tolls": {
      "kilometers": true,
      "parking": true,
      "publicTransit": false
    },
    "parking": {
      "kilometers": true,
      "tolls": true,
      "publicTransit": false
    },
    "publicTransit": {
      "kilometers": false,
      "tolls": false,
      "parking": false
    }
  },
  "generated_at": "2026-03-26T16:00:00Z"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}