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

# Update Deduction

> Update a deduction attached to an employee check.



## OpenAPI

````yaml openapi/employee-checks.json patch /deductions
openapi: 3.1.0
info:
  title: zeal-api
  version: '1.0'
servers:
  - url: https://api.zeal.com
security:
  - sec0: []
paths:
  /deductions:
    patch:
      summary: Update Deduction
      description: Update a deduction.
      operationId: update-deduction
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - companyID
                - employeeCheckID
                - deductionID
                - deduction
              properties:
                companyID:
                  type: string
                  description: ID of Company
                employeeCheckID:
                  type: string
                  description: ID of Employee Check
                deductionID:
                  type: string
                  description: ID of Deduction to be updated
                deduction:
                  type: array
                  description: Contribution details to be updated
                  items:
                    properties:
                      employee_contribution:
                        type: object
                        properties:
                          override_type:
                            type: string
                            description: >-
                              Override type (Accepts: final, overridable,
                              needs_input)
                          contribution_type:
                            type: string
                            description: >-
                              Type of contribution (Accepts: dollars,
                              percentage)
                          value:
                            type: number
                            description: The Value of the employee contribution
                            format: float
                      employer_contribution:
                        type: object
                        properties:
                          value:
                            type: number
                            description: Value of Employer contribution
                            format: float
                          contribution_type:
                            type: string
                            description: >-
                              Type of contribution (Accepts: dollars,
                              percentage)
                    type: object
            examples:
              Request Example:
                value:
                  companyID: fc235f012bae46aa8a082f3
                  employeeCheckID: 7f0da5e428324c049ae6a6bac2e62f88
                  deductionID: 61d12e74db7df700237de5d4
                  deduction:
                    employee_contribution:
                      value: 10
                      contribution_type: percentage
                    employer_contribution:
                      value: 20
                      contribution_type: dollars
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: true
                    data:
                      companyID: fc235f012bae46aa8a082f3
                      deductionID: 61cae1e03e6f8201c34c77ca
                      employeeCheckID: 73a99095827d4f32bbb18adce048c081
                      deduction_type: hsa
                      employer_contribution:
                        value: 3
                        contribution_type: dollars
                        matching: false
                      employee_contribution:
                        value: 2
                        contribution_type: dollars
                      deductionTemplateID: 61cae1e03e6f8201c34c77ca
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    default: true
                  data:
                    type: object
                    properties:
                      companyID:
                        type: string
                        example: fc235f012bae46aa8a082f3
                      deductionID:
                        type: string
                        example: 61cae1e03e6f8201c34c77ca
                      employeeCheckID:
                        type: string
                        example: 73a99095827d4f32bbb18adce048c081
                      deduction_type:
                        type: string
                        example: hsa
                      employer_contribution:
                        type: object
                        properties:
                          value:
                            type: integer
                            example: 3
                            default: 0
                          contribution_type:
                            type: string
                            example: dollars
                          matching:
                            type: boolean
                            example: false
                            default: true
                      employee_contribution:
                        type: object
                        properties:
                          value:
                            type: integer
                            example: 2
                            default: 0
                          contribution_type:
                            type: string
                            example: dollars
                      deductionTemplateID:
                        type: string
                        example: 61cae1e03e6f8201c34c77ca
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: false
                    errors:
                      - message: Must provide a valid companyID
                        code: 50
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                    default: true
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: Must provide a valid companyID
                        code:
                          type: integer
                          example: 50
                          default: 0
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer

````