> ## 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.

# Create Year to Date Report

> Start an asynchronous job to generate a Year to Date (YTD) report summarizing cumulative payroll totals for a company.



## OpenAPI

````yaml openapi/zeal-api.json post /reports/ytd
openapi: 3.1.0
info:
  title: zeal-api
  version: '1.0'
servers:
  - url: https://api.zeal.com
security:
  - sec0: []
paths:
  /reports/ytd:
    post:
      summary: Create Year to Date Report
      description: Create a year-to-date report.
      operationId: year-to-date-report
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - companyID
                - year
                - media_type
              properties:
                companyID:
                  type: string
                  description: The ID of the company
                employeeID:
                  type: array
                  description: >-
                    Array of employee IDs to grab YTD data for. If this field is
                    omitted, or an empty array is provided, then the report will
                    include all employees
                  items:
                    type: string
                year:
                  type: string
                  description: The year to query for the report
                media_type:
                  type: string
                  description: The media_type of the report
                  default: json
                  enum:
                    - json
                    - csv
                include_migrated:
                  type: boolean
                  description: Include migrated data in the report
                  default: 'false'
            examples:
              Request Example:
                value:
                  companyID: fcc26cc444450ac8a33ry32a3z34462
                  employeeID:
                    - 6266y546eyecc34458aef1
                    - 6556fabfcf2eab26e23331
                  year: '2023'
                  media_type: json
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: true
                    data:
                      job_id: 4a25e61a9-9bd2-4445-ba70-f3e874d772d2
                      status: pending
                      request_body:
                        companyID: fcc26cc444450ac8a33ry32a3z34462
                        employeeID:
                          - 6266y546eyecc34458aef1
                          - 6556fabfcf2eab26e23331
                        year: '2023'
                        media_type: json
                        has_live_key: true
                        job_type: reports
                        report_format: ytd
                      created_at: '2023-12-07T16:25:35.575Z'
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    default: true
                  data:
                    type: object
                    properties:
                      job_id:
                        type: string
                        example: 4a25e61a9-9bd2-4445-ba70-f3e874d772d2
                      status:
                        type: string
                        example: pending
                      request_body:
                        type: object
                        properties:
                          companyID:
                            type: string
                            example: fcc26cc444450ac8a33ry32a3z34462
                          employeeID:
                            type: array
                            items:
                              type: string
                              example: 6266y546eyecc34458aef1
                          year:
                            type: string
                            example: '2023'
                          media_type:
                            type: string
                            example: json
                          has_live_key:
                            type: boolean
                            example: true
                            default: true
                          job_type:
                            type: string
                            example: reports
                          report_format:
                            type: string
                            example: ytd
                      created_at:
                        type: string
                        example: '2023-12-07T16:25:35.575Z'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: false
                    errors:
                      - message: Date is not a valid date
                        code: 44
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                    default: true
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Date is not a valid date
                        code:
                          type: integer
                          example: 44
                          default: 0
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer

````