{"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.\n\nBy default, Organization and Payroll requests use Finch's [Data Syncs](/development-guides/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.\nFor 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.\n\n\nEmployer 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—\n- `company`: Read basic company data\n\n- `directory`: Read company directory and organization structure\n\n- `individual`: Read individual data, excluding income and employment data\n\n- `employment`: Read individual employment and income data\n\n- `payment`: Read payroll and contractor related payments by the company\n\n- `pay_statement`: Read detailed pay statements for each individual\n\n- `benefits`: Create and manage deductions and contributions and enrollment for an employer\n\n[![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":[{"bearerAuth":[]}],"tags":[{"name":"Organization"},{"name":"Payroll"},{"name":"Deductions"},{"name":"Management"},{"name":"Sandbox"}],"paths":{"/employer/company":{"get":{"description":"Read basic company data","summary":"Company","operationId":"get-company","tags":["Organization"],"parameters":[{"$ref":"#/components/parameters/API-Version"}],"responses":{"200":{"description":"Basic company data","content":{"application/json":{"examples":{"Success":{"value":{"id":"514aa2b7-898f-4ce7-bc05-c2fe993713e8","legal_name":"Acme, Inc.","entity":{"type":"corporation","subtype":"s_corporation"},"ein":"12-3456789","primary_email":"founders@acme.com","primary_phone_number":"1234567890","departments":[{"name":"Engineering","parent":null},{"name":"Platform","parent":{"name":"Engineering"}}],"locations":[{"line1":"628 Bear Ave","line2":"Apt A","city":"Schenectady","state":"NY","postal_code":"94301","country":"US"}],"accounts":[{"routing_number":"123456789","account_name":"CHECKING ACCOUNT","institution_name":"BANK OF AMERICA, N.A.","account_type":"checking","account_number":"98765432"}]}}},"schema":{"$ref":"#/components/schemas/GetCompanyResponse"}}}}}}},"/employer/directory":{"get":{"description":"Read company directory and organization structure","summary":"Directory","operationId":"get-directory","tags":["Organization"],"parameters":[{"name":"limit","in":"query","description":"Number of employees to return (defaults to all)","required":false,"schema":{"type":"integer"}},{"name":"offset","in":"query","description":"Index to start from (defaults to 0)","required":false,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/API-Version"}],"responses":{"200":{"description":"Company directory and organization structure","content":{"application/json":{"examples":{"Success":{"value":{"paging":{"count":25,"offset":10},"individuals":[{"id":"5d0b10a1-a09a-430f-81f1-20be735dc5e9","first_name":"Jane","middle_name":null,"last_name":"Doe","manager":{"id":"c205b3fa-b626-4346-bf0f-ca065ab88d31"},"department":{"name":"Product"},"is_active":true}]}}},"schema":{"$ref":"#/components/schemas/GetDirectoryResponse"}}}}}}},"/employer/individual":{"post":{"description":"Read individual data, excluding income and employment data","summary":"Individual","operationId":"get-individual","tags":["Organization"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"requestBody":{"$ref":"#/components/requestBodies/Individual"},"responses":{"200":{"description":"Individual data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIndividualsResponse"},"examples":{"Success":{"value":{"responses":[{"individual_id":"5d0b10a1-a09a-430f-81f1-20be735dc5e9","code":200,"body":{"id":"5d0b10a1-a09a-430f-81f1-20be735dc5e9","first_name":"Jane","middle_name":null,"last_name":"Doe","preferred_name":"Janey","emails":[{"data":"jane@acme.com","type":"work"},{"data":"janed@personal.com","type":"personal"}],"phone_numbers":[{"data":"5051234567","type":"personal"}],"gender":"female","ethnicity":"black_or_african_american","dob":"1970-01-01","residence":{"line1":"123 Main St","line2":"Apt C","city":"Schenectady","state":"NY","postal_code":"12345","country":"US"}}}]}}}}}}}}},"/employer/employment":{"post":{"description":"Read individual employment and income data","summary":"Employment","operationId":"get-employment","tags":["Organization"],"requestBody":{"$ref":"#/components/requestBodies/Individual-Ids"},"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"responses":{"200":{"description":"Employment data","content":{"application/json":{"examples":{"Success":{"value":{"responses":[{"individual_id":"5d0b10a1-a09a-430f-81f1-20be735dc5e9","code":200,"body":{"id":"5d0b10a1-a09a-430f-81f1-20be735dc5e9","first_name":"Jane","middle_name":null,"last_name":"Doe","title":"Customer Support","manager":{"id":"c205b3fa-b626-4346-bf0f-ca065ab88d31"},"department":{"name":"Product"},"employment":{"type":"employee","subtype":"full_time"},"start_date":"2017-06-30","end_date":null,"latest_rehire_date":null,"is_active":true,"class_code":"8810","location":{"line1":"12 Bird Drive","line2":null,"city":"Palo Alto","state":"CA","postal_code":"94301","country":"US"},"income":{"unit":"yearly","amount":10000000,"currency":"usd","effective_date":"2019-03-01"},"income_history":[{"unit":"yearly","amount":9000000,"currency":"usd","effective_date":"2018-05-15"},{"unit":"yearly","amount":8000000,"currency":"usd","effective_date":"2017-06-30"}],"custom_fields":[{"name":"tShirtSize","value":"L"}]}}]}}},"schema":{"$ref":"#/components/schemas/GetEmploymentResponse"}}}}}}},"/employer/payment":{"get":{"description":"Read payroll and contractor related payments by the company.","summary":"Payment","operationId":"get-payment","tags":["Payroll"],"parameters":[{"name":"start_date","required":true,"in":"query","description":"The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` format.","schema":{"type":"string","format":"date","example":"2021-01-01"}},{"name":"end_date","required":true,"in":"query","description":"The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` format.","schema":{"type":"string","format":"date","example":"2021-01-01"}},{"$ref":"#/components/parameters/API-Version"}],"responses":{"200":{"description":"Payment data","content":{"application/json":{"examples":{"Success":{"value":[{"id":"20aa7cf2-949d-4d4e-9c01-499b59501ded","pay_period":{"start_date":"2019-08-01","end_date":"2019-08-15"},"pay_date":"2019-08-22","debit_date":"2019-08-22","company_debit":{"amount":5300000,"currency":"usd"},"gross_pay":{"amount":4000000,"currency":"usd"},"net_pay":{"amount":3200000,"currency":"usd"},"employer_taxes":{"amount":200000,"currency":"usd"},"employee_taxes":{"amount":350000,"currency":"usd"},"individual_ids":["54719e14-5ea7-4fda-9898-f4d9ccb83c1a","0ab620fc-203e-44ad-916c-facc69250f6f"]}]}},"schema":{"$ref":"#/components/schemas/GetPaymentsResponse"}}}}}}},"/employer/pay-statement":{"post":{"summary":"Pay Statement","operationId":"get-pay-statement","description":"Read detailed pay statements for each individual.\n\nDeduction and contribution types are supported by the payroll systems that supports Benefits.","tags":["Payroll"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","description":"The array of batch requests.","items":{"type":"object","properties":{"payment_id":{"type":"string","description":"A stable Finch `id` (UUID v4) for a payment.","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"},"limit":{"type":"integer","description":"Number of pay statements to return (defaults to all)."},"offset":{"type":"integer","description":"Index to start from."}},"required":["payment_id"]}}},"required":["requests"]},"examples":{"example-1":{"value":{"requests":[{"payment_id":"string"}]}}}}}},"responses":{"200":{"description":"Pay statement data","content":{"application/json":{"examples":{"Success":{"value":{"responses":[{"payment_id":"fc8b024e-d373-4c9c-80fc-f1625383d142","code":200,"body":{"paging":{"count":25,"offset":10},"pay_statements":[{"individual_id":"be7b048c-a6f3-4194-a017-2f537d4f3565","type":"regular","payment_method":"check","total_hours":42.5,"gross_pay":{"amount":230000,"currency":"usd"},"net_pay":{"amount":180000,"currency":"usd"},"earnings":[{"type":"salary","name":"Salary","amount":230000,"currency":"usd","hours":42.5}],"taxes":[{"type":"state","name":"State Withholding - OR","employer":false,"amount":0,"currency":"usd"}],"employee_deductions":[{"name":"Pre-Tax 401k","amount":50000,"currency":"usd","pre_tax":true,"type":"401k"}],"employer_contributions":[{"name":"Employee Medical Insurance","amount":23272,"currency":"usd"}]}]}}]}}},"schema":{"$ref":"#/components/schemas/GetPayStatementsResponse"}}}}}}},"/employer/pay-groups":{"parameters":[{"schema":{"type":"string","format":"uuid"},"name":"individual_id","in":"query","required":false},{"schema":{"type":"array","items":{"type":"string"}},"name":"pay_frequencies","in":"query","required":false}],"get":{"description":"Read company pay groups and frequencies","summary":"Get All Pay Groups","operationId":"get-all-pay-groups","tags":["Payroll"],"parameters":[{"$ref":"#/components/parameters/API-Version"}],"responses":{"200":{"description":"Company pay groups","content":{"application/json":{"examples":{"Success":{"value":{"responses":[{"id":"5d0b10a1-a09a-430f-81f1-20be735dc5e9","name":"Monthly","pay_frequencies":["monthly"]},{"id":"9349eed4-4064-4641-ba8e-9e1ad7e1d014","name":"Weekly","pay_frequencies":["weekly"]}]}}},"schema":{"$ref":"#/components/schemas/GetAllPayGroupsResponse"}}}}}}},"/employer/pay-groups/{pay_group_id}":{"parameters":[{"schema":{"type":"string"},"name":"pay_group_id","in":"path","required":true}],"get":{"description":"Read information from a single pay group","summary":"Get Pay Group","operationId":"get-pay-group","tags":["Payroll"],"parameters":[{"$ref":"#/components/parameters/API-Version"}],"responses":{"200":{"description":"Pay group data","content":{"application/json":{"examples":{"Success":{"value":{"id":"5d0b10a1-a09a-430f-81f1-20be735dc5e9","name":"Monthly","pay_frequencies":["monthly"],"individual_ids":["be7b048c-a6f3-4194-a017-2f537d4f3565"]}}},"schema":{"$ref":"#/components/schemas/GetPayGroupResponse"}}}}}}},"/employer/benefits":{"get":{"summary":"Get All Deductions","description":"List all company-wide deductions and contributions.","operationId":"get-company-benefits","tags":["Deductions"],"parameters":[{"$ref":"#/components/parameters/API-Version"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCompanyBenefitsResponse"},"examples":{"Success":{"value":[{"benefit_id":"e8b90071-0c11-471c-86e8-e303ef2f6782","type":"401k","description":"Example 401k","frequency":"every_paycheck"}]}}}}}}},"post":{"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":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"tags":["Deductions"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/BenefitType"},"description":{"$ref":"#/components/schemas/BenefitDescription"},"frequency":{"$ref":"#/components/schemas/BenefitFrequency"}}}}}},"responses":{"201":{"description":"Successfully Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyBenefitsResponse"},"examples":{"Success":{"value":{"benefit_id":"e8b90071-0c11-471c-86e8-e303ef2f6782"}}}}}},"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'"}}}}}}}}},"/employer/benefits/register":{"post":{"summary":"Register Deduction","operationId":"register-company-benefits","description":"Register existing benefits from the customer on the provider, on Finch's end. Please use the `/provider` endpoint to view available types for each provider.","tags":["Deductions"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/BenefitType"},"description":{"type":"string"},"frequency":{"$ref":"#/components/schemas/BenefitFrequency"}}}}}},"responses":{"201":{"description":"Successfully Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterCompanyBenefitsResponse"},"examples":{"Success":{"value":{"benefit_id":"e8b90071-0c11-471c-86e8-e303ef2f6782","job_id":"e8b90071-0c11-471c-86e8-e303ef2f6782"}}}}}},"400":{"description":"Requested adapter is not assisted benefits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Invalid Adapter":{"value":{"code":400,"name":"invalid_request_error","message":"This adapter does not support assisted benefits."}}}}}},"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'"}}}}}}}}},"/employer/benefits/meta":{"get":{"summary":"[Deprecated] Get Deductions Metadata","operationId":"get-company-benefits-meta","description":"Get deductions metadata","parameters":[{"$ref":"#/components/parameters/API-Version"}],"tags":["Deductions"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCompanyBenefitsMetadataResponse"},"examples":{"Metadata Example":{"value":[{"type":"401k","description":"401(k)","employee_deduction":["fixed","percent"],"company_contribution":["fixed","percent"],"annual_maximum":true,"catch_up":true,"frequencies":["every_paycheck"]}]}}}}}}}},"/employer/benefits/{benefit_id}":{"parameters":[{"schema":{"type":"string"},"name":"benefit_id","in":"path","required":true}],"get":{"summary":"Get Deduction","operationId":"get-company-benefit","description":"Lists deductions and contributions information for a given item","parameters":[{"$ref":"#/components/parameters/API-Version"}],"tags":["Deductions"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBenefit"},"examples":{"Example Benefit":{"value":{"benefit_id":"6547e3aa-d887-4a77-bd41-17221e17cce3","type":"401k","description":"Example 401k","frequency":"every_paycheck"}}}}}},"404":{"description":"Benefit Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Not Found":{"value":{"code":404,"name":"not_found_error","finch_code":"benefit_not_found","message":"Benefit not found"}}}}}}}},"post":{"summary":"Update Deduction","operationId":"update-company-benefits","description":"Updates an existing company-wide deduction or contribution","tags":["Deductions"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Updated name or description."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCompanyBenefitResponse"},"examples":{"Success":{"value":{"benefit_id":"6547e3aa-d887-4a77-bd41-17221e17cce3"}}}}}},"400":{"description":"Bad Request"},"404":{"description":"Benefit Not Found"}}}},"/employer/benefits/{benefit_id}/enrolled":{"parameters":[{"schema":{"type":"string"},"name":"benefit_id","in":"path","required":true}],"get":{"summary":"Get Enrolled Individuals","operationId":"get-company-benefits-enrolled","description":"Lists individuals currently enrolled in a given deduction.","parameters":[{"$ref":"#/components/parameters/API-Version"}],"tags":["Deductions"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCompanyBenefitEnrolledIndividualsResponse"},"examples":{"Success":{"value":{"benefit_id":"6547e3aa-d887-4a77-bd41-17221e17cce3","individual_ids":["7fc9fb3a-2a62-47c1-9a5a-c9146483b58e"]}}}}}},"404":{"description":"Benefit Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Not Found":{"value":{"code":404,"name":"not_found_error","finch_code":"benefit_not_found","message":"Benefit not found"}}}}}}}}},"/employer/benefits/{benefit_id}/individuals":{"parameters":[{"schema":{"type":"string"},"name":"benefit_id","in":"path","required":true}],"get":{"summary":"Get Deductions for Individuals","operationId":"get-individual-benefits","description":"Get enrollment information for the given individuals.","tags":["Deductions"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"},{"schema":{"type":"string","example":"d675d2b7-6d7b-41a8-b2d3-001eb3fb88f6,d02a6346-1f08-4312-a064-49ff3cafaa7a"},"in":"query","name":"individual_ids","description":"comma-delimited list of stable Finch uuids for each individual. If empty, defaults to all individuals"}],"responses":{"207":{"description":"Multi-Status (WebDAV)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualBenefits"},"examples":{"Multi-status":{"value":[{"individual_id":"d02a6346-1f08-4312-a064-49ff3cafaa7a","code":200,"body":{"employee_deduction":{"type":"fixed","amount":100},"company_contribution":{"type":"fixed","amount":100},"annual_maximum":1000,"catch_up":false}},{"individual_id":"e63c21ab-7cde-49d8-b6d6-ce208e84bf09","code":404,"body":{"name":"not_found_error","finch_code":"individual_not_found","message":"Individual not found"}}]}}}}},"404":{"description":"Benefit Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Not Found":{"value":{"code":404,"name":"not_found_error","finch_code":"benefit_not_found","message":"Benefit not found"}}}}}}}},"post":{"summary":"Enroll Individuals in Deductions","operationId":"post-employer-individual-benefits-benefit_id","description":"Enroll an individual into a deduction or contribution. This is an overwrite operation. If the employee is already enrolled, the enrollment amounts will be adjusted. Making the same request multiple times will not create new enrollments, but will continue to set the state of the existing enrollment.","tags":["Deductions"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"individual_id":{"type":"string","description":"Finch id (uuidv4) for the individual to enroll"},"configuration":{"type":"object"}}}},"examples":{"Retirement":{"value":[{"individual_id":"d02a6346-1f08-4312-a064-49ff3cafaa7a","configuration":{"employee_deduction":{"type":"percent","amount":1000},"company_contribution":{"type":"percent","amount":400},"catch_up":false,"annual_maximum":500000}}]},"HSA":{"value":[{"individual_id":"d02a6346-1f08-4312-a064-49ff3cafaa7a","configuration":{"employee_deduction":{"type":"fixed","amount":10000},"company_contribution":{"type":"fixed","amount":0},"annual_maximum":null,"annual_contribution_limit":"individual"}}]},"Custom":{"value":[{"individual_id":"string","configuration":{"employee_deduction":{"type":"fixed","amount":10000},"company_contribution":{"type":"fixed","amount":0}}}]}}}}},"responses":{"200":{"description":"Success for all individuals. Enrolled new individuals in the benefit and upserted information for individuals already enrolled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollIndividualBenefitResponse"},"examples":{"Success":{"value":[{"individual_id":"d02a6346-1f08-4312-a064-49ff3cafaa7a","code":201,"body":{"name":"created","finch_code":"enrolled_new_benefit","message":"Successfully enrolled new benefit for individual"}},{"individual_id":"e63c21ab-7cde-49d8-b6d6-ce208e84bf09","code":200,"body":{"name":"success","finch_code":"updated_existing_enrollment","message":"Benefit information updated for individual"}}]}}}}},"207":{"description":"Multi-Status. Some individuals may not have succeeded. See body for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollIndividualBenefitResponse"},"examples":{"Multi Status":{"value":[{"individual_id":"d02a6346-1f08-4312-a064-49ff3cafaa7a","code":201,"body":{"name":"created","finch_code":"enrolled_new_benefit","message":"Successfully enrolled new benefit for individual"}},{"individual_id":"e63c21ab-7cde-49d8-b6d6-ce208e84bf09","code":200,"body":{"name":"success","finch_code":"updated_existing_enrollment","message":"Benefit information updated for individual"}},{"individual_id":"0c89294b-b7f1-4999-9b7a-bb8a87326717","code":404,"body":{"name":"not_found_error","finch_code":"individual_not_found","message":"Individual not found"}},{"individual_id":"fb292e27-bd07-4dbc-88c4-05923b33bbc2","code":403,"body":{"finch_code":"access_denied","message":"Permissions not valid for individual"}}]}}}}},"400":{"description":"Malformed Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Benefit Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Not Found":{"value":{"code":404,"name":"not_found_error","finch_code":"benefit_not_found","message":"Benefit not found"}}}}}},"422":{"description":"Unprocessable Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Cannot Enroll":{"value":{"code":422,"name":"unprocessable_request_error","finch_code":"unprocessable_parameters","message":"HSA enrollment are not currently available for this provider"}}}}}}}},"delete":{"summary":"Unenroll Individuals from Deductions","operationId":"delete-individual-benefits","description":"Unenroll individuals from a deduction or contribution","tags":["Deductions"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"","properties":{"individual_ids":{"type":"array","description":"Array of individual_ids to unenroll.","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Success for all individuals. Unenrolled all individuals from the benefit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnenrollIndividualBenefitResponse"},"examples":{"Success":{"value":[{"individual_id":"7fc9fb3a-2a62-47c1-9a5a-c9146483b58e","code":200,"body":{"name":"success","finch_code":"unenrolled_individual_benefit","message":"Unenrolled individual from benefit"}},{"individual_id":"e63c21ab-7cde-49d8-b6d6-ce208e84bf09","code":200,"body":{"name":"success","finch_code":"unenrolled_individual_benefit","message":"Unenrolled individual from benefit"}}]}}}}},"207":{"description":"Multi-Status. Some individuals may not have succeeded. See body for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnenrollIndividualBenefitResponse"},"examples":{"Multi Status":{"value":[{"individual_id":"7fc9fb3a-2a62-47c1-9a5a-c9146483b58e","code":200,"body":{"name":"success","finch_code":"unenrolled_individual_benefit","message":"Unenrolled individual from benefit"}},{"individual_id":"e63c21ab-7cde-49d8-b6d6-ce208e84bf09","code":404,"body":{"name":"not_found_error","finch_code":"individual_not_found","message":"Individual not found"}}]}}}}},"404":{"description":"Benefit Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"Not Found":{"value":{"code":404,"name":"not_found_error","finch_code":"benefit_not_found","message":"Benefit not found"}}}}}}}}},"/auth/token":{"post":{"description":"Exchange the authorization code for an access token","summary":"Create Access Token","tags":["Management"],"security":[],"operationId":"create-access-token","parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["client_id","client_secret","code"],"properties":{"client_id":{"type":"string","format":"uuid","example":"6d28c315-5eaa-4071-8ea5-f030eb45edbc"},"client_secret":{"type":"string","example":""},"code":{"type":"string","example":""},"redirect_uri":{"type":"string","example":"https://example.com"}}}}}},"responses":{"200":{"description":"Access Token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccessTokenResponse"},"examples":{"Success":{"value":{"access_token":"7e965183-9332-423c-9259-3edafb332ad2","account_id":"ac3a2af9-ce03-46c4-9142-81abe789c64d","client_type":"production","company_id":"4ab15e51-11ad-49f4-acae-f343b7794375","connection_type":"provider","products":["directory","employment","individual"],"provider_id":"gusto"}}}}}}}}},"/providers":{"get":{"summary":"Providers","operationId":"get-providers","description":"Return details on all available payroll and HR systems.","security":[],"parameters":[{"$ref":"#/components/parameters/API-Version"}],"tags":["Management"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProvidersResponse"},"examples":{"Success":{"value":[{"id":"gusto","display_name":"Gusto","products":["company","directory"],"icon":"https://finch-assets.s3.us-west-2.amazonaws.com/provider-logos/gustoIcon.png","logo":"https://finch-assets.s3.us-west-2.amazonaws.com/provider-logos/gustoLogo.png","mfa_required":true,"primary_color":"#f45d47","authentication_methods":[{"type":"api","benefits_support":{"457":null,"401k":{"supported_features":{"company_contribution":null,"employee_deduction":["fixed","percent"],"frequencies":["one_time","every_paycheck"],"annual_maximum":false,"catch_up":false,"description":"401(k)"},"supported_operations":{"company_benefits":{"read":"not_supported_by_finch","create":"supported","update":"supported","delete":"not_supported_by_finch"},"individual_benefits":{"read":"not_supported_by_finch","create":"supported","delete":"supported","update":"supported"}}},"401k_roth":null,"401k_loan":null,"403b":null,"403b_roth":null,"457_roth":null,"s125_medical":null,"s125_dental":null,"s125_vision":null,"hsa_pre":null,"hsa_post":null,"fsa_medical":null,"fsa_dependent_care":null,"simple_ira":null,"simple":null,"commuter":null,"custom_post_tax":null,"custom_pre_tax":null},"supported_fields":{"company":{"id":true,"legal_name":true,"entity":{"type":true,"subtype":false},"primary_email":true,"primary_phone_number":true,"ein":true,"accounts":{"routing_number":true,"account_name":true,"institution_name":true,"account_type":true,"account_number":true},"departments":{"name":true,"parent":{"name":true}},"locations":{"line1":true,"line2":true,"city":true,"state":true,"postal_code":true,"country":true}},"directory":{"paging":{"count":true,"offset":true},"individuals":{"id":true,"first_name":true,"middle_name":true,"last_name":true,"is_active":true,"department":null,"manager":{"id":true}}},"individual":{"id":true,"first_name":true,"middle_name":true,"last_name":true,"preferred_name":true,"dob":true,"gender":false,"ethnicity":false,"ssn":true,"encrypted_ssn":true,"emails":{"data":true,"type":true},"phone_numbers":{"data":true,"type":true},"residence":{"city":true,"country":true,"line1":true,"line2":true,"postal_code":true,"state":true}},"employment":{"id":true,"first_name":true,"middle_name":true,"last_name":true,"title":true,"start_date":true,"end_date":true,"is_active":true,"income_history":false,"class_code":true,"custom_fields":false,"department":{"name":true},"employment":{"type":true,"subtype":true},"income":{"amount":true,"currency":true,"unit":true},"location":{"line1":true,"line2":true,"city":true,"state":true,"postal_code":true,"country":true},"manager":null},"payment":{"id":true,"pay_date":true,"debit_date":false,"company_debit":true,"gross_pay":true,"net_pay":true,"employer_taxes":true,"employee_taxes":true,"individual_ids":true,"pay_period":{"start_date":false,"end_date":false}},"pay_statement":{"paging":{"count":true,"offset":true},"pay_statements":{"individual_id":true,"type":true,"payment_method":true,"total_hours":true,"gross_pay":true,"net_pay":true,"earnings":{"type":true,"name":true,"amount":true,"currency":true},"employee_deductions":{"name":true,"amount":true,"type":true,"pre_tax":true,"currency":true},"employer_contributions":{"name":true,"amount":true,"currency":true},"employer_deductions":{"name":true,"amount":true,"currency":true},"taxes":{"type":true,"name":true,"employer":true,"amount":true,"currency":true}}}}}]}]}}}}}}}},"/introspect":{"get":{"summary":"Introspect","tags":["Management"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntrospectResponse"},"examples":{"Success":{"value":{"client_id":"25ea8bd8-f76b-41f9-96e3-1e6162021c50","client_type":"production","connection_type":"provider","company_id":"87eb4bc3-f76b-35e7-78d2-8f7822021d73","account_id":"ca23fd65-5a0c-4f8b-a0fa-7853fd6f5768","products":["company","directory"],"username":"johndoe@tryfinch.com","payroll_provider_id":"gusto","manual":false,"authentication_methods":[{"type":"assisted","connection_status":{"status":"pending","message":"This employer has created a token, and we are waiting for access to its provider"}},{"type":"credential","connection_status":{"status":"connected","message":"This employer is working as expected"}}]}}}}}}},"operationId":"get-introspect","description":"Read account information associated with an `access_token`","parameters":[{"$ref":"#/components/parameters/API-Version"}]}},"/disconnect":{"post":{"summary":"Disconnect","operationId":"post-disconnect","description":"Disconnect one or more `access_token`s from your application.","tags":["Management"],"parameters":[{"$ref":"#/components/parameters/API-Version"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectResponse"},"examples":{"Success":{"value":{"status":"success"}}}}}}}}},"/forward":{"post":{"summary":"Request Forwarding","operationId":"post-forward","description":"The Forward API allows you to make direct requests to an employment system. If Finch’s unified API\ndoesn’t have a data model that cleanly fits your needs, then Forward allows you to push or pull\ndata models directly against an integration’s API.","tags":["Management"],"parameters":[{"$ref":"#/components/parameters/API-Version"}],"requestBody":{"$ref":"#/components/requestBodies/Forward"},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"headers":{"type":"object","description":"The HTTP headers of the forwarded request’s response, exactly as received from the underlying integration’s API.","nullable":true},"statusCode":{"type":"integer","description":"The HTTP status code of the forwarded request’s response, exactly received from the underlying integration’s API. This value will be returned as an integer."},"data":{"type":"string","description":"A string representation of the HTTP response body of the forwarded request’s response received from the underlying integration’s API. This field may be null in the case where the upstream system’s response is empty.","nullable":true},"request":{"type":"object","description":"An object containing details of your original forwarded request, for your ease of reference.","properties":{"method":{"type":"string","description":"The HTTP method that was specified for the forwarded request. Valid values include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`."},"route":{"type":"string","description":"The URL route path that was specified for the forwarded request."},"headers":{"type":"object","description":"The specified HTTP headers that were included in the forwarded request. If no headers were specified, this will be returned as `null`.","nullable":true},"params":{"type":"object","description":"The query parameters that were included in the forwarded request. If no query parameters were specified, this will be returned as `null`.","nullable":true},"data":{"type":"string","description":"The body that was specified for the forwarded request. If a value was not specified in the original request, this value will be returned as null ; otherwise, this value will always be returned as a string.","nullable":true}},"required":["method","route","headers","params","data"]}},"required":["headers","statusCode","data","request"]},"examples":{"Success":{"value":{"request":{"method":"POST","route":"/people/search","headers":{"content-type":"application/json"},"params":{"showInactive":true,"humanReadable":true},"data":null},"headers":{"date":"Sun, 17 Sep 2023 21:27:25 GMT","content-type":"application/json"},"statusCode":200,"data":"{\"employees\":[{\"/work/custom/field_1693264321143\":{\"value\":580192},\"fullName\":\"Anna Gibbons\",\"/payroll/employment/siteWorkingPattern\":{\"value\":{\"workingPatternType\":\"partial_week\",\"days\":{\"sunday\":false,\"tuesday\":true,\"wednesday\":true,\"monday\":true,\"friday\":true,\"thursday\":true,\"saturday\":false},\"hoursPerDay\":9,\"workingPatternId\":null}},\"/about/avatar\":{\"value\":\"https://media-process.hibob.com/image/upload/v1/hibob/demo-avatar/demo_employee/images/UiRYuQQyDc4sLbYzFFtN_59.jpg?__cld_token__=exp=4795680381~acl=*%2fhibob%2fdemo-avatar%2fdemo_employee%2fimages%2fUiRYuQQyDc4sLbYzFFtN_59.jpg*~hmac=07e5aff698027029ebbb4d8cb067db044ec46a86f9bf71430c53cc590f9c07a6\"},\"displayName\":\"Anna Gibbons\",\"/work/reportsTo/email\":{\"value\":\"joshua.tyler_632127@samplebob.com\"},\"/payroll/employment/activeEffectiveDate\":{\"value\":\"2015-03-03\"},\"payroll\":{\"employment\":{\"standardWorkingPattern\":null,\"fte\":100,\"type\":null,\"flsaCode\":null,\"actualWorkingPattern\":{\"workingPatternType\":\"partial_week\",\"days\":{\"sunday\":false,\"tuesday\":true,\"wednesday\":true,\"monday\":true,\"friday\":true,\"thursday\":true,\"saturday\":false},\"hoursPerDay\":9,\"workingPatternId\":null},\"contract\":\"Full time\",\"customColumns\":{\"column_1693433488092\":null,\"column_1693419526345\":null},\"calendarId\":null,\"salaryPayType\":null,\"workingPattern\":null,\"activeEffectiveDate\":\"2015-03-03\",\"weeklyHours\":45,\"siteWorkingPattern\":{\"workingPatternType\":\"partial_week\",\"days\":{\"sunday\":false,\"tuesday\":true,\"wednesday\":true,\"monday\":true,\"friday\":true,\"thursday\":true,\"saturday\":false},\"hoursPerDay\":9,\"workingPatternId\":null}}},\"/root/firstName\":{\"value\":\"Anna\"},\"/work/employeeIdInCompany\":{\"value\":38},\"/work/tenureDurationYears\":{\"value\":8.545},\"/about/foodPreferences\":{\"value\":[]},\"/work/site\":{\"value\":\"New York (Demo)\"},\"/work/tenureYears\":{\"value\":9},\"creationDateTime\":\"2023-07-13T06:37:04.94395\",\"/about/hobbies\":{\"value\":[\"theatre\",\"film\",\"music\"]},\"/root/email\":{\"value\":\"anna.gibbons_632127@samplebob.com\"},\"/work/title\":{\"value\":\"Sales Manager\"},\"employee\":{\"payrollManager\":null,\"hrbp\":null,\"itAdmin\":null,\"buddy\":null},\"work\":{\"shortStartDate\":\"03-03\",\"startDate\":\"2015-03-03\",\"manager\":\"3145813558047015811\",\"tenureDuration\":{\"periodISO\":\"P8Y6M16D\",\"sortFactor\":3076,\"humanize\":\"8 years, 6 months and 16 days\"},\"custom\":{\"field_1693264337015\":580192,\"field_1693264321143\":580192},\"durationOfEmployment\":{\"periodISO\":\"P8Y6M16D\",\"sortFactor\":3076,\"humanize\":\"8 years, 6 months and 16 days\"},\"reportsToIdInCompany\":27,\"employeeIdInCompany\":38,\"reportsTo\":{\"displayName\":\"Joshua Tyler\",\"email\":\"joshua.tyler_632127@samplebob.com\",\"surname\":\"Tyler\",\"firstName\":\"Joshua\",\"id\":\"3145813558047015811\"},\"indirectReports\":null,\"siteId\":2477371,\"tenureDurationYears\":8.545,\"department\":\"Sales\",\"tenureYears\":9,\"isManager\":false,\"title\":\"Sales Manager\",\"site\":\"New York (Demo)\",\"activeEffectiveDate\":\"2015-03-03\",\"directReports\":null,\"secondLevelManager\":\"3145813528661721978\",\"daysOfPreviousService\":0,\"yearsOfService\":8.545},\"/payroll/employment/weeklyHours\":{\"value\":45},\"/root/creationDateTime\":{\"value\":\"2023-07-13T06:37:04.94395\"},\"avatarUrl\":\"https://media-process.hibob.com/image/upload/v1/hibob/demo-avatar/demo_employee/images/UiRYuQQyDc4sLbYzFFtN_59.jpg?__cld_token__=exp=4795680381~acl=*%2fhibob%2fdemo-avatar%2fdemo_employee%2fimages%2fUiRYuQQyDc4sLbYzFFtN_59.jpg*~hmac=07e5aff698027029ebbb4d8cb067db044ec46a86f9bf71430c53cc590f9c07a6\",\"secondName\":null,\"/work/startDate\":{\"value\":\"2015-03-03\"},\"about\":{\"foodPreferences\":[],\"socialData\":{\"linkedin\":null,\"twitter\":null,\"facebook\":null},\"superpowers\":[\"proof reading\"],\"hobbies\":[\"theatre\",\"film\",\"music\"],\"about\":\"I dont have a life story, my story is my life \",\"avatar\":\"https://media-process.hibob.com/image/upload/v1/hibob/demo-avatar/demo_employee/images/UiRYuQQyDc4sLbYzFFtN_59.jpg?__cld_token__=exp=4795680381~acl=*%2fhibob%2fdemo-avatar%2fdemo_employee%2fimages%2fUiRYuQQyDc4sLbYzFFtN_59.jpg*~hmac=07e5aff698027029ebbb4d8cb067db044ec46a86f9bf71430c53cc590f9c07a6\"},\"/root/fullName\":{\"value\":\"Anna Gibbons\"},\"/payroll/employment/contract\":{\"value\":\"Full time\"},\"/payroll/employment/actualWorkingPattern\":{\"value\":{\"workingPatternType\":\"partial_week\",\"days\":{\"sunday\":false,\"tuesday\":true,\"wednesday\":true,\"monday\":true,\"friday\":true,\"thursday\":true,\"saturday\":false},\"hoursPerDay\":9,\"workingPatternId\":null}},\"companyId\":632127,\"/root/coverImageUrl\":{\"value\":\"https://media-process.hibob.com/image/upload/v1/hibob/public-image/cover/default_cover_image.png?token=X19jbGRfdG9rZW5fXz1leHA9NDg0OTgzNjczOX5hY2w9KiUyZmhpYm9iJTJmcHVibGljLWltYWdlJTJmY292ZXIlMmZkZWZhdWx0X2NvdmVyX2ltYWdlLnBuZyp+aG1hYz0zMjY3NjE4ZDQ1MzZjZjE3MWFiM2Y2MzJlY2JmZmQ5MWZkYTRmY2FmOGY3MDExYjllNmZlZTI4Njc0MzZlN2M5&vendor=cloudinary\"},\"/work/secondLevelManager\":{\"value\":\"3145813528661721978\"},\"/work/yearsOfService\":{\"value\":8.545},\"/work/daysOfPreviousService\":{\"value\":0},\"/about/about\":{\"value\":\"I dont have a life story, my story is my life \"},\"/root/avatarUrl\":{\"value\":\"https://media-process.hibob.com/image/upload/v1/hibob/demo-avatar/demo_employee/images/UiRYuQQyDc4sLbYzFFtN_59.jpg?__cld_token__=exp=4795680381~acl=*%2fhibob%2fdemo-avatar%2fdemo_employee%2fimages%2fUiRYuQQyDc4sLbYzFFtN_59.jpg*~hmac=07e5aff698027029ebbb4d8cb067db044ec46a86f9bf71430c53cc590f9c07a6\"},\"/root/surname\":{\"value\":\"Gibbons\"},\"/work/shortStartDate\":{\"value\":\"03-03\"},\"/work/activeEffectiveDate\":{\"value\":\"2015-03-03\"},\"/root/id\":{\"value\":\"3145813590838084494\"},\"email\":\"anna.gibbons_632127@samplebob.com\",\"/work/manager\":{\"value\":\"3145813558047015811\"},\"surname\":\"Gibbons\",\"/work/reportsTo\":{\"value\":{\"displayName\":\"Joshua Tyler\",\"email\":\"joshua.tyler_632127@samplebob.com\",\"surname\":\"Tyler\",\"firstName\":\"Joshua\",\"id\":\"3145813558047015811\"}},\"/root/displayName\":{\"value\":\"Anna Gibbons\"},\"/root/companyId\":{\"value\":632127},\"/payroll/employment/fte\":{\"value\":100},\"/work/department\":{\"value\":\"Sales\"},\"/work/isManager\":{\"value\":false},\"/work/custom/field_1693264337015\":{\"value\":580192},\"/work/reportsToIdInCompany\":{\"value\":27},\"/work/tenureDuration\":{\"value\":{\"periodISO\":\"P8Y6M16D\",\"sortFactor\":3076,\"humanize\":\"8 years, 6 months and 16 days\"}},\"coverImageUrl\":\"https://media-process.hibob.com/image/upload/v1/hibob/public-image/cover/default_cover_image.png?token=X19jbGRfdG9rZW5fXz1leHA9NDg0OTgzNjczOX5hY2w9KiUyZmhpYm9iJTJmcHVibGljLWltYWdlJTJmY292ZXIlMmZkZWZhdWx0X2NvdmVyX2ltYWdlLnBuZyp+aG1hYz0zMjY3NjE4ZDQ1MzZjZjE3MWFiM2Y2MzJlY2JmZmQ5MWZkYTRmY2FmOGY3MDExYjllNmZlZTI4Njc0MzZlN2M5&vendor=cloudinary\",\"/about/superpowers\":{\"value\":[\"proof reading\"]},\"/work/siteId\":{\"value\":2477371},\"id\":\"3145813590838084494\",\"firstName\":\"Anna\",\"/work/durationOfEmployment\":{\"value\":{\"periodISO\":\"P8Y6M16D\",\"sortFactor\":3076,\"humanize\":\"8 years, 6 months and 16 days\"}}}]}"}}}}}}}}},"/jobs/automated":{"get":{"summary":"List All Automated Jobs","operationId":"get-jobs-automated","description":"Get all automated jobs. Automated jobs are completed by a machine. By default, jobs are sorted in descending order by submission time. For scheduled jobs such as data syncs, only the next scheduled job is shown.","tags":["Management"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"The number of items to return. Defaults to 100."},"offset":{"type":"integer","description":"Where in the list of jobs to start returning from. Defaults to index 0."}}}}},"description":""},"responses":{"200":{"description":"Job was found","content":{"application/json":{"schema":{"type":"object","properties":{"":{"$ref":"#/components/schemas/Paging"},"meta":{"type":"object","properties":{"quotas":{"type":"object","description":"Information about remaining quotas for this connection. Only applicable for customers opted in to use Finch's Data Sync Refresh endpoint (`POST /jobs/automated`). Please contact a Finch representative for more details.","properties":{"data_sync_all":{"type":"object","properties":{"allowed_refreshes":{"type":"integer"},"remaining_refreshes":{"type":"integer"}}}}}}},"data":{"type":"array","items":{"$ref":"#/components/schemas/AutomatedAsyncJob"}}}},"examples":{"Example 1":{"value":{"":{"count":10,"offset":0},"meta":{"quotas":{"data_sync_all":{"allowed_refreshes":2,"remaining_refreshes":2}}},"data":[{"job_id":"453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","job_url":"https://api.tryfinch.com/job/automated/453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","type":"data_sync_all","status":"pending","created_at":"2019-08-24T14:15:22Z","scheduled_at":"2019-08-24T14:15:22Z","started_at":"2019-08-24T14:15:22Z","completed_at":"2019-08-24T14:15:22Z"}]}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer"},"status":{"type":"integer"},"code":{"type":"integer"},"name":{"type":"string"},"message":{"type":"string"}}},"examples":{"Example 1":{"value":{"statusCode":401,"status":401,"code":401,"message":"Unauthorized request: no authentication given","name":"unauthorized_request_error"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer"},"status":{"type":"integer"},"code":{"type":"integer"},"name":{"type":"string"},"message":{"type":"string"}}},"examples":{"Example 1":{"value":{"statusCode":404,"status":404,"code":404,"message":"could not find job with id job-fb3b25dc-02dc-48eb-9cfc-3f9837276884","name":"not_found_error"}}}}}}}},"post":{"summary":"Enqueue a New Automated Job","operationId":"post-jobs-automated","description":"Enqueue an automated job. Currently, only the `data_sync_all` job type is supported, which will enqueue a job to re-sync all data for a connection. `data_sync_all` has a concurrency limit of 1 job at a time per connection. This means that if this endpoint is called while a job is already in progress for this connection, Finch will return the `job_id` of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced refresh per hour per connection.\n\nThis endpoint is available for *Scale* tier customers as an add-on. To request access to this endpoint, please contact your Finch account manager.","parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"tags":["Management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"The type of job to start. Currently the only supported type is `data_sync_all`","enum":["data_sync_all"]}},"required":["type"]}},"application/xml":{"schema":{"type":"object","properties":{}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"The id of the job that has been created."},"job_url":{"type":"string","description":"The url that can be used to retrieve the job status"},"allowed_refreshes":{"type":"integer","description":"The number of allowed refreshes per hour (per hour, fixed window)"},"remaining_refreshes":{"type":"integer","description":"The number of remaining refreshes available (per hour, fixed window)"}}},"examples":{"Example 1":{"value":{"job_id":"453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","job_url":"https://api.tryfinch.com/jobs/automated/453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","allowed_refreshes":2,"remaining_refreshes":1}}}},"application/xml":{"schema":{"type":"object","properties":{}}}}},"202":{"description":"Accepted. This response will be returned if a job is already enqueued for the connection. This case does not consume any job quota as it just returns the details of an existing job.","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"The id of the job that has been created."},"job_url":{"type":"string","description":"The url that can be used to retrieve the job status"},"allowed_refreshes":{"type":"integer","description":"The number of allowed refreshes per hour (per hour, fixed window)"},"remaining_refreshes":{"type":"integer","description":"The number of remaining refreshes available (per hour, fixed window)"}}},"examples":{"Example 1":{"value":{"job_Id":"de9113d6-e2fa-4c72-ba4a-ee1d8a4f8df6","allowed_refreshes":2,"remaining_refreshes":2}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer"},"status":{"type":"integer"},"code":{"type":"integer"},"message":{"type":"string"},"name":{"type":"string"}}},"examples":{"Example 1":{"value":{"statusCode":400,"status":400,"code":400,"message":"cannot create automated job for Assisted Connect token","name":"bad_request"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer"},"status":{"type":"integer"},"code":{"type":"integer"},"name":{"type":"string"},"message":{"type":"string"}}},"examples":{"Example 1":{"value":{"statusCode":401,"status":401,"code":401,"message":"Unauthorized request: no authentication given","name":"unauthorized_request_error"}}}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"type":"object","properties":{"allowed_refreshes":{"type":"integer","description":"The number of allowed refreshes per hour (per hour, fixed window)"},"remaining_refreshes":{"type":"integer","description":"The number of remaining refreshes available (per hour, fixed window)"},"retry_at":{"type":"string","format":"date-time","description":"The datetime when quota for enqueuing new jobs will again be available. Only shown for a 429 response."}}},"examples":{"Example 1":{"value":{"allowed_refreshes":2,"remaining_refreshes":0,"retry_at":"2019-08-24T14:15:22Z"}}}}}}}}},"/jobs/automated/{job_id}":{"parameters":[{"schema":{"type":"string"},"name":"job_id","in":"path","required":true}],"get":{"summary":"Retrieve an Automated Job","operationId":"get-jobs-job_id","description":"Get an automated job by `job_id`.","tags":["Management"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomatedAsyncJob"},"examples":{"Example 1":{"value":{"job_id":"453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","job_url":"https://api.tryfinch.com/job/automated/453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","type":"data_sync_all","status":"pending","created_at":"2019-08-24T14:15:22Z","scheduled_at":"2019-08-24T14:15:22Z","started_at":"2019-08-24T14:15:22Z","completed_at":"2019-08-24T14:15:22Z"}}}}}},"404":{"description":"Not Found"}}}},"/jobs/manual/{job_id}":{"parameters":[{"schema":{"type":"string"},"name":"job_id","in":"path","required":true}],"get":{"summary":"Retrieve a Manual Job","operationId":"get-jobs-manual-job_id","description":"Get a manual job by `job_id`. Manual jobs are completed by a human and include Assisted Benefits jobs.","tags":["Management"],"parameters":[{"$ref":"#/components/parameters/API-Version"},{"$ref":"#/components/parameters/Content-Type"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualAsyncJob"},"examples":{"Example 1":{"value":{"job_id":"497d98f3-580a-4ab9-830a-af2346d029b2","status":"complete","body":[{"individual_id":"430f9d95-1dcf-4b99-b616-45f814416890","code":201,"message":"Successfully enrolled individual in benefit"},{"individual_id":"647975ac-1e0f-4e9c-b705-e3042da48581","code":200,"message":"Successfully updated enrollment for individual"},{"individual_id":"4a0a3b15-d3d6-41c2-a4a4-ca4ed1b68cf8","code":404,"message":"Individual not found"}]}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"finch_code":{"type":"string"},"name":{"type":"string"},"message":{"type":"string"}}},"examples":{"Example 1":{"value":{"code":400,"name":"invalid_request_error","message":"job_id is required"}}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"finch_code":{"type":"string"},"name":{"type":"string"},"message":{"type":"string"}}},"examples":{"Example 1":{"value":{"code":404,"finch_code":"item_not_found","name":"not_found_error","message":"could not find job with id '49142223-78e0-4092-80e1-313f510b0977'"}}}}}}}}},"/sandbox/connections":{"post":{"summary":"Create a new Sandbox Connection","operationId":"post-sandbox-connections","description":"Create a new connection (new company/provider pair) with a new account","tags":["Sandbox"],"parameters":[],"security":[{"basicAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider_id":{"type":"string"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"products":{"type":"array","items":{"type":"string"}},"employee_size":{"type":"integer","description":"Optional: the size of the employer to be created with this connection. Defaults to 20. Note that if this is higher than 100, historical payroll data will not be generated, and instead only one pay period will be created."}},"required":["provider_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company_id":{"type":"string","format":"uuid"},"provider_id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"products":{"type":"array","items":{"type":"string"}},"access_token":{"type":"string","format":"uuid"}},"required":["company_id","provider_id","account_id","authentication_type","products","access_token"]},"examples":{"success":{"value":{"company_id":"b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf","provider_id":"fe3d49af-4061-436b-ae60-f7044f252a44","account_id":"449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65","authentication_type":"api_token","products":["employer:company","employer:directory","employer:individual"],"access_token":"7eb55bcf-6593-4040-afac-252ee1f78e20"}}}}}}}}},"/sandbox/connections/accounts":{"parameters":[],"post":{"summary":"Create a new sandbox account","operationId":"post-sandbox-connections-accounts","description":"Create a new account for an existing connection (company/provider pair)","tags":["Sandbox"],"security":[{"basicAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"company_id":{"type":"string","format":"uuid"},"provider_id":{"type":"string"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"products":{"type":"array","description":"Optional, defaults to Organization products (`company`, `directory`, `employment`, `individual`)","items":{"type":"string"}}},"required":["company_id","provider_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"company_id":{"type":"string","format":"uuid"},"provider_id":{"type":"string"},"account_id":{"type":"string","format":"uuid"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"products":{"type":"array","items":{"type":"string"}},"access_token":{"type":"string","format":"uuid"}},"required":["company_id","provider_id","account_id","authentication_type","products","access_token"]},"examples":{"Example 1":{"value":{"company_id":"b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf","provider_id":"string","account_id":"449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65","authentication_type":"credential","products":["company"],"access_token":"7eb55bcf-6593-4040-afac-252ee1f78e20"}}}}}}}},"put":{"summary":"Update a sandbox account","operationId":"put-sandbox-connections-accounts","description":"Update an existing sandbox account. Change the connection status to understand how the Finch API responds.","tags":["Sandbox"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"connection_status":{"$ref":"#/components/schemas/ConnectionStatus"}}},"examples":{"Example 1":{"value":{"connection_status":"reauth"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"company_id":{"type":"string","format":"uuid"},"provider_id":{"type":"string"},"products":{"type":"array","items":{"type":"string"}}},"required":["account_id","authentication_type","company_id","provider_id","products"]},"examples":{"success":{"value":{"account_id":"string","authentication_type":"credential","company_id":"b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf","provider_id":"string","products":["directory"]}}}}}}}}},"/sandbox/company":{"put":{"summary":"Update a sandbox company's data","operationId":"put-sandbox-company","tags":["Sandbox"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyWithoutId"},"examples":{"Example 1":{"value":{"legal_name":"Profound Platform Inc","ein":"123456789"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyWithoutId"}}}}}}},"/sandbox/directory":{"post":{"summary":"Add new individuals to a sandbox company","operationId":"post-sandbox-directory","tags":["Sandbox"],"requestBody":{"content":{"application/json":{"schema":{"type":"array","description":"Array of individuals to create. Takes all combined fields from `/individual` and `/employment` endpoints. All fields are optional.","items":{"allOf":[{"$ref":"#/components/schemas/IndividualWithoutId"},{"$ref":"#/components/schemas/EmploymentWithoutId"}]}},"examples":{"Example 1":{"value":[{"first_name":"John","last_name":"Smith","dob":"01/01/2000"}]}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","description":"The individuals which were created","items":{"type":"object"}}}}}}}},"/sandbox/individual/{individual_id}":{"parameters":[{"schema":{"type":"string"},"name":"individual_id","in":"path","required":true}],"put":{"summary":"Update sandbox individual","operationId":"put-sandbox-individual-individual_id","tags":["Sandbox"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndividualWithoutId"},"examples":{"Example 1":{"value":{"dob":"12/20/1989"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Individual"}}}}}}},"/sandbox/employment/{individual_id}":{"parameters":[{"schema":{"type":"string"},"name":"individual_id","in":"path","required":true}],"put":{"summary":"Update sandbox employment","operationId":"put-sandbox-employment-individual_id","tags":["Sandbox"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmploymentWithoutId"},"examples":{"Example 1":{"value":{"start_date":"3/4/2020"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employment"}}}}}}},"/sandbox/payment":{"post":{"summary":"Add a new sandbox payment","operationId":"post-sandbox-payment","tags":["Sandbox"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIdentifiers"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Fields to configure the payment. Takes all fields from the `/payment` endpoint. All fields are optional.","properties":{"start_date":{"type":"string"},"end_date":{"type":"string"},"pay_statements":{"type":"array","items":{"$ref":"#/components/schemas/PayStatement"}}}},"examples":{"Example 1":{"value":{"pay_statements":[{"individual_id":"b2338cfb-472f-4f72-9faa-e028c083144a","employee_deductions":[{"name":"401k test","type":"401k","amount":2000,"currency":"usd"}]}]}}}}}}}},"/sandbox/jobs":{"post":{"summary":"Enqueue a new sandbox job","operationId":"post-sandbox-job","tags":["Sandbox"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"The type of job to start. Currently the only supported type is `data_sync_all`","enum":["data_sync_all"]}},"required":["type"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid","description":"The id of the job that has been created."},"job_url":{"type":"string","description":"The url that can be used to retrieve the job status"},"allowed_refreshes":{"type":"integer","description":"The number of allowed refreshes per hour (per hour, fixed window)"},"remaining_refreshes":{"type":"integer","description":"The number of remaining refreshes available (per hour, fixed window)"}}},"examples":{"Example 1":{"value":{"job_id":"453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","job_url":"https://api.tryfinch.com/jobs/automated/453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","allowed_refreshes":2,"remaining_refreshes":1}}}}}}}}},"/sandbox/jobs/configuration":{"get":{"summary":"Get configurations for sandbox jobs","operationId":"get-sandbox-jobs-configuration","tags":["Sandbox"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SandboxJobConfiguration"}},"examples":{"success":{"value":[{"type":"data_sync_all","completion_status":"success"}]}}}}}}},"put":{"summary":"Update configurations for sandbox jobs","operationId":"put-sandbox-jobs-configuration","tags":["Sandbox"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxJobConfiguration"},"examples":{"Example 1":{"value":{"type":"data_sync_all","completion_status":"success"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxJobConfiguration"},"examples":{"Example 1":{"value":{"type":"data_sync_all","completion_status":"success"}}}}}}}}},"components":{"schemas":{"CompanyWithoutId":{"type":"object","properties":{"legal_name":{"type":"string","description":"The legal name of the company.","nullable":true},"entity":{"type":"object","description":"The entity type object.","nullable":true,"properties":{"type":{"type":"string","description":"The tax payer type of the company.","enum":["llc","lp","corporation","sole_proprietor","non_profit","partnership","cooperative",null],"nullable":true},"subtype":{"type":"string","description":"The tax payer subtype of the company.","enum":["s_corporation","c_corporation","b_corporation",null],"nullable":true}}},"primary_email":{"type":"string","description":"The email of the main administrator on the account.","nullable":true},"primary_phone_number":{"type":"string","description":"The phone number of the main administrator on the account. Format: `XXXXXXXXXX`","pattern":"[0-9]{10}","nullable":true},"departments":{"type":"array","description":"The array of company departments.","nullable":true,"items":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"The department name.","nullable":true},"parent":{"type":"object","description":"The parent department, if present.","nullable":true,"properties":{"name":{"type":"string","description":"The parent department's name.","nullable":true}}}}}},"ein":{"type":"string","description":"The employer identification number.","nullable":true},"locations":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Location"}},"accounts":{"type":"array","description":"An array of bank account objects associated with the payroll/HRIS system.","nullable":true,"items":{"type":"object","properties":{"routing_number":{"type":"string","description":"A nine-digit code that's based on the U.S. Bank location where your account was opened.","nullable":true},"account_name":{"type":"string","description":"The name of the bank associated in the payroll/HRIS system.","nullable":true},"institution_name":{"type":"string","description":"Name of the banking institution.","nullable":true},"account_type":{"type":"string","description":"The type of bank account.","enum":["checking","savings",null],"nullable":true},"account_number":{"type":"string","description":"10-12 digit number to specify the bank account","nullable":true}}}}}},"Company":{"title":"Company","allOf":[{"$ref":"#/components/schemas/CompanyWithoutId"},{"type":"object","properties":{"id":{"type":"string","description":"A stable Finch `id` (UUID v4) for the company.","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"}}}],"x-tags":["Models"]},"IndividualWithoutId":{"type":"object","properties":{"first_name":{"type":"string","description":"The legal first name of the individual.","nullable":true},"middle_name":{"type":"string","description":"The legal middle name of the individual.","nullable":true},"last_name":{"type":"string","description":"The legal last name of the individual.","nullable":true},"preferred_name":{"type":"string","description":"The preferred name of the individual.","nullable":true},"emails":{"type":"array","nullable":true,"items":{"type":"object","properties":{"data":{"type":"string"},"type":{"type":"string","enum":["work","personal",null]}}}},"phone_numbers":{"type":"array","nullable":true,"items":{"type":"object","nullable":true,"properties":{"data":{"type":"string","nullable":false},"type":{"type":"string","enum":["work","personal",null],"nullable":false}}}},"gender":{"type":"string","description":"The gender of the individual.","enum":["female","male","other","decline_to_specify",null],"nullable":true},"ethnicity":{"type":"string","enum":["asian","white","black_or_african_american","native_hawaiian_or_pacific_islander","american_indian_or_alaska_native","hispanic_or_latino","two_or_more_races","decline_to_specify",null],"description":"The EEOC-defined ethnicity of the individual.","nullable":true},"dob":{"$ref":"#/components/schemas/Date","nullable":true},"ssn":{"type":"string","description":"Social Security Number of the individual. This field is only available with the `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the body.","nullable":true},"encrypted_ssn":{"type":"string","description":"Social Security Number of the individual in **encrypted** format. This field is only available with the `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the body.","nullable":true},"residence":{"$ref":"#/components/schemas/Location"}}},"Individual":{"title":"Individual","allOf":[{"$ref":"#/components/schemas/IndividualWithoutId"},{"type":"object","properties":{"id":{"type":"string","description":"A stable Finch `id` (UUID v4) for an individual in the company.","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"}}}]},"EmploymentWithoutId":{"type":"object","properties":{"first_name":{"type":"string","description":"The legal first name of the individual.","nullable":true},"middle_name":{"type":"string","description":"The legal middle name of the individual.","nullable":true},"last_name":{"type":"string","description":"The legal last name of the individual.","nullable":true},"title":{"type":"string","description":"The current title of the individual.","nullable":true},"manager":{"type":"object","description":"The manager object representing the manager of the individual within the org.","nullable":true,"properties":{"id":{"type":"string","description":"A stable Finch `id` (UUID v4) for an individual in the company.","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"}}},"department":{"type":"object","description":"The department object.","nullable":true,"properties":{"name":{"type":"string","description":"The name of the department associated with the individual.","nullable":true}}},"employment":{"type":"object","description":"The employment object.","nullable":true,"properties":{"type":{"type":"string","description":"The main employment type of the individual.","enum":["employee","contractor",null],"nullable":true},"subtype":{"type":"string","description":"\tThe secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.","enum":["full_time","intern","part_time","temp","seasonal","individual_contractor",null],"nullable":true}}},"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"},"is_active":{"type":"boolean","description":"`true` if the individual an an active employee or contractor at the company.","nullable":true},"class_code":{"type":"string","description":"Worker's compensation classification code for this employee","nullable":true},"location":{"$ref":"#/components/schemas/Location"},"income":{"$ref":"#/components/schemas/Income"},"income_history":{"type":"array","description":"The array of income history.","nullable":true,"items":{"$ref":"#/components/schemas/Income"}},"custom_fields":{"type":"array","description":"Custom fields for the individual. These are fields which are defined by the employer in the system. Custom fields are not currently supported for assisted connections.","items":{"type":"object","properties":{"name":{"type":"string","nullable":true},"value":{"type":["number","string","array","object","boolean"],"nullable":true}}}},"source_id":{"type":"string","description":"The source system's unique employment identifier for this individual"}}},"Employment":{"title":"Employment","allOf":[{"$ref":"#/components/schemas/EmploymentWithoutId"},{"type":"object","properties":{"id":{"type":"string","description":"A stable Finch `id` (UUID v4) for an individual in the company.","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"}}}]},"ConnectionStatus":{"title":"ConnectionStatus","enum":["pending","processing","connected","error_no_account_setup","error_permissions","reauth"]},"SandboxJobConfiguration":{"title":"SandboxJobConfiguration","type":"object","properties":{"type":{"enum":["data_sync_all"]},"completion_status":{"enum":["complete","reauth_error","permissions_error","error"]}},"required":["type","completion_status"]},"AuthenticationType":{"title":"AuthenticationType","enum":["credential","api_token","oauth","assisted"]},"BaseWebhookEvent":{"type":"object","properties":{"company_id":{"type":"string","description":"Unique Finch id of the company for which data has been updated."},"account_id":{"type":"string","description":"Unique Finch id of the employer account that was used to make this connection."},"event_type":{"type":"string","description":"The type of webhook being delivered."},"data":{"type":"object","description":"More information about the associated event."}},"required":["company_id","account_id","event_type","data"]},"WebhookEvent":{"anyOf":[{"$ref":"#/components/schemas/AccountUpdateEvent"},{"$ref":"#/components/schemas/JobCompletionEvent"},{"$ref":"#/components/schemas/CompanyEvent"},{"$ref":"#/components/schemas/DirectoryEvent"},{"$ref":"#/components/schemas/EmploymentEvent"},{"$ref":"#/components/schemas/IndividualEvent"},{"$ref":"#/components/schemas/PaymentEvent"},{"$ref":"#/components/schemas/PayStatementEvent"}]},"AccountUpdateEvent":{"allOf":[{"$ref":"#/components/schemas/BaseWebhookEvent"},{"type":"object","properties":{"event_type":{"type":"string","enum":["account.updated"]},"data":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ConnectionStatus"},"authentication_method":{"$ref":"#/components/schemas/AuthenticationMethod"}},"required":["status","authentication_method"]}}}]},"JobCompletionEvent":{"allOf":[{"$ref":"#/components/schemas/BaseWebhookEvent"},{"type":"object","properties":{"event_type":{"type":"string","enum":["job.benefit_create.updated","job.benefit_enroll.updated","job.benefit_register.updated","job.benefit_unenroll.updated","job.benefit_update.updated","job.data_sync_all.updated"]},"data":{"type":"object","properties":{"job_id":{"type":"string","description":"The id of the job which has completed."},"job_url":{"type":"string","description":"The url to query the result of the job."}},"required":["job_id","job_url"]}}}]},"CompanyEvent":{"allOf":[{"$ref":"#/components/schemas/BaseWebhookEvent"},{"type":"object","properties":{"event_type":{"type":"string","enum":["company.updated"]},"data":{"type":"object","nullable":true,"additionalProperties":true}}}]},"DirectoryEvent":{"allOf":[{"$ref":"#/components/schemas/BaseWebhookEvent"},{"type":"object","properties":{"event_type":{"type":"string","enum":["directory.created","directory.updated","directory.deleted"]},"data":{"type":"object","properties":{"individual_id":{"type":"string","description":"The ID of the individual related to the event."}}}}}]},"EmploymentEvent":{"allOf":[{"$ref":"#/components/schemas/BaseWebhookEvent"},{"type":"object","properties":{"event_type":{"type":"string","enum":["employment.created","employment.updated","employment.deleted"]},"data":{"type":"object","properties":{"individual_id":{"type":"string","description":"The ID of the individual related to the event."}}}}}]},"IndividualEvent":{"allOf":[{"$ref":"#/components/schemas/BaseWebhookEvent"},{"type":"object","properties":{"event_type":{"type":"string","enum":["individual.created","individual.updated","individual.deleted"]},"data":{"type":"object","properties":{"individual_id":{"type":"string","description":"The ID of the individual related to the event."}}}}}]},"PaymentIdentifiers":{"type":"object","properties":{"payment_id":{"type":"string","description":"The ID of the payment."},"pay_date":{"type":"string","description":"The date of the payment."}}},"PaymentEvent":{"allOf":[{"$ref":"#/components/schemas/BaseWebhookEvent"},{"type":"object","properties":{"event_type":{"type":"string","enum":["payment.created","payment.updated","payment.deleted"]},"data":{"$ref":"#/components/schemas/PaymentIdentifiers"}}}]},"PayStatementEvent":{"allOf":[{"$ref":"#/components/schemas/BaseWebhookEvent"},{"type":"object","properties":{"event_type":{"type":"string","enum":["pay_statement.created","pay_statement.updated","pay_statement.deleted"]},"data":{"type":"object","properties":{"payment_id":{"type":"string","description":"The ID of the payment associated with the pay statement."},"individual_id":{"type":"string","description":"The ID of the individual associated with the pay statement."}}}}}]},"CreateAccessTokenResponse":{"type":"object","properties":{"access_token":{"type":"string"},"account_id":{"type":"string","description":"The Finch uuid of the account used to connect this company."},"client_type":{"$ref":"#/components/schemas/ClientType"},"company_id":{"type":"string","description":"The Finch uuid of the company associated with the `access_token`."},"connection_type":{"$ref":"#/components/schemas/ConnectionType"},"products":{"type":"array","description":"An array of the authorized products associated with the `access_token`.","items":{"type":"string"}},"provider_id":{"type":"string","description":"The payroll provider associated with the `access_token`."}},"required":["access_token","account_id","client_type","company_id","connection_type","products","provider_id"]},"AutomatedAsyncJob":{"title":"AutomatedAsyncJob","type":"object","x-examples":{"Example 1":{"job_id":"job-7e8d96ab-898f-4495-8b74-6316bb30b772","type":"scheduled","code":200,"created_at":"2019-08-24T14:15:22Z","started_at":"2019-08-24T14:15:22Z","completed_at":"2019-08-24T14:15:22Z"}},"properties":{"job_id":{"type":"string","description":"The id of the job that has been created.","format":"uuid"},"job_url":{"type":"string","description":"The url that can be used to retrieve the job status"},"type":{"type":"string","description":"Only `data_sync_all` currently supported","enum":["data_sync_all"]},"status":{"type":"string","enum":["pending","in_progress","complete","error","reauth_error","permissions_error"]},"created_at":{"type":"string","format":"date-time","description":"The datetime when the job was created. for scheduled jobs, this will be the initial connection time. For ad-hoc jobs, this will be the time the creation request was received."},"scheduled_at":{"type":"string","format":"date-time","description":"The datetime a job is scheduled to be run. For scheduled jobs, this datetime can be in the future if the job has not yet been enqueued. For ad-hoc jobs, this field will be null.","nullable":true},"started_at":{"type":"string","format":"date-time","description":"The datetime a job entered into the job queue.","nullable":true},"completed_at":{"type":"string","format":"date-time","description":"The datetime the job completed.","nullable":true}}},"ManualAsyncJob":{"title":"ManualAsyncJob","type":"object","x-examples":{"Example 1":{"job_id":"453bd7d7-5355-4d6d-a38e-d9e7eb218c3f","status":"complete","body":[{"individual_id":"46decc95-451e-44ef-baac-b228d778267f","message":"Successfully updated benefit for individual"}]}},"properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","in_progress","error","complete"]},"body":{"type":"array","description":"Specific information about the job, such as individual statuses for batch jobs.","nullable":true,"items":{}}}},"GetCompanyResponse":{"title":"GetCompany","type":"object","properties":{"id":{"type":"string","description":"A stable Finch `id` (UUID v4) for the company."},"legal_name":{"type":"string","description":"The legal name of the company.","nullable":true},"entity":{"type":"object","description":"The entity type object.","nullable":true,"properties":{"type":{"type":"string","description":"The tax payer type of the company.","enum":["llc","lp","corporation","sole_proprietor","non_profit","partnership","cooperative",null],"nullable":true},"subtype":{"type":"string","description":"The tax payer subtype of the company.","enum":["s_corporation","c_corporation","b_corporation",null],"nullable":true}}},"primary_email":{"type":"string","description":"The email of the main administrator on the account.","nullable":true},"primary_phone_number":{"type":"string","description":"The phone number of the main administrator on the account. Format: `XXXXXXXXXX`","pattern":"[0-9]","nullable":true},"departments":{"type":"array","description":"The array of company departments.","nullable":true,"items":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"The department name.","nullable":true},"parent":{"type":"object","description":"The parent department, if present.","nullable":true,"properties":{"name":{"type":"string","description":"The parent department's name.","nullable":true}}}}}},"ein":{"type":"string","description":"The employer identification number.","nullable":true},"locations":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Location"}},"accounts":{"type":"array","description":"An array of bank account objects associated with the payroll/HRIS system.","nullable":true,"items":{"type":"object","properties":{"routing_number":{"type":"string","description":"A nine-digit code that's based on the U.S. Bank location where your account was opened.","nullable":true},"account_name":{"type":"string","description":"The name of the bank associated in the payroll/HRIS system.","nullable":true},"institution_name":{"type":"string","description":"Name of the banking institution.","nullable":true},"account_type":{"type":"string","description":"The type of bank account.","enum":["checking","savings",null],"nullable":true},"account_number":{"type":"string","description":"10-12 digit number to specify the bank account","nullable":true}}}}}},"GetDirectoryResponse":{"type":"object","properties":{"paging":{"$ref":"#/components/schemas/Paging"},"individuals":{"type":"array","description":"The array of employees.","items":{"type":"object","properties":{"id":{"type":"string","description":"A stable Finch id (UUID v4) for an individual in the company."},"first_name":{"type":"string","description":"The legal first name of the individual.","nullable":true},"middle_name":{"type":"string","description":"The legal middle name of the individual.","nullable":true},"last_name":{"type":"string","description":"The legal last name of the individual.","nullable":true},"manager":{"type":"object","description":"The manager object.","nullable":true,"properties":{"id":{"type":"string","description":"A stable Finch `id` (UUID v4) for an individual in the company.","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"}}},"department":{"type":"object","description":"The department object.","nullable":true,"properties":{"name":{"type":"string","description":"The name of the department.","nullable":true}}},"is_active":{"type":"boolean","description":"`true` if the individual is an active employee or contractor at the company.","nullable":true}}}}}},"GetIndividualsResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"type":"object","properties":{"individual_id":{"type":"string"},"code":{"type":"integer"},"body":{"type":"object","properties":{"id":{"type":"string","description":"A stable Finch `id` (UUID v4) for an individual in the company."},"first_name":{"type":"string","description":"The legal first name of the individual.","nullable":true},"middle_name":{"type":"string","description":"The legal middle name of the individual.","nullable":true},"last_name":{"type":"string","description":"The legal last name of the individual.","nullable":true},"preferred_name":{"type":"string","description":"The preferred name of the individual.","nullable":true},"emails":{"type":"array","nullable":true,"items":{"type":"object","properties":{"data":{"type":"string"},"type":{"type":"string","enum":["work","personal",null]}}}},"phone_numbers":{"type":"array","nullable":true,"items":{"type":"object","nullable":true,"properties":{"data":{"type":"string","pattern":"[0-9]","nullable":true},"type":{"type":"string","enum":["work","personal",null],"nullable":true}}}},"gender":{"type":"string","description":"The gender of the individual.","enum":["female","male","other","decline_to_specify",null],"nullable":true},"ethnicity":{"type":"string","description":"The EEOC-defined ethnicity of the individual.","enum":["asian","white","black_or_african_american","native_hawaiian_or_pacific_islander","american_indian_or_alaska_native","hispanic_or_latino","two_or_more_races","decline_to_specify",null],"nullable":true},"dob":{"anyOf":[{"type":"null"},{"$ref":"#/components/schemas/Date"}]},"residence":{"$ref":"#/components/schemas/Location"},"ssn":{"type":"string","description":"Social Security Number of the individual. This field is only available with the `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the body.","nullable":true},"encrypted_ssn":{"type":"string","description":"Social Security Number of the individual in **encrypted** format. This field is only available with the `ssn` scope enabled and the `options: { include: ['ssn'] }` param set in the body.","nullable":true}}}}}}}},"GetEmploymentResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"type":"object","properties":{"individual_id":{"type":"string"},"code":{"type":"integer"},"body":{"type":"object","properties":{"id":{"type":"string","description":"string\tA stable Finch `id` (UUID v4) for an individual in the company."},"first_name":{"type":"string","description":"The legal first name of the individual.","nullable":true},"middle_name":{"type":"string","description":"The legal middle name of the individual.","nullable":true},"last_name":{"type":"string","description":"The legal last name of the individual.","nullable":true},"title":{"type":"string","description":"The current title of the individual.","nullable":true},"manager":{"type":"object","description":"The manager object representing the manager of the individual within the org.","nullable":true,"properties":{"id":{"type":"string","description":"A stable Finch `id` (UUID v4) for an individual in the company.","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"}}},"department":{"type":"object","description":"The department object.","nullable":true,"properties":{"name":{"type":"string","description":"The name of the department associated with the individual.","nullable":true}}},"employment":{"type":"object","description":"The employment object.","nullable":true,"properties":{"type":{"type":"string","description":"The main employment type of the individual.","enum":["employee","contractor",null],"nullable":true},"subtype":{"type":"string","description":"\tThe secondary employment type of the individual. Options: `full_time`, `part_time`, `intern`, `temp`, `seasonal` and `individual_contractor`.","enum":["full_time","intern","part_time","temp","seasonal","individual_contractor",null],"nullable":true}}},"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"},"latest_rehire_date":{"$ref":"#/components/schemas/Date"},"is_active":{"type":"boolean","description":"`true` if the individual an an active employee or contractor at the company.","nullable":true},"class_code":{"type":"string","description":"Worker's compensation classification code for this employee","nullable":true},"location":{"$ref":"#/components/schemas/Location"},"income":{"$ref":"#/components/schemas/Income"},"income_history":{"type":"array","description":"The array of income history.","nullable":true,"items":{"$ref":"#/components/schemas/Income"}},"custom_fields":{"type":"array","description":"Custom fields for the individual. These are fields which are defined by the employer in the system.","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"value":{"oneOf":[{"type":"string"},{"type":"array"},{"type":"object"},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"source_id":{"type":"string","description":"The source system's unique employment identifier for this individual","nullable":true},"work_id":{"type":"string","description":"This field is deprecated in favour of `source_id`","nullable":true}}}}}}}},"GetPaymentsResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique id for the payment.","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"},"pay_period":{"type":"object","description":"The pay period object.","nullable":true,"properties":{"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"}}},"pay_date":{"$ref":"#/components/schemas/Date"},"debit_date":{"$ref":"#/components/schemas/Date"},"company_debit":{"$ref":"#/components/schemas/Money"},"gross_pay":{"$ref":"#/components/schemas/Money"},"net_pay":{"$ref":"#/components/schemas/Money"},"employer_taxes":{"$ref":"#/components/schemas/Money"},"employee_taxes":{"$ref":"#/components/schemas/Money"},"individual_ids":{"type":"array","description":"Array of every individual on this payment.","nullable":true,"items":{"type":"string","pattern":"[0-9a-f]{8}[-]?(?:[0-9a-f]{4}[-]?){3}[0-9a-f]{12}"}}}}},"PayStatement":{"title":"Pay Statement","type":"object","properties":{"individual_id":{"type":"string","description":"A stable Finch `id` (UUID v4) for an individual in the company"},"type":{"type":"string","description":"The type of the payment associated with the pay statement.","enum":["regular_payroll","off_cycle_payroll","one_time_payment",null],"nullable":true},"payment_method":{"type":"string","description":"The payment method.","enum":["check","direct_deposit",null],"nullable":true},"total_hours":{"type":"number","description":"The number of hours worked for this pay period","nullable":true},"gross_pay":{"$ref":"#/components/schemas/Money"},"net_pay":{"$ref":"#/components/schemas/Money"},"earnings":{"type":"array","description":"The array of earnings objects associated with this pay statement","nullable":true,"items":{"type":"object","nullable":true,"properties":{"type":{"type":"string","description":"The type of earning.","enum":["salary","wage","reimbursement","overtime","severance","double_overtime","pto","sick","bonus","commission","tips","1099","other",null],"nullable":true},"name":{"type":"string","description":"The exact name of the deduction from the pay statement.","nullable":true},"amount":{"type":"integer","description":"The earnings amount in cents.","nullable":true},"currency":{"type":"string","description":"The earnings currency code.","nullable":true},"hours":{"type":"number","description":"The number of hours associated with this earning. (For salaried employees, this could be hours per pay period, `0` or `null`, depending on the provider).","nullable":true}}}},"taxes":{"type":"array","description":"The array of taxes objects associated with this pay statement.","nullable":true,"items":{"type":"object","nullable":true,"properties":{"type":{"type":"string","description":"The type of taxes.","enum":["state","federal","local","fica",null],"nullable":true},"name":{"type":"string","description":"The exact name of tax from the pay statement.","nullable":true},"employer":{"type":"boolean","description":"`true` if the amount is paid by the employers.","nullable":true},"amount":{"type":"integer","description":"The tax amount in cents.","nullable":true},"currency":{"type":"string","description":"The currency code.","nullable":true}}}},"employee_deductions":{"type":"array","description":"The array of deductions objects associated with this pay statement.","nullable":true,"items":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"The deduction name from the pay statement.","nullable":true},"amount":{"type":"integer","description":"The deduction amount in cents.","nullable":true},"currency":{"type":"string","description":"The deduction currency.","nullable":true},"pre_tax":{"type":"boolean","description":"Boolean indicating if the deduction is pre-tax.","nullable":true},"type":{"$ref":"#/components/schemas/BenefitType"}}}},"employer_contributions":{"type":"array","nullable":true,"items":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"The contribution name from the pay statement.","nullable":true},"amount":{"type":"integer","description":"The contribution amount in cents.","nullable":true},"currency":{"type":"string","description":"The contribution currency.","nullable":true},"type":{"$ref":"#/components/schemas/BenefitType"}}}}}},"GetPayStatementsResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"type":"object","properties":{"payment_id":{"type":"string"},"code":{"type":"integer"},"body":{"type":"object","properties":{"paging":{"$ref":"#/components/schemas/Paging"},"pay_statements":{"type":"array","description":"The array of pay statements for the current payment.","items":{"$ref":"#/components/schemas/PayStatement"}}}}}}}}},"GetAllPayGroupsResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Finch id (uuidv4) for the pay group"},"name":{"type":"string","description":"Name of the pay group"},"pay_frequencies":{"type":"array","description":"List of pay frequencies associated with this pay group","items":{"$ref":"#/components/schemas/PayFrequency"}}}}},"GetPayGroupResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Finch id (uuidv4) for the pay group"},"name":{"type":"string","description":"Name of the pay group"},"pay_frequencies":{"type":"array","description":"List of pay frequencies associated with this pay group","items":{"$ref":"#/components/schemas/PayFrequency"}},"individual_ids":{"type":"array","items":{"type":"string","format":"uuid","description":"Finch id (uuidv4) for an individual assigned to this pay group"}}}},"PayFrequency":{"type":"string","enum":["annually","semi_annually","quarterly","monthly","semi_monthly","bi_weekly","weekly","daily","other"]},"GetProvidersResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The id of the payroll provider used in Connect."},"display_name":{"type":"string","description":"The display name of the payroll provider."},"products":{"type":"array","description":"The list of Finch products supported on this payroll provider.","items":{"type":"string"}},"icon":{"type":"string","description":"The url to the official icon of the payroll provider."},"logo":{"type":"string","description":"The url to the official logo of the payroll provider."},"mfa_required":{"type":"boolean","description":"whether MFA is required for the provider."},"primary_color":{"type":"string","description":"The hex code for the primary color of the payroll provider."},"manual":{"type":"boolean","description":"[DEPRECATED] Whether the Finch integration with this provider uses the Assisted Connect Flow by default. This field is now deprecated. Please check for a `type` of `assisted` in the `authentication_methods` field instead."},"beta":{"type":"boolean","description":"`true` if the integration is in a beta state, `false` otherwise"},"authentication_methods":{"type":"array","description":"The list of authentication methods supported by the provider.","items":{"$ref":"#/components/schemas/AuthenticationMethod"}}}}},"GetIntrospectResponse":{"type":"object","properties":{"client_id":{"type":"string","description":"The client id of the application associated with the `access_token`."},"client_type":{"$ref":"#/components/schemas/ClientType"},"connection_type":{"$ref":"#/components/schemas/ConnectionType"},"company_id":{"type":"string","description":"The Finch uuid of the company associated with the `access_token`."},"account_id":{"type":"string","description":"The Finch uuid of the account used to connect this company."},"authentication_methods":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"connection_status":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/ConnectionStatus"},"message":{"type":"string"}}}}}},"products":{"type":"array","description":"An array of the authorized products associated with the `access_token`.","items":{"type":"string"}},"username":{"type":"string","description":"The account username used for login associated with the `access_token`."},"payroll_provider_id":{"type":"string","description":"The payroll provider associated with the `access_token`."},"manual":{"type":"boolean","description":"Whether the connection associated with the `access_token` uses the Assisted Connect Flow. (`true` if using Assisted Connect, `false` if connection is automated)"}}},"DisconnectResponse":{"type":"object","properties":{"status":{"type":"string","description":"If the request is successful, Finch will return “success” (HTTP 200 status)."}}},"GetCompanyBenefitsResponse":{"type":"array","items":{"$ref":"#/components/schemas/CompanyBenefit"}},"CreateCompanyBenefitsResponse":{"type":"object","properties":{"benefit_id":{"type":"string"}}},"RegisterCompanyBenefitsResponse":{"type":"object","properties":{"benefit_id":{"type":"string"},"job_id":{"type":"string"}}},"GetCompanyBenefitsMetadataResponse":{"type":"array","items":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/BenefitType"},"description":{"type":"string","nullable":true},"frequencies":{"type":"array","description":"The list of frequencies supported by the provider for this benefit","items":{"$ref":"#/components/schemas/BenefitFrequency"}},"employee_deduction":{"type":"array","description":"Supported deduction types. An empty array indicates deductions are not supported.","nullable":true,"items":{"type":"string","enum":["fixed","percent",null]}},"company_contribution":{"type":"array","description":"Supported contribution types. An empty array indicates contributions are not supported.","nullable":true,"items":{"type":"string","enum":["fixed","percent",null]}},"annual_maximum":{"type":"boolean","description":"Whether the provider supports an annual maximum for this benefit.","nullable":true},"catch_up":{"type":"boolean","description":"Whether the provider supports catch up for this benefit. This field will only be true for retirement benefits.","nullable":true},"hsa_contribution_limit":{"description":"Whether the provider supports HSA contribution limits. Empty if this feature is not supported for the benefit. This array only has values for HSA benefits.","type":"array","nullable":true,"items":{"type":"string","enum":["individual","family",null]}}}}},"UpdateCompanyBenefitResponse":{"type":"object","properties":{"benefit_id":{"type":"string"}}},"GetCompanyBenefitEnrolledIndividualsResponse":{"type":"object","properties":{"benefit_id":{"type":"string"},"individual_ids":{"type":"array","items":{"type":"string"}}}},"EnrollIndividualBenefitResponse":{"type":"array","items":{"type":"object","properties":{"individual_id":{"type":"string"},"code":{"type":"integer","description":"HTTP status code. Either 201 or 200","enum":[200,201,404,403]},"body":{"type":"object","properties":{"name":{"type":"string","description":"Identifier indicating whether the benefit was newly enrolled or updated.","nullable":true},"finch_code":{"type":"string","description":"A descriptive identifier for the response","nullable":true},"message":{"type":"string","description":"Short description in English that provides more information about the response.","nullable":true}}}}}},"UnenrollIndividualBenefitResponse":{"oneOf":[{"type":"object","properties":{"job_id":{"type":"string"}}},{"type":"array","items":{"type":"object","properties":{"individual_id":{"type":"string"},"code":{"type":"integer","description":"HTTP status code"},"body":{"type":"object","properties":{"name":{"type":"string","description":"Identifier indicating whether the benefit was newly enrolled or updated.","nullable":true},"finch_code":{"type":"string","description":"A descriptive identifier for the response.","nullable":true},"message":{"type":"string","description":"Short description in English that provides more information about the response.","nullable":true}}}}}}]},"Location":{"title":"Location","type":"object","x-tags":["Models"],"description":"","nullable":true,"properties":{"line1":{"type":"string","description":"Street address or PO box.","nullable":true},"line2":{"type":"string","description":"Apartment, suite, unit, or building.","nullable":true},"city":{"type":"string","description":"City, district, suburb, town, or village.","nullable":true},"state":{"type":"string","description":"The state code.","nullable":true},"postal_code":{"type":"string","description":"The postal code or zip code.","nullable":true},"country":{"type":"string","description":"The 2-letter ISO 3166 country code.","nullable":true},"name":{"type":"string","nullable":true},"source_id":{"type":"string","nullable":true}}},"Income":{"title":"Income","type":"object","x-tags":["Models"],"description":"The employee's income as reported by the provider. This may not always be annualized income, but may be in units of bi-weekly, semi-monthly, daily, etc, depending on what information the provider returns.","nullable":true,"properties":{"unit":{"type":"string","description":"The income unit of payment. Options: `yearly`, `quarterly`, `monthly`, `semi_monthly`, `bi_weekly`, `weekly`, `daily`, `hourly`, and `fixed`.","enum":["yearly","quarterly","monthly","semi_monthly","bi_weekly","weekly","daily","hourly","fixed",null],"nullable":true},"amount":{"description":"The income amount in cents.","type":"integer","nullable":true},"currency":{"type":"string","description":"The currency code.","nullable":true},"effective_date":{"type":"string","description":"The date the income amount went into effect.","nullable":true}}},"Money":{"title":"Money","type":"object","x-tags":["Models"],"nullable":true,"properties":{"amount":{"type":"integer","description":"Amount for money object (in cents)","nullable":true},"currency":{"type":"string"}}},"Paging":{"title":"Paging","type":"object","properties":{"count":{"type":"integer","description":"The total number of elements for the entire query (not just the given page)"},"offset":{"type":"integer","description":"The current start index of the returned list of elements"}},"x-tags":["Models"]},"Date":{"type":"string","title":"Date","pattern":"(\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]))","nullable":true},"BenefitType":{"type":"string","title":"BenefitType","enum":["401k","401k_roth","401k_loan","403b","403b_roth","457","457_roth","s125_medical","s125_dental","s125_vision","hsa_pre","hsa_post","fsa_medical","fsa_dependent_care","simple_ira","simple","commuter","custom_post_tax","custom_pre_tax",null],"description":"Type of benefit.","x-tags":["Models"],"nullable":true},"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","title":"BenefitFrequency","enum":["one_time","every_paycheck","monthly",null],"x-tags":["Models"],"nullable":true},"BenefitContribution":{"title":"BenefitContribution","type":"object","x-tags":["Models"],"x-examples":{},"nullable":true,"properties":{"type":{"type":"string","enum":["fixed","percent",null],"description":"Contribution type.","nullable":true},"amount":{"type":"integer","description":"Contribution amount in cents (if `fixed`) or basis points (if `percent`).","nullable":true}}},"BenefitFeature":{"title":"BenefitFeature","type":"object","properties":{"description":{"type":"string","nullable":true},"frequencies":{"type":"array","description":"The list of frequencies supported by the provider for this benefit","items":{"$ref":"#/components/schemas/BenefitFrequency"}},"employee_deduction":{"type":"array","description":"Supported deduction types. An empty array indicates deductions are not supported.","nullable":true,"items":{"type":"string","enum":["fixed","percent",null]}},"company_contribution":{"type":"array","description":"Supported contribution types. An empty array indicates contributions are not supported.","nullable":true,"items":{"type":"string","enum":["fixed","percent",null]}},"annual_maximum":{"type":"boolean","description":"Whether the provider supports an annual maximum for this benefit.","nullable":true},"catch_up":{"type":"boolean","description":"Whether the provider supports catch up for this benefit. This field will only be true for retirement benefits.","nullable":true},"hsa_contribution_limit":{"description":"Whether the provider supports HSA contribution limits. Empty if this feature is not supported for the benefit. This array only has values for HSA benefits.","type":"array","nullable":true,"items":{"type":"string","enum":["individual","family",null]}}}},"ClientType":{"type":"string","title":"ClientType","enum":["production","development","sandbox"],"description":"The type of application associated with a token."},"ConnectionType":{"type":"string","title":"ConnectionType","enum":["provider","finch"],"description":"The type of the connection associated with the token.\n- `provider` - connection to an external provider\n- `finch` - finch-generated data."},"CompanyBenefit":{"title":"CompanyBenefit","type":"object","properties":{"benefit_id":{"type":"string"},"type":{"$ref":"#/components/schemas/BenefitType"},"description":{"type":"string","nullable":true},"frequency":{"$ref":"#/components/schemas/BenefitFrequency"}}},"IndividualBenefits":{"title":"IndividualBenefits","type":"array","x-examples":{},"items":{"type":"object","properties":{"individual_id":{"type":"string"},"code":{"type":"integer"},"body":{"type":"object","properties":{"employee_deduction":{"$ref":"#/components/schemas/BenefitContribution"},"company_contribution":{"$ref":"#/components/schemas/BenefitContribution"},"annual_maximum":{"type":"integer","description":"If the benefit supports annual maximum, the amount in cents for this individual.","nullable":true},"catch_up":{"type":"boolean","description":"If the benefit supports catch up (401k, 403b, etc.), whether catch up is enabled for this individual.","nullable":true},"hsa_contribution_limit":{"type":"string","enum":["individual","family",null],"description":"Type for HSA contribution limit if the benefit is a HSA.","nullable":true}}}}}},"BenefitFeaturesAndOperations":{"type":"object","nullable":true,"properties":{"supported_features":{"$ref":"#/components/schemas/BenefitFeature"},"supported_operations":{"$ref":"#/components/schemas/SupportPerBenefitType"}}},"BenefitsSupport":{"type":"object","nullable":true,"description":"Each benefit type and their supported features. If the benefit type is not supported, the property will be null","properties":{"457":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"401k":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"401k_roth":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"401k_loan":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"403b":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"403b_roth":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"457_roth":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"s125_medical":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"s125_dental":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"s125_vision":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"hsa_pre":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"hsa_post":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"fsa_medical":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"fsa_dependent_care":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"simple_ira":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"simple":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"commuter":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"custom_post_tax":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"},"custom_pre_tax":{"$ref":"#/components/schemas/BenefitFeaturesAndOperations"}},"additionalProperties":false},"AuthenticationMethod":{"type":"object","properties":{"type":{"type":"string","description":"The type of authentication method.","enum":["assisted","credential","api_token","api_credential","oauth"]},"benefits_support":{"$ref":"#/components/schemas/BenefitsSupport"},"supported_fields":{"$ref":"#/components/schemas/SupportedFields"}}},"SupportedFields":{"type":"object","description":"The supported data fields returned by our HR and payroll endpoints","properties":{"company":{"$ref":"#/components/schemas/SupportedCompanyFields"},"directory":{"$ref":"#/components/schemas/SupportedDirectoryFields"},"individual":{"$ref":"#/components/schemas/SupportedIndividualFields"},"employment":{"$ref":"#/components/schemas/SupportedEmploymentFields"},"payment":{"$ref":"#/components/schemas/SupportedPaymentFields"},"pay_statement":{"$ref":"#/components/schemas/SupportedPayStatementFields"}},"nullable":true},"SupportedCompanyFields":{"type":"object","properties":{"id":{"type":"boolean"},"legal_name":{"type":"boolean"},"entity":{"type":"object","properties":{"type":{"type":"boolean"},"subtype":{"type":"boolean"}}},"primary_email":{"type":"boolean"},"primary_phone_number":{"type":"boolean"},"ein":{"type":"boolean"},"accounts":{"type":"object","properties":{"routing_number":{"type":"boolean"},"account_name":{"type":"boolean"},"institution_name":{"type":"boolean"},"account_type":{"type":"boolean"},"account_number":{"type":"boolean"}}},"departments":{"type":"object","properties":{"name":{"type":"boolean"},"parent":{"type":"object","properties":{"name":{"type":"boolean"}}}}},"locations":{"type":"object","properties":{"line1":{"type":"boolean"},"line2":{"type":"boolean"},"city":{"type":"boolean"},"state":{"type":"boolean"},"postal_code":{"type":"boolean"},"country":{"type":"boolean"}}}}},"SupportedDirectoryFields":{"type":"object","properties":{"paging":{"type":"object","properties":{"count":{"type":"boolean"},"offset":{"type":"boolean"}}},"individuals":{"type":"object","properties":{"id":{"type":"boolean"},"first_name":{"type":"boolean"},"middle_name":{"type":"boolean"},"last_name":{"type":"boolean"},"is_active":{"type":"boolean"},"department":{"type":"boolean"},"manager":{"type":"object","properties":{"id":{"type":"boolean"}}}}}}},"SupportedIndividualFields":{"type":"object","properties":{"id":{"type":"boolean"},"first_name":{"type":"boolean"},"middle_name":{"type":"boolean"},"last_name":{"type":"boolean"},"preferred_name":{"type":"boolean"},"dob":{"type":"boolean"},"gender":{"type":"boolean"},"ethnicity":{"type":"boolean"},"ssn":{"type":"boolean"},"encrypted_ssn":{"type":"boolean"},"emails":{"type":"object","properties":{"data":{"type":"boolean"},"type":{"type":"boolean"}}},"phone_numbers":{"type":"object","properties":{"data":{"type":"boolean"},"type":{"type":"boolean"}}},"residence":{"type":"object","properties":{"city":{"type":"boolean"},"country":{"type":"boolean"},"line1":{"type":"boolean"},"line2":{"type":"boolean"},"postal_code":{"type":"boolean"},"state":{"type":"boolean"}}}}},"SupportedEmploymentFields":{"type":"object","properties":{"id":{"type":"boolean"},"first_name":{"type":"boolean"},"middle_name":{"type":"boolean"},"last_name":{"type":"boolean"},"title":{"type":"boolean"},"start_date":{"type":"boolean"},"end_date":{"type":"boolean"},"is_active":{"type":"boolean"},"income_history":{"type":"boolean"},"class_code":{"type":"boolean"},"custom_fields":{"type":"boolean"},"department":{"type":"object","properties":{"name":{"type":"boolean"}}},"employment":{"type":"object","properties":{"type":{"type":"boolean"},"subtype":{"type":"boolean"}}},"income":{"type":"object","properties":{"amount":{"type":"boolean"},"currency":{"type":"boolean"},"unit":{"type":"boolean"}}},"location":{"type":"object","properties":{"line1":{"type":"boolean"},"line2":{"type":"boolean"},"city":{"type":"boolean"},"state":{"type":"boolean"},"postal_code":{"type":"boolean"},"country":{"type":"boolean"}}},"manager":{"type":"object","properties":{"id":{"type":"boolean"}}}}},"SupportedPaymentFields":{"type":"object","properties":{"id":{"type":"boolean"},"pay_date":{"type":"boolean"},"debit_date":{"type":"boolean"},"company_debit":{"type":"boolean"},"gross_pay":{"type":"boolean"},"net_pay":{"type":"boolean"},"employer_taxes":{"type":"boolean"},"employee_taxes":{"type":"boolean"},"individual_ids":{"type":"boolean"},"pay_period":{"type":"object","properties":{"start_date":{"type":"boolean"},"end_date":{"type":"boolean"}}}}},"SupportedPayStatementFields":{"type":"object","properties":{"paging":{"type":"object","properties":{"count":{"type":"boolean"},"offset":{"type":"boolean"}},"required":["count","offset"]},"pay_statements":{"type":"object","properties":{"individual_id":{"type":"boolean"},"type":{"type":"boolean"},"payment_method":{"type":"boolean"},"total_hours":{"type":"boolean"},"gross_pay":{"type":"boolean"},"net_pay":{"type":"boolean"},"earnings":{"type":"object","properties":{"type":{"type":"boolean"},"name":{"type":"boolean"},"amount":{"type":"boolean"},"currency":{"type":"boolean"}}},"employee_deductions":{"type":"object","properties":{"name":{"type":"boolean"},"amount":{"type":"boolean"},"type":{"type":"boolean"},"pre_tax":{"type":"boolean"},"currency":{"type":"boolean"}}},"employer_contributions":{"type":"object","properties":{"name":{"type":"boolean"},"amount":{"type":"boolean"},"currency":{"type":"boolean"}}},"employer_deductions":{"type":"object","deprecated":true,"description":"[DEPRECATED] Use `employer_contributions` instead","properties":{"name":{"type":"boolean"},"amount":{"type":"boolean"},"currency":{"type":"boolean"}}},"taxes":{"type":"object","properties":{"type":{"type":"boolean"},"name":{"type":"boolean"},"employer":{"type":"boolean"},"amount":{"type":"boolean"},"currency":{"type":"boolean"}}}}}}},"OperationSupport":{"type":"string","enum":["supported","not_supported_by_finch","not_supported_by_provider","client_access_only"],"description":"- `supported`: This operation is supported by both the provider and Finch\n- `not_supported_by_finch`: This operation is not supported by Finch but supported by the provider\n- `not_supported_by_provider`: This operation is not supported by the provider, so Finch cannot support\n- `client_access_only`: This behavior is supported by the provider, but only available to the client and not to Finch"},"OperationSupportMatrix":{"type":"object","properties":{"create":{"$ref":"#/components/schemas/OperationSupport"},"update":{"$ref":"#/components/schemas/OperationSupport"},"delete":{"$ref":"#/components/schemas/OperationSupport"},"read":{"$ref":"#/components/schemas/OperationSupport"}}},"SupportPerBenefitType":{"title":"SupportPerBenefitType","type":"object","properties":{"company_benefits":{"$ref":"#/components/schemas/OperationSupportMatrix"},"individual_benefits":{"$ref":"#/components/schemas/OperationSupportMatrix"}}},"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."}},"x-examples":{"not-found-error":{"code":404,"name":"not_found_error","finch_code":"individual_not_found","message":"Individual not found for benefit"}}}},"requestBodies":{"Individual-Ids":{"content":{"application/json":{"schema":{"type":"object","description":"Individual Ids Request Body","properties":{"requests":{"type":"array","description":"The array of batch requests.","items":{"type":"object","properties":{"individual_id":{"type":"string","description":"A stable Finch `id` (UUID v4) for an individual in the company. There is no limit to the number of `individual_id` to send per request. It is preferantial to send all ids in a single request for Finch to optimize provider rate-limits."}},"required":["individual_id"]}}},"required":["requests"]}}}},"Individual":{"content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"individual_id":{"type":"string"}}}},"options":{"type":"object","nullable":true,"properties":{"include":{"type":"array","items":{"type":"string"}}}}}}}}},"Forward":{"content":{"application/json":{"schema":{"type":"object","description":"Forward Request Body","properties":{"method":{"type":"string","description":"The HTTP method for the forwarded request. Valid values include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`."},"route":{"type":"string","description":"The URL route path for the forwarded request. This value must begin with a forward-slash ( / ) and may only contain alphanumeric characters, hyphens, and underscores."},"headers":{"type":"object","description":"The HTTP headers to include on the forwarded request. This value must be specified as an object of key-value pairs. Example: `{\"Content-Type\": \"application/xml\", \"X-API-Version\": \"v1\" }`","nullable":true},"params":{"type":"object","description":"The query parameters for the forwarded request. This value must be specified as a valid JSON object rather than a query string.","nullable":true},"data":{"type":"string","description":"The body for the forwarded request. This value must be specified as either a string or a valid JSON object.","nullable":true}},"required":["method","route"]},"examples":{"Sample":{"value":{"method":"POST","route":"/people/search","headers":{"content-type":"application/json"},"params":{"showInactive":true,"humanReadable":true},"data":null}}}}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Please use your Access Token"},"basicAuth":{"type":"http","scheme":"basic","description":"Please use base64 encoded client_id:client_secret"}},"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 "}}}}