# Retrieve a timesheet

GET https://api.letsdeel.com/rest/v2/time-tracking/timesheets/{timesheet_id}

Retrieves a timesheet by ID, including its submission, review, and processing status. When expand=file_data is provided, the response also includes file-related details such as the file name, download URL.
 **Token scopes**: `time-tracking:read`

Reference: https://developer.deel.com/api/endpoints/time-tracking/get-time-tracking-timesheet-by-id

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Deel HRIS SCIM API
  version: 1.0.0
paths:
  /time-tracking/timesheets/{timesheet_id}:
    get:
      operationId: get-time-tracking-timesheet-by-id
      summary: Retrieve a timesheet
      description: >-
        Retrieves a timesheet by ID, including its submission, review, and
        processing status. When expand=file_data is provided, the response also
        includes file-related details such as the file name, download URL.
         **Token scopes**: `time-tracking:read`
      tags:
        - subpackage_timeTracking
      parameters:
        - name: timesheet_id
          in: path
          description: ID of the timesheet to fetch file for
          required: true
          schema:
            type: string
            format: uuid
        - name: extend
          in: query
          description: >-
            Optional list of fields to extend in the response. Currently only
            `file_data` is supported, which includes file details (file_id,
            file_name) and download URL.
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: >
            ## Authentication

            The Deel API uses bearer tokens to authenticate requests. All API
            calls must be made over HTTPS — calls over plain HTTP or without
            authentication will fail.


            ```curl

            curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
              -H 'Authorization: Bearer YOUR-TOKEN-HERE'
            ```


            [Learn more about authentication](/api/authentication)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            Timesheet retrieved successfully. Returns timesheet details
            including validation errors if applicable. When extend=file_data,
            also includes file_data object with file details and download URL.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/time-tracking_getTimeTrackingTimesheetById_Response_200
        '400':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '401':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '403':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
        '404':
          description: Timesheet not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetrieveATimesheetRequestNotFoundError'
        '500':
          description: Operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorContainer'
servers:
  - url: https://api.letsdeel.com/rest/v2
  - url: https://api-staging.letsdeel.com/rest/v2
