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

# Add expense

The api end-point to add an expense nd an optional category id

Scope required: expenses:write 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/add": {
      "post": {
        "summary": "Add expense",
        "description": "The api end-point to add an expense nd an optional category id",
        "operationId": "add-expense",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "employee_id",
                  "category_id",
                  "description"
                ],
                "properties": {
                  "employee_id": {
                    "type": "integer",
                    "default": null,
                    "format": "int32"
                  },
                  "category_id": {
                    "type": "integer",
                    "description": "For some integrations this is required not to be 0 which is the default category id",
                    "default": 0,
                    "format": "int32"
                  },
                  "description": {
                    "type": "string",
                    "description": "This is the title for the expense"
                  },
                  "amount": {
                    "type": "number",
                    "description": "this is the price of the expense, this is only required when using a total amount category",
                    "format": "float"
                  },
                  "extra_information": {
                    "type": "string"
                  },
                  "date": {
                    "type": "string",
                    "description": "this is the day the expense has incurred on and is required when it is a total amount category"
                  },
                  "filename": {
                    "type": "string",
                    "description": "this is required when you want to add an expense with a total amount category"
                  },
                  "file_base64": {
                    "type": "string",
                    "description": "this is required when you want to add an expense with a total amount category"
                  },
                  "dates": {
                    "type": "array",
                    "description": "this is required when you want to add an expense with a kilometer or day allowance expense category, multiple dates are also possible (ex: [\"24/05/2023\", \"26/05/2023\"])",
                    "items": {
                      "type": "string"
                    }
                  },
                  "distance": {
                    "type": "integer",
                    "description": "this is required when you want to update to a killometer allowance expense category. This is equal to the total amount of kilometers that has been done",
                    "default": 0,
                    "format": "int32"
                  },
                  "ride": {
                    "type": "string",
                    "description": "this is the value if it's an outward or a round journey when using kilometer allowances, this defaults to single",
                    "default": "single",
                    "enum": [
                      "single",
                      "double"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"success\": 1\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"status_code\": 400,\n\t\"reason_phrase\": \"category_id is required\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status_code": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "reason_phrase": {
                      "type": "string",
                      "example": "category_id is required"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "http",
              "code": "{\n\t\"employee_id\":12345,\n  \"category_id\":0,\n\t\"amount\": 12.3,\n\t\"description\": \"title for yor expense\",\n\t\"extra_information\": \"the description for your expense\",\n  \"date\": \"12/05/2023\",\n  \"filename\": \"filename.png\",\n  \"file_base64\": \"filebase64\"\n}"
            }
          ],
          "samples-languages": [
            "http"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```