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

# Approve a timesheet

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

Approve once the timesheet referenced by its ID, and any timesheets before it pending approval belonging to the same timesheet owner.

For example, if timesheets of `ownerid=123` of April 2024 (`id=1`), May 2024 (`id=2`), and June 2024 (`id=3`) are pending approval, and you approve the timesheet `id=2` : both April 2024 and May 2024 timesheets will be approved once, and the June 2024 timesheet will be untouched.

Approbation can only be performed with a `pending` status, and it only performs a single approbation step for each timesheet. If a timesheet require several manual approbation steps, the endpoint must be called several times.

<Info>
  If you want to edit the original Transfer, send a new Transfer with the new duration. 
  To cancel a transfer, send a Transfer with a duration of `PT0S`. To keep the same 
  original transfer, send an empty array.
</Info>

## Request body

- object
  - `transfers` TransferV4[] — If you want to edit the original Transfer, send a new Transfer with the new duration. To cancel a transfer, send a Transfer with a duration of `PT0S`. To keep the same original transfer, send an empty array.
    - `transferAuthorizationId` integer — Unique identifier of the transfer authorization.
    - `amount` Duration
      - `iso` string, duration — ISO-8601 formatted duration.
      - `unit` 'day' | 'hour'
    - `comment` string — A comment to add business context to the transfer action. Visible on the Lucca Timesheet user interface.

## Response `200`

OK

- WorkflowItem[]
  - `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

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/luccasoftware/apis/lucca-expenses.md) · [All operations](https://skmtc.net/luccasoftware/apis/lucca-expenses/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/luccasoftware/lucca-expenses/revisions/110f9897756c/schema)
