---
updatedAt: 2025-06-05T21:41:13.000Z
agentTools:
  projectIndex: https://apidocs.officient.io/llms.txt
---

# List expenses by year

List all expenses

Scope required: expenses:read

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "officient-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.officient.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/1.0/expenses/list/{year}": {
      "get": {
        "summary": "List expenses by year",
        "description": "List all expenses",
        "operationId": "list-expenses-by-year",
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "description": "the specific year we want to filter",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "month",
            "in": "path",
            "description": "the specific month we want to filter this is optional",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "description": "optional to filter pages",
            "schema": {
              "type": "string",
              "default": "0"
            }
          },
          {
            "name": "include_deleted",
            "in": "query",
            "description": "this is so you can exclude any deleted expense, by default we show them (0 - 1)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"data\": [\n\t\t{\n\t\t\t\"id\": 22,\n\t\t\t\"employee_id\": 21312,\n\t\t\t\"date\": \"2021-07-08\",\n\t\t\t\"time_created\": 1618498412,\n\t\t\t\"status\": \"approved\",\n\t\t\t\"price\": \"35.00\",\n\t\t\t\"title\": \"Expense 1\",\n\t\t\t\"description\": \"Some extra information\",\n\t\t\t\"payout_method\": \"UNDECIDED\",\n\t\t\t\"payout_period\": null,\n\t\t\t\"payout_period_frequency\": null,\n\t\t\t\"payout_year\": null,\n\t\t\t\"expense_category_id\": 0,\n\t\t\t\"price_per_kilometer\": null,\n\t\t\t\"distance\": null,\n\t\t\t\"metadata\": null,\n\t\t\t\"dates\": null,\n\t\t\t\"date_approved\": null,\n\t\t\t\"payout_other_reason\": \"\",\n\t\t\t\"payout_status\": \"\"\n\t\t},\n\t\t{\n\t\t\t\"id\": 23,\n\t\t\t\"employee_id\": 21303,\n\t\t\t\"date\": \"2021-04-15\",\n\t\t\t\"time_created\": 1618498456,\n\t\t\t\"status\": \"approved\",\n\t\t\t\"price\": \"10.00\",\n\t\t\t\"title\": \"Expense 2\",\n\t\t\t\"description\": \"\",\n\t\t\t\"payout_method\": \"UNDECIDED\",\n\t\t\t\"payout_period\": null,\n\t\t\t\"payout_period_frequency\": null,\n\t\t\t\"payout_year\": null,\n\t\t\t\"expense_category_id\": 0,\n\t\t\t\"price_per_kilometer\": null,\n\t\t\t\"distance\": null,\n\t\t\t\"metadata\": null,\n\t\t\t\"dates\": null,\n\t\t\t\"date_approved\": null,\n\t\t\t\"payout_other_reason\": \"\",\n\t\t\t\"payout_status\": \"\"\n\t\t}\n\t]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 22,
                            "default": 0
                          },
                          "employee_id": {
                            "type": "integer",
                            "example": 21312,
                            "default": 0
                          },
                          "date": {
                            "type": "string",
                            "example": "2021-07-08"
                          },
                          "time_created": {
                            "type": "integer",
                            "example": 1618498412,
                            "default": 0
                          },
                          "status": {
                            "type": "string",
                            "example": "approved"
                          },
                          "price": {
                            "type": "string",
                            "example": "35.00"
                          },
                          "title": {
                            "type": "string",
                            "example": "Expense 1"
                          },
                          "description": {
                            "type": "string",
                            "example": "Some extra information"
                          },
                          "payout_method": {
                            "type": "string",
                            "example": "UNDECIDED"
                          },
                          "payout_period": {},
                          "payout_period_frequency": {},
                          "payout_year": {},
                          "expense_category_id": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "price_per_kilometer": {},
                          "distance": {},
                          "metadata": {},
                          "dates": {},
                          "date_approved": {},
                          "payout_other_reason": {
                            "type": "string",
                            "example": ""
                          },
                          "payout_status": {
                            "type": "string",
                            "example": ""
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"status_code\": 400,\n\t\"reason_phrase\": \"Year has to be numeric\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status_code": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "reason_phrase": {
                      "type": "string",
                      "example": "Year has to be numeric"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```