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

# Create Time Off

> Creates a TimeOff object with the given values.

import { Accordion, AccordionGroup } from "@mintlify/components";

This endpoint creates a Timeoff Entry in the connected HRIS via Bindbee's unified **Time Off** model.

## Provider-specific behavior

Different HRIS systems can have slightly different requirements and behaviors when creating timeoff entries. Use the accordions below to see details for each provider.

<AccordionGroup>
  <Accordion title="ADP">
    <p>
      When the underlying HRIS is <strong>ADP</strong>, a Timesheet Entry can be created using a payload like:
    </p>

    ```json theme={null}
    {
        "employee": "01929f6e-c6c1-74b4-8119-a7d9efc0c8b8",
        "amount": 8,
        "start_time": "2024-09-04T08:00:00Z",
        "end_time": "2024-09-04T16:00:00Z",
        "request_type": "VACATION"
    }
    ```
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml post /api/hris/v1/time-off
openapi: 3.1.0
info:
  title: Bindbee APIs
  version: 0.1.0
servers:
  - url: https://api.bindbee.dev
  - url: https://api-eu.bindbee.dev
security: []
paths:
  /api/hris/v1/time-off:
    post:
      tags:
        - Time Off
      summary: Create Time Off
      description: Creates a TimeOff object with the given values.
      operationId: create_time_off_api_hris_v1_time_off_post
      parameters:
        - name: x-connector-token
          in: header
          required: true
          schema:
            type: string
            title: X-Connector-Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateHrisTimeOff'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateHrisTimeOff:
      properties:
        employee:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Employee
          description: The employee requesting time off.
          examples:
            - 018b4bfb-5ece-70b1-ad5e-862a9433aa65
        approver:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Approver
          description: >-
            The Bindbee ID of the employee with the ability to approve the time
            off request.
          examples:
            - 018b4bfb-6065-7f83-b11d-e85ea49e37c3
        status:
          anyOf:
            - type: string
            - type: 'null'
          enum:
            - REQUESTED
            - APPROVED
            - DECLINED
            - CANCELLED
            - DELETED
          title: Status
          description: >-
            The status of this time off request. If the value is not one of the
            defined enum values, the original value passed through will be
            returned.
          default: ''
          examples:
            - APPROVED
        employee_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Employee Note
          description: The employee note for this time off request.
          default: ''
          examples:
            - Paid paid vacation! Scuba diving in Hawaii.
        units:
          anyOf:
            - type: string
            - type: 'null'
          enum:
            - HOURS
            - DAYS
          title: Units
          description: >-
            The measurement that the third-party integration uses to count time
            requested. If the value is not one of the defined enum values, the
            original value passed through will be returned.
          default: ''
          examples:
            - HOURS
        amount:
          anyOf:
            - type: integer
            - type: number
            - type: 'null'
          title: Amount
          description: The time off quantity measured by the prescribed “units”.
          examples:
            - 12
        request_type:
          anyOf:
            - type: string
            - type: 'null'
          enum:
            - VACATION
            - SICK
            - PERSONAL
            - JURY_DUTY
            - VOLUNTEER
            - BEREAVEMENT
            - MATERNITY
            - ANNUAL_LEAVE
            - EMERGENCY_LEAVE
            - LEAVE_OF_ABSENCE
            - PATERNITY
            - PAID_TIME_OFF
            - LONG_TERM_DISABILITY
            - SHORT_TERM_DISABILITY
            - COMP_OFF
            - WORK_FROM_HOME
            - COMPASSIONATE
            - TIME_OFF
            - FMLA
          title: Request Type
          description: >-
            The type of time off request. If the value is not one of the defined
            enum values, the original value passed through will be returned.
          examples:
            - VACATION
        start_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Start Time
          description: The day and time of the start of the time requested off.
          examples:
            - '2023-04-10T00:00:00Z'
        end_time:
          anyOf:
            - type: string
            - type: 'null'
          title: End Time
          default: The day and time of the end of the time requested off.
          examples:
            - '2023-04-10T00:00:00Z'
      type: object
      required:
        - employee
        - amount
        - request_type
        - start_time
      title: CreateHrisTimeOff
      description: The TimeOff object is used to represent all employees' Time Off entries.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````