---
title: "Submit timesheets"
method: POST
path: "/timmi-timesheet/api/timesheets/submit"
tags: ["Workflow"]
---

# Submit timesheets

`POST /timmi-timesheet/api/timesheets/submit`

Submit all timesheets for an owner up to the given period, or to the last submittable timesheet.

The response contains all affected timesheets, with a feedback about each item's status, subsequent to the submission action :
* `success` when the timesheet is submitted successfully.
* `noAction` if the timesheet has already been submitted.
* `error` in case of an error.

Timesheets are created and their status are set to `submitted`. In some cases, timesheets may then be automatically `approved`, depending on the approval workflow settings.

Once submitted, all timeentries on the period for that user can no longer be modified. In order to be able to modify them, the timesheet must first be rejected through `cancel`, `deny` or `invalidate` operations (depends on the current timesheet status).

If you have set up account transfer authorizations in Lucca Timesheet, and need to adjust them before submitting timesheets, only the timesheet containing itself the `startsAt` date you set will be associated with the `Transfer` provided  (i.e. the last timesheet).

If you need to handle account transfer authorizations, we strongly suggest to do as many requests as there are timesheets to submit for a given owner, in chronological order, so that you can provide each timesheet its corresponding Transfer.

Please see [this guide](../docs/Use-cases/Timmi%20Timesheet/Mass-submit-timesheets.md) on how to submit Timesheets the right way.

## Request body

- object
  - `ownerId` integer, required — Reference to the owner of submittable timesheets.
  - `startsAt` string, date-time, required — First day of the last timesheet to submit.
  - `endsAt` string, date-time — Last day of the last timesheet to submit. Optional.
  - `transfers` TransferV4[] — Array of suggested transfer from one account to another.
    - `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)
