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

# Preview a time-off request

> Works out a request without creating it: which days count against the balance once weekends and public holidays are excluded, how many days that is, and the balance left afterwards. `remaining_balance` is null for policies without a fixed allowance. Defaults to the caller; `employee_id` acts for someone else and needs the admin role or being their approver. Pass `request_id` when previewing a change to an existing request, so its current days are not counted twice. Requires the `time-off:read` scope.



## OpenAPI

````yaml /openapi.json get /time-off/preview
openapi: 3.1.1
info:
  title: A-Char API
  version: 1.0.0
  description: 'Authenticate with `Authorization: Bearer <api key>`.'
servers:
  - url: https://a-char.com/api/v1
security:
  - bearerAuth: []
paths:
  /time-off/preview:
    get:
      tags:
        - Time off requests
      summary: Preview a time-off request
      description: >-
        Works out a request without creating it: which days count against the
        balance once weekends and public holidays are excluded, how many days
        that is, and the balance left afterwards. `remaining_balance` is null
        for policies without a fixed allowance. Defaults to the caller;
        `employee_id` acts for someone else and needs the admin role or being
        their approver. Pass `request_id` when previewing a change to an
        existing request, so its current days are not counted twice. Requires
        the `time-off:read` scope.
      operationId: timeOff.preview
      parameters:
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date
          allowEmptyValue: true
          allowReserved: true
        - name: start_date_type
          in: query
          required: false
          schema:
            enum:
              - FULL_DAY
              - AM
              - PM
            type: string
            default: FULL_DAY
          allowEmptyValue: true
          allowReserved: true
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date
          allowEmptyValue: true
          allowReserved: true
        - name: end_date_type
          in: query
          required: false
          schema:
            enum:
              - FULL_DAY
              - AM
              - PM
            type: string
            default: FULL_DAY
          allowEmptyValue: true
          allowReserved: true
        - name: policy_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
          allowEmptyValue: true
          allowReserved: true
        - name: employee_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          allowEmptyValue: true
          allowReserved: true
        - name: request_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  days:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          format: date
                        type:
                          enum:
                            - full_day
                            - morning
                            - afternoon
                          type: string
                        amount:
                          type: number
                        is_weekend:
                          type: boolean
                        holiday:
                          anyOf:
                            - type: string
                            - type: 'null'
                      required:
                        - date
                        - type
                        - amount
                        - is_weekend
                        - holiday
                  days_requested:
                    type: number
                  remaining_balance:
                    anyOf:
                      - type: number
                      - type: 'null'
                required:
                  - days
                  - days_requested
                  - remaining_balance
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.