> ## Documentation Index
> Fetch the complete documentation index at: https://developer.buildpass.global/llms.txt
> Use this file to discover all available pages before exploring further.

# List timesheets

> Get all timesheets for a builder



## OpenAPI

````yaml GET /timesheets
openapi: 3.0.0
info:
  title: BuildPass API
  description: >-
    Approved integrators can connect to the BuildPass API on behalf of builders
    to build connections between a wide range of construction platforms.
  version: 1.0.0
servers:
  - url: https://api.buildpass.global
    description: Production server
security:
  - OAuth2: []
paths:
  /timesheets:
    get:
      description: Get all timesheets for a builder
      operationId: getTimesheets
      parameters:
        - name: projectId
          description: Filter timesheets by project
          in: query
          required: false
          schema:
            type: string
            example: proj_clgbsb91b001qjy0f0eo1hscp
        - name: status
          description: Filter timesheets by status
          in: query
          required: false
          schema:
            enum:
              - APPROVED_1
              - APPROVED_2
              - REJECTED
              - WAITING_REVIEW
            example: WAITING_REVIEW
        - name: startDate
          description: Filter by date range start (ISO format)
          in: query
          required: false
          schema:
            type: string
            example: '2023-10-03T23:19:35.771Z'
        - name: endDate
          description: Filter by date range end (ISO format)
          in: query
          required: false
          schema:
            type: string
            example: '2024-10-03T23:19:35.771Z'
        - name: offset
          description: >-
            The number of items to skip before starting to collect the result
            set
          in: query
          required: false
          schema:
            type: integer
            default: 0
            example: 0
        - name: limit
          description: The number of items to return.
          in: query
          required: false
          schema:
            type: integer
            default: 25
            example: 25
            maximum: 25
        - name: X-BuildPass-Builder-Id
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/X-BuildPass-Builder-Id'
        - name: X-BuildPass-Api-Version
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/X-BuildPass-Api-Version'
      responses:
        '200':
          description: A list of timesheets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponseTimesheet'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
        '500':
          description: Internal Server Error
      security:
        - OAuth2: []
components:
  schemas:
    X-BuildPass-Builder-Id:
      type: string
      example: buil_clgbsb90b001qjy0f0eo1hspp
      description: Call the /builders endpoint to get a builder ID
    X-BuildPass-Api-Version:
      type: string
      example: v1
      default: v1
      enum:
        - v1
      description: What API version to use.
    PaginatedResponseTimesheet:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Timesheet'
        meta:
          $ref: '#/components/schemas/PaginationMeta'
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              fieldName:
                type: string
                example: name
              message:
                type: string
                example: This field is required.
    Timesheet:
      type: object
      properties:
        id:
          type: string
          example: ts_clgbsb90b001qjy0f0eo1hspp
        status:
          type: string
          enum:
            - APPROVED_1
            - APPROVED_2
            - REJECTED
            - WAITING_REVIEW
          example: WAITING_REVIEW
        createdAt:
          type: string
          format: date-time
          example: '2023-10-03T23:19:35.771Z'
        updatedAt:
          type: string
          format: date-time
          example: '2023-10-03T23:19:35.771Z'
        date:
          type: string
          format: date-time
          example: '2023-10-03T23:19:35.771Z'
        hours:
          type: number
          example: 10
        notes:
          type: string
          example: This is a note
        timeType:
          type: string
          example: Annual Leave
        costCode:
          type: string
          example: 001 - Foundation
        timesheetGroupId:
          type: string
          example: tsg_clgbsb90b001qjy0f0eo1hspp
        profile:
          type: object
          properties:
            id:
              type: string
              example: pers_clgbsb90b001qjy0f0eo1hspp
            fullName:
              type: string
              example: John Doe
            type:
              type: string
              example: worker
        project:
          type: object
          properties:
            id:
              type: string
              example: project_clgbsb90b001qjy0f0eo1hspp
            name:
              type: string
              example: Project 1
    PaginationMeta:
      type: object
      properties:
        totalCount:
          type: integer
          description: How many total items there are.
          example: 100
        totalPages:
          type: integer
          description: How many pages there are based on your offset and limit.
          example: 4
        offset:
          type: integer
          description: How many items skipped before starting to collect the result set.
          example: 0
        limit:
          type: integer
          description: How many items you requested to return.
          example: 25
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.buildpass.global/oauth/token
          scopes:
            read:subcontractors: Read subcontractors
            write:subcontractors: Write subcontractors
            read:prequalifications: Read prequalifications
            write:prequalifications: Write prequalifications
            read:insurances: Read insurances
            write:insurances: Write insurances
            read:contacts: Read contacts
            read:swms: Read SWMS
            read:timesheets: Read timesheets
            read:inductions: Read inductions
            read:meetings: Read meetings
            write:meetings: Write meetings
            read:photos: Read photos and photo folders
            write:photos: Create, update, delete, and sync photos and photo folders

````