---
title: "Invalidate a timesheet"
method: POST
path: "/timmi-timesheet/api/timesheets/{id}/invalidate"
tags: ["Workflow"]
---

# Invalidate a timesheet

`POST /timmi-timesheet/api/timesheets/{id}/invalidate`

## Request

- Base URL: `https://example.ilucca.net`
- URL: `https://example.ilucca.net/timmi-timesheet/api/timesheets/{id}/invalidate`
- Auth: none required
- TypeScript: <https://skmtc.dev/luccasoftware/apis/lucca-expenses/docs/timmi-timesheet/api/timesheets/:id/invalidate/post.ts> (a function with typed inputs; its response is checked against the schema)

Invalidate a timesheet with a mandatory comment.

Can only be performed on a timesheet with an `approved` status.

## Request body

- object
  - `comment` string, required: A comment to explain why this timesheet is invalidated.

## Response `200`

OK

- WorkflowItem: A WorkflowItem is an individual workflow action performed by a user. The expectedNextActor object is a User. [See API reference.](reference/Directory-v3.yaml/components/schemas/User)
  - `id` integer: Unique id of the WorkflowItem.
  - `exceptionMessage` string: Any human readable error message.
  - `startsOn` string, date: The Timesheet the WorkflowItem is related on starting date (included).
  - `endsOn` string, date: The Timesheet the WorkflowItem is related on ending date (excluded).
  - `expectedNextActor` object: A Directory 'User'. See API reference for up-to-date attributes.
  - `status` string: - "success" for a succesfull workflow operation. - "error" if any error was met, and therefore an excetion message is set. - "noAction" if the workflow operation was not performed.

## Other responses

- `204`: On non existent timesheet
- `400`: Bad Request

---

[API](https://skmtc.dev/luccasoftware/apis/lucca-expenses.md) - [All operations](https://skmtc.dev/luccasoftware/apis/lucca-expenses/llms.txt) - [OpenAPI document](https://skmtc.dev/luccasoftware/apis/lucca-expenses/revisions/110f9897756c?raw)
