# Get detailed timesheets an employee

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/rest/timesheets/shop/{shopId}/staff/{personnelId}:
    get:
      summary: Get detailed timesheets an employee
      deprecated: false
      description: >-
        Retrieve detailed timesheet including shifts and time-offs for a
        specific employee
      operationId: getTimesheetDetail
      tags:
        - Timesheets
        - timesheets-api
      parameters:
        - name: shopId
          in: path
          description: Shop ID (internal ID or Shopify shop name)
          required: true
          example: ''
          schema:
            type: string
        - name: personnelId
          in: path
          description: Personnel ID
          required: true
          example: 0
          schema:
            type: integer
        - name: from
          in: query
          description: Start date (UTC ISO format)
          required: true
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          description: End date (UTC ISO format)
          required: true
          schema:
            type: string
            format: date-time
        - name: locationIds
          in: query
          description: Filter by Shopify location IDs (comma-separated)
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved timesheet detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - true
                  data:
                    type: object
                    properties:
                      staff:
                        type: object
                        properties:
                          id:
                            type: number
                          personnelId:
                            type: number
                          shopifyUserId:
                            type: string
                            nullable: true
                          userName:
                            type: string
                          email:
                            type: string
                          position:
                            type: string
                            nullable: true
                          salaryWage:
                            type: object
                            properties:
                              currencyCode:
                                type: string
                              currencyMark:
                                type: string
                              rate:
                                type: number
                              rateType:
                                type: string
                            x-apidog-orders:
                              - currencyCode
                              - currencyMark
                              - rate
                              - rateType
                        x-apidog-orders:
                          - id
                          - personnelId
                          - shopifyUserId
                          - userName
                          - email
                          - position
                          - salaryWage
                      shifts:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            date:
                              type: string
                              format: date
                            startTime:
                              type: string
                              format: date-time
                            endTime:
                              type: string
                              format: date-time
                            location:
                              type: string
                            locationId:
                              type: number
                            timezone:
                              type: string
                            hours:
                              type: number
                              description: Total hours worked
                            paidHours:
                              type: number
                              description: Hours that count for pay
                            unpaidHours:
                              type: number
                              description: Hours not paid (e.g. unpaid breaks)
                            unpaidBreaks:
                              type: number
                              description: Unpaid breaks in minutes
                            paidBreaks:
                              type: number
                              description: Paid breaks in minutes
                            amount:
                              type: string
                              description: Calculated pay amount for this shift
                            breaks:
                              type: array
                              items:
                                type: object
                                properties:
                                  breakTypeId:
                                    type: number
                                  name:
                                    type: string
                                  type:
                                    type: string
                                    description: paid or unpaid
                                  durationMins:
                                    type: number
                                  startTime:
                                    type: string
                                  endTime:
                                    type: string
                                x-apidog-orders:
                                  - breakTypeId
                                  - name
                                  - type
                                  - durationMins
                                  - startTime
                                  - endTime
                            scheduleShift:
                              type: object
                              description: >-
                                Scheduled shift details if this shift was from
                                schedule, null for unscheduled shifts
                              properties:
                                id:
                                  type: number
                                startTime:
                                  type: string
                                  format: date-time
                                  description: Scheduled start time
                                endTime:
                                  type: string
                                  format: date-time
                                  description: Scheduled end time
                                position:
                                  type: string
                                  nullable: true
                                note:
                                  type: string
                                  nullable: true
                              x-apidog-orders:
                                - id
                                - startTime
                                - endTime
                                - position
                                - note
                              nullable: true
                            hasPhotos:
                              type: boolean
                              description: Whether shift has clock-in/out photos
                            isApproved:
                              type: boolean
                              nullable: true
                            approvedAt:
                              type: string
                              nullable: true
                            approvedByPersonnelId:
                              type: number
                              nullable: true
                            isTimeClockEntry:
                              type: boolean
                              description: True if clocked via time clock
                            isEdited:
                              type: boolean
                              description: True if shift was manually edited
                          x-apidog-orders:
                            - id
                            - date
                            - startTime
                            - endTime
                            - location
                            - locationId
                            - timezone
                            - hours
                            - paidHours
                            - unpaidHours
                            - unpaidBreaks
                            - paidBreaks
                            - amount
                            - breaks
                            - scheduleShift
                            - hasPhotos
                            - isApproved
                            - approvedAt
                            - approvedByPersonnelId
                            - isTimeClockEntry
                            - isEdited
                      timeOffs:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            date:
                              type: string
                              format: date
                            startTime:
                              type: string
                              format: date-time
                            endTime:
                              type: string
                              format: date-time
                            hours:
                              type: number
                            policy:
                              type: object
                              properties:
                                id:
                                  type: number
                                name:
                                  type: string
                                paid:
                                  type: boolean
                              x-apidog-orders:
                                - id
                                - name
                                - paid
                            location:
                              type: string
                            locationId:
                              type: number
                            status:
                              type: string
                          x-apidog-orders:
                            - id
                            - date
                            - startTime
                            - endTime
                            - hours
                            - policy
                            - location
                            - locationId
                            - status
                      summary:
                        type: object
                        properties:
                          totalHours:
                            type: number
                          totalPaidHours:
                            type: number
                          totalUnpaidHours:
                            type: number
                          totalUnpaidBreaks:
                            type: number
                          totalTimeOffHours:
                            type: number
                          totalAmount:
                            type: string
                        x-apidog-orders:
                          - totalHours
                          - totalPaidHours
                          - totalUnpaidHours
                          - totalUnpaidBreaks
                          - totalTimeOffHours
                          - totalAmount
                    x-apidog-orders:
                      - staff
                      - shifts
                      - timeOffs
                      - summary
                x-apidog-orders:
                  - success
                  - data
          headers: {}
          x-apidog-name: ''
        '400':
          description: Bad Request
          headers: {}
          x-apidog-name: ''
        '401':
          description: Unauthorized
          headers: {}
          x-apidog-name: ''
        '403':
          description: Forbidden
          headers: {}
          x-apidog-name: ''
        '404':
          description: Not Found
          headers: {}
          x-apidog-name: ''
        '429':
          description: Rate Limit Exceeded
          headers: {}
          x-apidog-name: ''
      security: []
      x-apidog-folder: Timesheets
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/763618/apis/api-33094544-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
