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

# Create Hris Time Off

> Creates a REQUESTED time-off request after eligibility and day calculation, logging and notifying approvers.

Not available to API keys yet. It will need `time:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/create-hris-time-off
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/create-hris-time-off:
    post:
      operationId: createHrisTimeOff
      summary: Create Hris Time Off
      description: >-
        Creates a REQUESTED time-off request after eligibility and day
        calculation, logging and notifying approvers.


        Not available to API keys yet. It will need `time:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateHrisTimeOffRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateHrisTimeOffResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    CreateHrisTimeOffRequest:
      type: object
      properties:
        roleInOrgID:
          type: string
          format: uuid
        startDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        endDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        days:
          type: number
          exclusiveMinimum: 0
          description: >-
            The day allocations must sum to days within 0.001 and fall within
            the requested date range.
        data:
          type: object
          additionalProperties:
            oneOf:
              - const: 0.5
              - const: 1
        note:
          type: string
          maxLength: 100
        leaveType:
          type: string
          enum:
            - ANNUAL_LEAVE
            - PAID_TIME_OFF
            - PUBLIC_HOLIDAY
            - SICK_LEAVE
            - COMPASSIONATE_BEREAVEMENT_LEAVE
            - PARENTAL_LEAVE
            - MATERNITY_LEAVE
            - LONG_SERVICE_LEAVE
            - COMMUNITY_SERVICE_LEAVE
            - FAMILY_CARE_LEAVE
            - UNPAID_LEAVE
            - SPECIAL_LEAVE
        customLeaveTypeID:
          type: string
          format: uuid
      required:
        - startDate
        - endDate
        - days
        - data
        - leaveType
    CreateHrisTimeOffResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        hrisTimeOffID:
          type: string
          format: uuid
        startDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        endDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        days:
          type: number
        status:
          type: string
          enum:
            - REQUESTED
            - APPROVED
            - REJECTED
            - CANCELLED
        leaveType:
          type: string
          enum:
            - ANNUAL_LEAVE
            - PAID_TIME_OFF
            - PUBLIC_HOLIDAY
            - SICK_LEAVE
            - COMPASSIONATE_BEREAVEMENT_LEAVE
            - PARENTAL_LEAVE
            - MATERNITY_LEAVE
            - LONG_SERVICE_LEAVE
            - COMMUNITY_SERVICE_LEAVE
            - FAMILY_CARE_LEAVE
            - UNPAID_LEAVE
            - SPECIAL_LEAVE
        customLeaveTypeID:
          type:
            - string
            - 'null'
          format: uuid
        note:
          type:
            - string
            - 'null'
      required:
        - id
        - hrisTimeOffID
        - startDate
        - endDate
        - days
        - status
        - leaveType
        - customLeaveTypeID
        - note
      description: Request regeneration does not infer response shapes.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
