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

# Create Deduction

> Creates a new company-wide deduction or contribution. Please use the `/providers` endpoint to view available types for each provider.

**Availability: Automated and Assisted providers**

Employer Match capabilities are currently in Beta. Please reach out if you are interested in gaining early access.

If the same request is made more than once with the same `type`, `frequency` and `description`, a new item will not be created. Finch will instead return the `benefit_id` of the existing item.

Latencies may vary depending on whether the provider is Automated or Assisted - new items will be created within minutes for Automated providers and within the 2 business day SLA for Assisted providers.


## OpenAPI

````yaml post /employer/benefits
openapi: 3.1.0
info:
  title: API Reference
  version: '2020-09-17'
  contact: {}
  description: >-
    The Finch HRIS API provides a unified way to connect to a multitide of HRIS
    systems. The API requires an access token issued by Finch.


    By default, Organization and Payroll requests use Finch's [Data
    Syncs](/developer-resources/Data-Syncs). If a request is made before the
    initial sync has completed, Finch will request data live from the provider.
    The latency on live requests may range from seconds to minutes depending on
    the provider and batch size.

    For automated integrations, Deductions requests (both read and write) are
    always made live to the provider. Latencies may range from seconds to
    minutes depending on the provider and batch size.



    Employer products are specified by the product parameter, a space-separated
    list of products that your application requests from an employer
    authenticating through Finch Connect. Valid product names are—

    - `company`: Read basic company data


    - `directory`: Read company directory and organization structure


    - `individual`: Read individual data, excluding income and employment data


    - `employment`: Read individual employment and income data


    - `payment`: Read payroll and contractor related payments by the company


    - `pay_statement`: Read detailed pay statements for each individual


    - `benefits`: Create and manage deductions and contributions and enrollment
    for an employer


    [![Open in
    Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4?action=collection%2Ffork&collection-url=entityId%3D21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4%26entityType%3Dcollection%26workspaceId%3D1edf19bc-e0a8-41e9-ac55-481a4b50790b)
servers:
  - url: https://api.tryfinch.com
    description: ''
security: []
tags:
  - name: Organization
  - name: Payroll
  - name: Deductions
  - name: Management
  - name: Sandbox
paths:
  /employer/benefits:
    post:
      tags:
        - Deductions
      summary: Create Deduction
      description: >-
        Creates a new company-wide deduction or contribution. Please use the
        `/providers` endpoint to view available types for each provider.
      operationId: create-company-benefits
      parameters:
        - name: entity_ids
          in: query
          required: false
          description: The entity IDs to specify which entities' data to access.
          schema:
            type: array
            items:
              type: string
              format: uuid
            minItems: 1
            maxItems: 1
            example:
              - 550e8400-e29b-41d4-a716-446655440000
          style: form
          explode: true
        - $ref: '#/components/parameters/API-Version'
        - $ref: '#/components/parameters/Content-Type'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  $ref: '#/components/schemas/BenefitType'
                description:
                  $ref: '#/components/schemas/BenefitDescription'
                frequency:
                  $ref: '#/components/schemas/BenefitFrequency'
                company_contribution:
                  $ref: '#/components/schemas/BenefitCompanyMatchContribution'
      responses:
        '201':
          description: Successfully Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCompanyBenefitsResponse'
              examples:
                Success:
                  value:
                    benefit_id: e8b90071-0c11-471c-86e8-e303ef2f6782
                    job_id: be1b3351-a88e-46c2-96e4-c2cf38e529a7
        '400':
          description: Malformed Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Bad Request:
                  value:
                    code: 400
                    name: invalid_request_error
                    finch_code: invalid_request
                    message: '[body:description]: Not a valid string'
        '422':
          description: Request provided with unsupported parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Invalid Benefit:
                  value:
                    code: 422
                    name: unprocessable_request_error
                    finch_code: unsupported_paramters
                    message: Provider does not support benefit type '401k'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Finch from '@tryfinch/finch-api';


            const client = new Finch({
              accessToken: 'My Access Token',
            });


            const createCompanyBenefitsResponse = await
            client.hris.benefits.create();


            console.log(createCompanyBenefitsResponse.benefit_id);
        - lang: Python
          source: |-
            from finch import Finch

            client = Finch(
                access_token="My Access Token",
            )
            create_company_benefits_response = client.hris.benefits.create()
            print(create_company_benefits_response.benefit_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/Finch-API/finch-api-go\"\n\t\"github.com/Finch-API/finch-api-go/option\"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken(\"My Access Token\"),\n\t)\n\tcreateCompanyBenefitsResponse, err := client.HRIS.Benefits.New(context.TODO(), finchgo.HRISBenefitNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", createCompanyBenefitsResponse.BenefitID)\n}\n"
        - lang: Java
          source: |-
            package com.tryfinch.api.example;

            import com.tryfinch.api.client.FinchClient;
            import com.tryfinch.api.client.okhttp.FinchOkHttpClient;
            import com.tryfinch.api.models.CreateCompanyBenefitsResponse;
            import com.tryfinch.api.models.HrisBenefitCreateParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    FinchClient client = FinchOkHttpClient.builder()
                        .fromEnv()
                        .accessToken("My Access Token")
                        .build();

                    CreateCompanyBenefitsResponse createCompanyBenefitsResponse = client.hris().benefits().create();
                }
            }
        - lang: Kotlin
          source: |-
            package com.tryfinch.api.example

            import com.tryfinch.api.client.FinchClient
            import com.tryfinch.api.client.okhttp.FinchOkHttpClient
            import com.tryfinch.api.models.CreateCompanyBenefitsResponse
            import com.tryfinch.api.models.HrisBenefitCreateParams

            fun main() {
                val client: FinchClient = FinchOkHttpClient.builder()
                    .fromEnv()
                    .accessToken("My Access Token")
                    .build()

                val createCompanyBenefitsResponse: CreateCompanyBenefitsResponse = client.hris().benefits().create()
            }
        - lang: Ruby
          source: |-
            require "finch_api"

            finch = FinchAPI::Client.new(access_token: "My Access Token")

            create_company_benefits_response = finch.hris.benefits.create

            puts(create_company_benefits_response)
