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

# Get Documents

> Access tax/payroll documents for a company, employee, and/or contractor, such as Quarterly Federal Tax Returns, W-2s, 1099s, etc.



## OpenAPI

````yaml openapi/zeal-api.json get /documents
openapi: 3.1.0
info:
  title: zeal-api
  version: '1.0'
servers:
  - url: https://api.zeal.com
security:
  - sec0: []
paths:
  /documents:
    get:
      summary: Get Documents
      description: >-
        Fetch tax/payroll documents such as tax returns and W-2s for an
        employer/employee.
      operationId: get-documents
      parameters:
        - name: companyID
          in: query
          description: Company ID
          required: true
          schema:
            type: string
        - name: id
          in: query
          description: >-
            Filter by id of employee or contractor to get documents for the
            given worker
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              path: /orders-4
            examples:
              Request Example:
                value:
                  companyID: qtvyuwbdiknd
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: true
                    ' data':
                      - companyID: 1b5n28nrideucd24
                        type: W2
                        description: 2024 Wage and Tax Statement (Form W2)
                        id: '1234567891'
                        link: >-
                          https://test-documents.s3.amazonaws.com/1cccxx344ideucd24-2023-W2-1234567890-document
                      - companyID: 1b5n28nrideucd24
                        type: W2
                        description: 2023 Wage and Tax Statement (Form W2)
                        id: '1234567892'
                        link: >-
                          https://test-documents.s3.amazonaws.com/1cccc8nr4ideucd24-2023-W2-1234567890-document
                      - companyID: 1b5n28nrideucd24
                        type: W2C
                        description: 2022 Corrected Wage and Tax Statement (Form W2C)
                        id: '1234567893'
                        link: >-
                          https://test-documents.s3.amazonaws.com/1b5n24444eucd24-2022-W2C-1234567890-document
                      - companyID: 1b5n28nrideucd24
                        type: W2
                        description: 2021 Wage and Tax Statement (Form W2)
                        id: '1234567894'
                        link: >-
                          https://test-documents.s3.amazonaws.com/1b5n28n5455eucd24-2021-W2-1234567890-document
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    default: true
                  ' data':
                    type: array
                    items:
                      type: object
                      properties:
                        companyID:
                          type: string
                          example: 1b5n28nrideucd24
                        type:
                          type: string
                          example: W2
                        description:
                          type: string
                          example: 2024 Wage and Tax Statement (Form W2)
                        id:
                          type: string
                          example: '1234567891'
                        link:
                          type: string
                          example: >-
                            https://test-documents.s3.amazonaws.com/1cccxx344ideucd24-2023-W2-1234567890-document
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: false
                    errors:
                      - message: Employee with this employeeID does not exist
                        code: 4
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                    default: true
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Employee with this employeeID does not exist
                        code:
                          type: integer
                          example: 4
                          default: 0
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer

````