components:
  schemas:
    TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataFileData:
      type: object
      properties:
        file_id:
          type: string
          format: uuid
          description: Unique identifier for the timesheet file
        file_name:
          type: string
          description: Name of the timesheet file
        download_url:
          type: string
          format: uri
          description: Pre-signed S3 URL for downloading the timesheet file
      required:
        - file_id
        - file_name
        - download_url
      description: >-
        Present only when `extend=file_data` is provided. Contains file details
        and download URL.
      title: >-
        TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataFileData
    TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataReviewStatus:
      type: string
      enum:
        - PENDING_CREATION
        - PENDING_REVIEW
        - APPROVED
        - REJECTED
      description: Current status of the timesheet review
      title: >-
        TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataReviewStatus
    TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataSubmissionStatus:
      type: string
      enum:
        - UPLOADING
        - UPLOAD_FAILED
        - PROCESSING
        - SUBMITTED
        - INVALID
        - FAILED
      description: Current status of the timesheet submission
      title: >-
        TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataSubmissionStatus
    TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataValidationErrorsItemsType:
      type: string
      enum:
        - WORK_DURATION_MISMATCH
        - NON_WORKING_DAY_VIOLATION
        - PUBLIC_HOLIDAY_VIOLATION
        - TIME_OFF_VIOLATION
        - SHIFT_OUT_OF_CYCLE
        - DAY_UNAVAILABLE
        - INVALID_SHIFT_SUBMIT_TYPE
        - INVALID_SHIFT_TYPE
        - INVALID_SHIFT_KEEP_IN_TOUCH_DATE_INTERVAL
        - OVERLAPPING_SHIFT
        - SHIFT_CONTRACT_IN_RESTRICTED_STATUS
        - SHIFT_CONTRACT_IN_TERMINATION_STATUS
        - SHIFT_CONTRACT_COMPLETION_DATE
        - SHIFT_CONTRACT_START_DATE
        - SHIFT_MAX_SATURDAYS_PER_YEAR_VIOLATION
        - SHIFT_MAX_WORKING_DAYS_PER_YEAR_VIOLATION
        - SHIFT_MAX_CONSECUTIVE_DAYS_STREAK_VIOLATION
        - BREAK_TYPE_NOT_AVAILABLE
        - BREAK_MISSED_OR_WAIVED
        - BREAK_DURATION_MISMATCH
        - BREAK_MAX_DURATION_EXCEEDED
      description: Type of validation error
      title: >-
        TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataValidationErrorsItemsType
    TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataValidationErrorsItems:
      type: object
      properties:
        row:
          type:
            - number
            - 'null'
          format: double
          description: Row number in the timesheet file where the error occurred
        type:
          $ref: >-
            #/components/schemas/TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataValidationErrorsItemsType
          description: Type of validation error
        column:
          type:
            - string
            - 'null'
          description: Column name in the timesheet file where the error occurred
        context:
          type:
            - object
            - 'null'
          additionalProperties:
            description: Any type
          description: Additional context information about the error
        message:
          type: string
          description: Human-readable error message
      required:
        - type
        - message
      title: >-
        TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataValidationErrorsItems
    TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the timesheet
        end_date:
          type: string
          format: date
          description: End date of the timesheet period
        file_data:
          oneOf:
            - $ref: >-
                #/components/schemas/TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataFileData
            - type: 'null'
          description: >-
            Present only when `extend=file_data` is provided. Contains file
            details and download URL.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the timesheet was created
        start_date:
          type: string
          format: date
          description: Start date of the timesheet period
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the timesheet was last updated
        contract_id:
          type: string
          description: External id of the worker's contract associated with the timesheet
        review_status:
          $ref: >-
            #/components/schemas/TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataReviewStatus
          description: Current status of the timesheet review
        submission_status:
          $ref: >-
            #/components/schemas/TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataSubmissionStatus
          description: Current status of the timesheet submission
        validation_errors:
          type:
            - array
            - 'null'
          items:
            $ref: >-
              #/components/schemas/TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaDataValidationErrorsItems
          description: >-
            Array of validation errors found during timesheet processing. Null
            if no errors found.
      required:
        - id
        - end_date
        - created_at
        - start_date
        - updated_at
        - contract_id
        - review_status
        - submission_status
        - validation_errors
      description: >-
        Timesheet data including validation errors if applicable. When
        extend=file_data, also includes file_data object with file details and
        download URL.
      title: >-
        TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaData
    time-tracking_getTimeTrackingTimesheetById_Response_200:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaData
          description: >-
            Timesheet data including validation errors if applicable. When
            extend=file_data, also includes file_data object with file details
            and download URL.
      required:
        - data
      title: time-tracking_getTimeTrackingTimesheetById_Response_200
    ApiErrorRequest:
      type: object
      properties:
        method:
          type: string
          description: The HTTP method of the failed request
        url:
          type: string
          description: The relative URL of the failed request
        status:
          type: number
          format: double
          description: The status code of the response
        api_req_id:
          type: string
          description: The request ID of the failed request
        docs:
          type: string
          description: >-
            A link to the official documentation for the requested endpoint
            resource
        source:
          type: string
          description: The source handler which produced the returned error
        code:
          type: number
          format: double
          description: The code of the source handler which produced the returned error
      title: ApiErrorRequest
    ApiError:
      type: object
      properties:
        message:
          type: string
          description: A description of the returned error
        path:
          type: string
          description: The JSON path where input validation failed
      title: ApiError
    ApiErrorContainer:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/ApiErrorRequest'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
      title: ApiErrorContainer
    TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaErrorsItems:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
        field:
          type: string
          description: Name of the field causing the error (for validation issues)
        message:
          type: string
          description: Human-readable explanation of the error
      required:
        - code
        - field
        - message
      title: >-
        TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaErrorsItems
    RetrieveATimesheetRequestNotFoundError:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/TimeTrackingTimesheetsTimesheetIdGetResponsesContentApplicationJsonSchemaErrorsItems
      required:
        - errors
      title: RetrieveATimesheetRequestNotFoundError
  securitySchemes:
    deelToken:
      type: http
      scheme: bearer
      description: >
        ## Authentication

        The Deel API uses bearer tokens to authenticate requests. All API calls
        must be made over HTTPS — calls over plain HTTP or without
        authentication will fail.


        ```curl

        curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
          -H 'Authorization: Bearer YOUR-TOKEN-HERE'
        ```


        [Learn more about authentication](/api/authentication)
    oauth2:
      type: http
      scheme: bearer
      description: >-
        Standard OAuth2 security scheme based on
        https://swagger.io/docs/specification/authentication/

```

## SDK Code Examples

```python
import requests

url = "https://api.letsdeel.com/rest/v2/time-tracking/timesheets/880e8400-e29b-41d4-a716-446655440003"

querystring = {"extend":"file_data"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.letsdeel.com/rest/v2/time-tracking/timesheets/880e8400-e29b-41d4-a716-446655440003?extend=file_data';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.letsdeel.com/rest/v2/time-tracking/timesheets/880e8400-e29b-41d4-a716-446655440003?extend=file_data"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.letsdeel.com/rest/v2/time-tracking/timesheets/880e8400-e29b-41d4-a716-446655440003?extend=file_data")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.letsdeel.com/rest/v2/time-tracking/timesheets/880e8400-e29b-41d4-a716-446655440003?extend=file_data")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.letsdeel.com/rest/v2/time-tracking/timesheets/880e8400-e29b-41d4-a716-446655440003?extend=file_data', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.letsdeel.com/rest/v2/time-tracking/timesheets/880e8400-e29b-41d4-a716-446655440003?extend=file_data");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.letsdeel.com/rest/v2/time-tracking/timesheets/880e8400-e29b-41d4-a716-446655440003?extend=file_data")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```