REST /api/v1/expense-selections 5 endpoints
GET /api/v1/expense-selections/api/v1/expense-selections

List all expense selection sessions

Public

Response Example

{
  "data": [
    {
      "id": "sel-001",
      "expense_id": "exp-8821",
      "selected_types": [
        "kilometers",
        "tolls"
      ],
      "disabled_types": [
        "publicTransit"
      ],
      "created_at": "2026-03-26T09:15:00Z",
      "updated_at": "2026-03-26T09:22:00Z"
    },
    {
      "id": "sel-002",
      "expense_id": "exp-8822",
      "selected_types": [
        "parking"
      ],
      "disabled_types": [
        "publicTransit"
      ],
      "created_at": "2026-03-26T10:00:00Z",
      "updated_at": "2026-03-26T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 2
  }
}
GET /api/v1/expense-selections/api/v1/expense-selections/:id

Get current selection state for a session

Public

Response Example

{
  "id": "sel-001",
  "expense_id": "exp-8821",
  "selected_types": [
    "kilometers",
    "tolls"
  ],
  "disabled_types": [
    "publicTransit"
  ],
  "created_at": "2026-03-26T09:15:00Z",
  "updated_at": "2026-03-26T09:22:00Z"
}
POST /api/v1/expense-selections/api/v1/expense-selections

Create a new expense selection session

Public

Request Example

{
  "expense_id": "exp-8823",
  "initial_types": [
    "kilometers"
  ]
}

Response Example

{
  "id": "sel-003",
  "expense_id": "exp-8823",
  "selected_types": [
    "kilometers"
  ],
  "disabled_types": [
    "publicTransit"
  ],
  "created_at": "2026-03-26T11:00:00Z",
  "updated_at": "2026-03-26T11:00:00Z"
}
PUT /api/v1/expense-selections/api/v1/expense-selections/:id

Toggle an expense type within a selection session

Public

Request Example

{
  "action": "toggle",
  "expense_type": "tolls"
}

Response Example

{
  "id": "sel-003",
  "expense_id": "exp-8823",
  "selected_types": [
    "kilometers",
    "tolls"
  ],
  "disabled_types": [
    "publicTransit"
  ],
  "created_at": "2026-03-26T11:00:00Z",
  "updated_at": "2026-03-26T11:05:00Z"
}
DELETE /api/v1/expense-selections/api/v1/expense-selections/:id

Clear and delete a selection session

Public

Response Example

{
  "success": true,
  "cleared_id": "sel-003"
}

Additional Metadata

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