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

# Clock in/out

> Clock in or out. Supports staff_id in body for PIN auth.



## OpenAPI

````yaml api-reference/v1/openapi.yaml post /v1/scanner/clock
openapi: 3.1.0
info:
  title: Goods API
  version: 1.0.0
  description: >-
    API for Goods grocery operations - scanner app, admin dashboard, and
    customer features
  contact:
    name: Goods Team
    url: https://goods.app
servers:
  - url: http://localhost:3000
    description: Local development
  - url: https://dev.api.switchyard.run
    description: Development
  - url: https://api.switchyard.run
    description: Production
security: []
tags:
  - name: v1
    description: API v1 - unified domain-based endpoints
  - name: Scanner
    description: Scanner app endpoints for drivers and pickers
  - name: Sweeps
    description: Sweep management - retail store pickup operations
  - name: RFC Picks
    description: Ready-for-checkout picking operations
  - name: Inventory
    description: Inventory management and barcode lookup
  - name: Admin
    description: Admin dashboard endpoints
  - name: Orders
    description: Order management
  - name: Products
    description: Product catalog management
  - name: Notifications
    description: Push, email, SMS, and Slack notification management
paths:
  /v1/scanner/clock:
    post:
      tags:
        - Auth
      summary: Clock in/out
      description: Clock in or out. Supports staff_id in body for PIN auth.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  enum:
                    - clock_in
                    - clock_out
                staff_id:
                  type: string
                  format: uuid
              required:
                - action
      responses:
        '200':
          description: Clock action result
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  action:
                    type: string
                    enum:
                      - clock_in
                      - clock_out
                  timesheet_id:
                    type: number
                  start_time:
                    type: string
                  total_time:
                    type: number
                  operational_unit_id:
                    type: number
                  error:
                    type: string
                  message:
                    type: string
                  elapsed_minutes:
                    type: number
                  minimum_minutes:
                    type: number
        '400':
          description: Bad request (already clocked in/out, shift too short, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  action:
                    type: string
                    enum:
                      - clock_in
                      - clock_out
                  timesheet_id:
                    type: number
                  start_time:
                    type: string
                  total_time:
                    type: number
                  operational_unit_id:
                    type: number
                  error:
                    type: string
                  message:
                    type: string
                  elapsed_minutes:
                    type: number
                  minimum_minutes:
                    type: number
        '404':
          description: Staff not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  action:
                    type: string
                    enum:
                      - clock_in
                      - clock_out
                  timesheet_id:
                    type: number
                  start_time:
                    type: string
                  total_time:
                    type: number
                  operational_unit_id:
                    type: number
                  error:
                    type: string
                  message:
                    type: string
                  elapsed_minutes:
                    type: number
                  minimum_minutes:
                    type: number
        '503':
          description: Clock service not configured
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  action:
                    type: string
                    enum:
                      - clock_in
                      - clock_out
                  timesheet_id:
                    type: number
                  start_time:
                    type: string
                  total_time:
                    type: number
                  operational_unit_id:
                    type: number
                  error:
                    type: string
                  message:
                    type: string
                  elapsed_minutes:
                    type: number
                  minimum_minutes:
                    type: number

````