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

# Download Employee Document



## OpenAPI

````yaml get /unified/hris/employees/{id}/documents/{subResourceId}/download
openapi: 3.1.0
info:
  title: HRIS
  description: The documentation for the StackOne Unified API - HRIS
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.stackone.com
security: []
tags:
  - name: Benefits
    description: Employee benefits and entitlements.
  - name: Companies
    description: Organizations or legal entities.
  - name: Custom Field Definitions
    description: Definitions for custom fields.
  - name: Documents
    description: Employee related documents.
  - name: Employees
    description: People employed by the company.
  - name: Employments
    description: Details of an employee's employment.
  - name: Groups
    description: Organizational groups or teams.
  - name: Jobs
    description: Job positions or roles.
  - name: Locations
    description: Physical or virtual work locations.
  - name: Positions
    description: Job positions available for hiring.
  - name: Shifts
    description: Employee work shifts and schedules.
  - name: Skills
    description: Skills and competencies tracked for employees.
  - name: Tasks
    description: Tasks or assignments for employees.
  - name: Time Entries
    description: Records of hours worked or activities performed.
  - name: Time Off
    description: Employee leave and time off records.
  - name: Time Off Balances
    description: Available leave balances for employees.
  - name: Time Off Policies
    description: Rules and policies for employee leave.
  - name: Training
    description: Training records for employees.
  - name: Training Content
    description: Training content for employees.
  - name: Work Eligibility
    description: Eligibility status for employment.
paths:
  /unified/hris/employees/{id}/documents/{subResourceId}/download:
    get:
      tags:
        - Employees
        - Documents
      summary: Download Employee Document
      operationId: hris_download_employee_document
      parameters:
        - name: x-account-id
          in: header
          description: The account identifier
          required: true
          schema:
            type: string
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: subResourceId
          required: true
          in: path
          schema:
            type: string
        - name: format
          required: false
          in: query
          description: The format to download the file in
          schema:
            nullable: true
            example: base64
            type: string
        - name: export_format
          required: false
          in: query
          description: The export format of the file
          schema:
            nullable: true
            example: text/plain
            type: string
      responses:
        '200':
          description: >-
            The document related to the employee with the given identifiers was
            retrieved.
          content:
            application/pdf:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/msword:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.openxmlformats-officedocument.wordprocessingml.document:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.ms-excel:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.ms-powerpoint:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.openxmlformats-officedocument.presentationml.presentation:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/rtf:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            text/plain:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            image/jpeg:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            image/png:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            image/gif:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            image/tiff:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            image/bmp:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            image/heic:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/zip:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/gzip:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/xml:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            text/csv:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.oasis.opendocument.text:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.oasis.opendocument.spreadsheet:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            audio/mpeg:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            video/mp4:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            video/webm:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            text/rtf:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/x-rar-compressed:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/x-7z-compressed:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            message/rfc822:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.ms-outlook:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            text/html:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            image/webp:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            application/vnd.oasis.opendocument.presentation:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            audio/wav:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            audio/mp4:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            video/avi:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
            video/quicktime:
              schema:
                $ref: '#/components/schemas/DownloadApiModel'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '408':
          description: The request has timed out.
          headers:
            Retry-After:
              description: A time in seconds after which the request can be retried.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestTimedOutResponse'
        '409':
          description: Conflict with current state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
        '412':
          description: >-
            Precondition failed: linked account belongs to a disabled
            integration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreconditionFailedResponse'
        '422':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Server error while executing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
        '501':
          description: This functionality is not implemented.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotImplementedResponse'
        '502':
          description: Bad gateway error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGatewayResponse'
      security:
        - basic: []
components:
  schemas:
    DownloadApiModel:
      type: object
      properties:
        headers:
          description: Headers related to the download
          allOf:
            - $ref: '#/components/schemas/DownloadHeadersApiModel'
        data:
          type: string
          description: The file data in binary format
          format: binary
      required:
        - headers
        - data
    BadRequestResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Error message
          example: Bad Request
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
        data:
          description: Error details
          nullable: true
          allOf:
            - $ref: '#/components/schemas/UnifiedError'
        provider_errors:
          description: List of provider-specific errors
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/ProviderError'
      required:
        - statusCode
        - message
        - timestamp
    UnauthorizedResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 401
        message:
          type: string
          description: Error message
          example: Unauthorized
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    ForbiddenResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 403
        message:
          type: string
          description: Error message
          example: Forbidden resource
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    NotFoundResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 404
        message:
          type: string
          description: Error message
          example: Not Found
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    RequestTimedOutResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 408
        message:
          type: string
          description: Error message
          example: Request timed out
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    ConflictResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 409
        message:
          type: string
          description: Error message
          example: Conflict
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    PreconditionFailedResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 412
        message:
          type: string
          description: Error message
          example: Precondition failed
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    UnprocessableEntityResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 422
        message:
          type: string
          description: Error message
          example: Unprocessable Entity
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    TooManyRequestsResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 429
        message:
          type: string
          description: Error message
          example: Too many requests
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    InternalServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 500
        message:
          type: string
          description: Error message
          example: Internal server error
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    NotImplementedResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 501
        message:
          type: string
          description: Error message
          example: Not Implemented
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    BadGatewayResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 502
        message:
          type: string
          description: Error message
          example: Bad Gateway
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    DownloadHeadersApiModel:
      type: object
      properties:
        content-disposition:
          type: string
          description: Value of the Content-Disposition header
          example: attachment; filename="example.pdf"
          nullable: true
        content-type:
          type: string
          description: MIME type of the file
          example: application/pdf
          nullable: true
        content-length:
          type: number
          description: Size of the content in bytes
          example: 1024
          nullable: true
        content-range:
          type: string
          description: Range of the content being sent
          example: bytes 0-1023/2048
          nullable: true
        content-encoding:
          type: string
          description: Encoding of the content
          example: gzip
          nullable: true
        transfer-encoding:
          type: string
          description: Transfer encoding type
          example: chunked
          nullable: true
    UnifiedError:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
          nullable: true
        message:
          type: string
          description: Error message
          example: Bad Request
          nullable: true
        headers:
          type: object
          description: Response headers
          example:
            content-type: application/json
            x-request-id: 5678c28b211dace4e0a0f9171e6b88c5
          nullable: true
    ProviderError:
      type: object
      properties:
        status:
          type: number
          description: HTTP status code of the provider error
          example: 400
          nullable: true
        url:
          type: string
          description: URL that caused the error
          example: https://api.provider.com/v1/resource
          nullable: true
        raw:
          type: object
          description: Raw error response from the provider
          example:
            message: Invalid input parameters
          nullable: true
        headers:
          type: object
          description: Response headers
          example:
            content-type: application/json
            x-request-id: 5678c28b211dace4e0a0f9171e6b88c5
          nullable: true
  securitySchemes:
    basic:
      type: http
      scheme: basic

````