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

# get user preference



## OpenAPI

````yaml /api-reference/openapi.json post /v1/devices/hvac/{id}/user_preferences/get
openapi: 3.0.0
info:
  title: WattShift API
  description: An API for the WattShift Service (https://wattshift.com/partners)
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/devices/hvac/{id}/user_preferences/get:
    post:
      tags:
        - hvac
      summary: get user preference
      operationId: HvacCompositeAuthController_getUserPreference_v1
      parameters:
        - name: x-ws-api-key
          in: header
          description: WattShift API Key
          schema:
            type: string
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUserPreferencesResponseDto'
              example:
                name: Weekday comfort
                tempUnits: F
                defaultMode: AUTO
                defaultMaxTemp: 75
                defaultMinTemp: 65
                defaultCoolSetpoint: 74
                defaultHeatSetpoint: 68
                scheduleBlocks:
                  - startTimeMinutes: 0
                    endTimeMinutes: 480
                    mode: HEAT
                    targetCoolSetpoint: null
                    targetHeatSetpoint: 68
                    maxTemp: 75
                    minTemp: 65
                    daysOfWeek:
                      - 1
                      - 2
                      - 3
                      - 4
                      - 5
                    scheduleType: RECURRING
                  - startTimeMinutes: 480
                    endTimeMinutes: 1440
                    mode: AUTO
                    targetCoolSetpoint: 74
                    targetHeatSetpoint: 68
                    maxTemp: 75
                    minTemp: 65
                    daysOfWeek:
                      - 1
                      - 2
                      - 3
                      - 4
                      - 5
                    scheduleType: RECURRING
      security:
        - x-ws-api-key: []
components:
  schemas:
    GetUserPreferencesResponseDto:
      type: object
      properties:
        name:
          description: The human-readable name for the schedule
          type: string
          minLength: 1
        scheduleBlocks:
          description: >-
            0 or more blocks for this schedule to follow. If no blocks are
            added, the default temp will be followed
          type: array
          items:
            type: object
            properties:
              startTimeMinutes:
                description: >-
                  The number of minutes since midnight that the block starts.
                  For 1:25 am, this would be 85 (1 * 60 + 25)
                type: number
                minimum: 0
                exclusiveMinimum: false
                maximum: 1440
                exclusiveMaximum: false
              endTimeMinutes:
                description: >-
                  The number of minutes since midnight that the block ends. MUST
                  be greater than startTimeMinutes
                type: number
                minimum: 0
                exclusiveMinimum: false
                maximum: 1440
                exclusiveMaximum: false
              mode:
                description: The mode for the HVAC unit in this block
                type: string
                enum:
                  - 'OFF'
                  - HEAT
                  - COOL
                  - AUTO
                x-enumNames:
                  - 'OFF'
                  - HEAT
                  - COOL
                  - AUTO
              targetTemp:
                description: This field is deprecated
                type: number
                minimum: -50
                exclusiveMinimum: false
                maximum: 200
                exclusiveMaximum: false
                nullable: true
              targetCoolSetpoint:
                description: The target cool setpoint
                type: number
                minimum: -50
                exclusiveMinimum: false
                maximum: 200
                exclusiveMaximum: false
                nullable: true
              targetHeatSetpoint:
                description: The target heat setpoint
                type: number
                minimum: -50
                exclusiveMinimum: false
                maximum: 200
                exclusiveMaximum: false
                nullable: true
              maxTemp:
                description: >-
                  The max temperature allowed in this block (units determined by
                  parent schedule)
                type: number
                minimum: -50
                exclusiveMinimum: false
                maximum: 200
                exclusiveMaximum: false
                nullable: true
              minTemp:
                description: >-
                  The min temperature allowed in this block (units determined by
                  parent schedule)
                type: number
                minimum: -50
                exclusiveMinimum: false
                maximum: 200
                exclusiveMaximum: false
                nullable: true
              daysOfWeek:
                description: >-
                  The days of the week that this block applies to. 0 is Sunday,
                  1 is Monday, etc.
                type: array
                items:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: false
                  maximum: 6
                  exclusiveMaximum: false
              scheduleType:
                type: string
                enum:
                  - RECURRING
                  - ONE_TIME
                x-enumNames:
                  - RECURRING
                  - ONE_TIME
                default: RECURRING
            required:
              - startTimeMinutes
              - endTimeMinutes
              - targetTemp
              - targetCoolSetpoint
              - targetHeatSetpoint
              - maxTemp
              - minTemp
              - daysOfWeek
        weekNumbers:
          description: >-
            The week numbers to apply this schedule. For example, [0,1,2,...,51]
            applies to all 52 weeks of the year. Leave empty to also apply to
            all weeks.
          type: array
          items:
            type: integer
            minimum: 0
            exclusiveMinimum: false
            maximum: 52
            exclusiveMaximum: false
        enabled:
          description: Whether this schedule should be enabled
          type: boolean
        defaultMode:
          description: The default mode for the HVAC unit.
          type: string
          enum:
            - 'OFF'
            - HEAT
            - COOL
            - AUTO
          x-enumNames:
            - 'OFF'
            - HEAT
            - COOL
            - AUTO
          default: AUTO
        tempUnits:
          description: The units for temperature.
          type: string
          enum:
            - F
            - C
          x-enumNames:
            - F
            - C
        defaultTemp:
          type: number
          minimum: -50
          exclusiveMinimum: false
          maximum: 200
          exclusiveMaximum: false
        currentTemp:
          description: The current temperature
          type: number
          minimum: -50
          exclusiveMinimum: false
          maximum: 200
          exclusiveMaximum: false
        targetTemp:
          description: The target temperature
          type: number
          minimum: -50
          exclusiveMinimum: false
          maximum: 200
          exclusiveMaximum: false
        targetCoolSetpoint:
          description: The target cool setpoint
          type: number
          minimum: -50
          exclusiveMinimum: false
          maximum: 200
          exclusiveMaximum: false
        targetHeatSetpoint:
          description: The target heat setpoint
          type: number
          minimum: -50
          exclusiveMinimum: false
          maximum: 200
          exclusiveMaximum: false
        maxTemp:
          description: The max default temperature
          type: number
          minimum: -50
          exclusiveMinimum: false
          maximum: 200
          exclusiveMaximum: false
        minTemp:
          description: The min default temperature
          type: number
          minimum: -50
          exclusiveMinimum: false
          maximum: 200
          exclusiveMaximum: false
      required:
        - name
        - scheduleBlocks
        - enabled
        - tempUnits
  securitySchemes:
    x-ws-api-key:
      type: apiKey
      in: header
      name: x-ws-api-key
      description: WattShift API key

````