---
title: "Validate Create Timesheet"
method: POST
path: "/tsa/v2/timesheets:validate"
tags: ["Timesheet Approval"]
---

# Validate Create Timesheet

`POST /tsa/v2/timesheets:validate`

## Request

- Base URL: `https://your-subdomain.deputy.deputy.com/api`
- URL: `https://your-subdomain.deputy.deputy.com/api/tsa/v2/timesheets:validate`
- Auth: API key in header `OAuth`

Validate a timesheet creation request. Runs pre-execution validation and returns structured validation errors without persisting any changes.

## Request body

- TimesheetCreateRequestTimesheetCreateRequestBody
  - `setProperties` TsaTimesheetPropertyRequest
    - `startTime` string, int64: unix epoch timestamp, seconds
    - `endTime` string, int64: unix epoch timestamp, seconds
    - `operationalUnitId` integer: operational unit (area) ID
    - `setBreaks` TsaTimesheetBreaksRequest
      - `breaks` ModelTimesheetBreak[]: passing an empty array here will delete all breaks for the timesheet.
        - `duration` integer
        - `startTimeOffset` integer
        - `breakType` 'NO_TYPE' | 'MEAL_BREAK' | 'REST_BREAK'
      - `totalDurationMealBreak` integer: total duration of meal break in minutes
    - `employeeId` integer
    - `leaveRuleId` integer: leave rule (leave type) ID
    - `employeeComment` string: employee comment for the timesheet
  - `setAnswers` TsaTimesheetQuestionSubmitAnswersRequest
    - `answers` TsaTimesheetQuestionAnswerSubmission[]: omitted answers will be assumed null.
      - `name` string
      - `employeeAnswer` string
  - `rosterId` integer
  - `discarded` boolean
  - `payRuleApproved` boolean
  - `timeApproved` boolean
  - `setChildTimesheets` TsaTimesheetChildrenRequest
    - `childTimesheets` TsaChildTimesheetRequest[]
      - `operationalUnitId` integer
      - `startTime` string, int64
      - `endTime` string, int64
  - `inProgress` boolean

## Response `200`

A successful response.

- TsaValidateCreateTimesheetResponse
  - `valid` boolean
  - `errors` TsaValidationError[]
    - `type` string
    - `message` string

---

[API](https://skmtc.dev/deputy/apis/deputy-v2-api.md) - [All operations](https://skmtc.dev/deputy/apis/deputy-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deputy/apis/deputy-v2-api/revisions/78f0278f4608?raw)