components:
  parameters:
    API-Version:
      name: Finch-API-Version
      in: header
      required: true
      schema:
        type: string
        default: '2020-09-17'
        format: date
        pattern: ([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))
      description: >-
        Header used to specify the version for a given API request. Current
        version is 2020-09-17.
    Content-Type:
      name: Content-Type
      in: header
      required: true
      schema:
        type: string
        default: application/json
      description: 'Used to indicate the original media type of the resource '
  schemas:
    BenefitType:
      type: string
      nullable: true
      enum:
        - '457'
        - 401k
        - 401k_roth
        - 401k_loan
        - 403b
        - 403b_roth
        - 457_roth
        - commuter
        - custom_post_tax
        - custom_pre_tax
        - fsa_dependent_care
        - fsa_medical
        - hsa_post
        - hsa_pre
        - s125_dental
        - s125_medical
        - s125_vision
        - simple
        - simple_ira
        - null
      description: Type of benefit.
      title: BenefitType
      x-tags:
        - Models
    BenefitDescription:
      type: string
      title: BenefitDescription
      description: >-
        Name of the benefit as it appears in the provider and pay statements.
        Recommend limiting this to <30 characters due to limitations in specific
        providers (e.g. Justworks).
      x-tags:
        - Models
    BenefitFrequency:
      type: string
      nullable: true
      enum:
        - every_paycheck
        - monthly
        - one_time
        - null
      description: The frequency of the benefit deduction/contribution.
      title: BenefitFrequency
      x-tags:
        - Models
    BenefitCompanyMatchContribution:
      type: object
      nullable: true
      properties:
        type:
          type: string
          enum:
            - match
        tiers:
          type: array
          items:
            type: object
            properties:
              match:
                type: integer
                minimum: 1
                maximum: 10000
              threshold:
                type: integer
                minimum: 1
                maximum: 10000
            required:
              - match
              - threshold
          minItems: 1
          maxItems: 3
      required:
        - type
        - tiers
      description: The company match for this benefit.
      title: BenefitCompanyMatchContribution
      x-tags:
        - Models
    CreateCompanyBenefitsResponse:
      type: object
      properties:
        benefit_id:
          type: string
          format: uuid
          description: The id of the benefit.
        job_id:
          type: string
          format: uuid
      required:
        - benefit_id
        - job_id
    Error:
      title: Error
      type: object
      description: Generic error response structure
      properties:
        code:
          type: integer
          description: The status code of the request.
        name:
          type: string
          description: Identifier describing the error.
        finch_code:
          type: string
          description: A descriptive identifier for the error.
        message:
          type: string
          description: >-
            A short English description that provides more information about the
            error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Please use your Access Token

````