PayFit API Integration

These are the list of integration use cases supported by Knit for PayFit API as part of the HRIS category


Get All Contracts for a Company

  • ID: get_all_contracts_for_a_company
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves all contracts for a specified company. The list of contracts is paginated. The request requires the company ID as a path parameter. Optional query parameters include 'nextPageToken' for pagination, 'maxResults' to specify the maximum number of items to fetch (default is 10, maximum is 50), and 'includeInProgressContracts' to include contracts that are in progress or in creation. The response includes a list of contracts with details such as contract ID, company ID, start and end dates, job name, status, and collaborator ID. The response also includes pagination metadata.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Auto Enrolment Documents for UK Companies

  • ID: get_auto_enrolment_documents_for_uk_companies
  • Operation: read
  • Entities: document, contract, company
  • Summary: This API endpoint retrieves all documents related to auto enrolment for UK companies. It requires the company ID as a path parameter. The response includes an array of documents, each with details such as document ID, creation date, contract ID, legal year and month, and a URL to download the document. The API returns various error responses for bad requests, unauthorized access, forbidden actions, and not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Collaborator by ID

  • ID: get_collaborator_by_id
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves a collaborator's details by their ID. It requires the company ID and collaborator ID as path parameters. The request must include an 'accept' header with the value 'application/json'. The response includes detailed information about the collaborator, such as their name, birth date, gender, nationality, contact information, and contracts. The API also handles various error responses, including 400 Bad Request, 401 Unauthorized, 403 Forbidden, and 404 Not Found, each providing a human-readable error message.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Collaborator Details by ID

  • ID: get_collaborator_details_by_id
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves the details of a collaborator by their ID. It requires the company ID and collaborator ID as path parameters. The request must include an 'accept' header specifying 'application/json'. The response includes detailed information about the collaborator, such as their name, birth date, gender, nationality, contact information, and contract details. The API also handles various error responses, including 400 Bad Request, 401 Unauthorized, 403 Forbidden, and 404 Not Found, each providing a human-readable error message.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Collaborator's Payslip

  • ID: get_collaborator_payslip
  • Operation: read
  • Entities: collaborator, company, payslip
  • Summary: This API endpoint retrieves a collaborator's payslip in PDF format. It requires the company ID, collaborator ID, contract ID, and payslip ID as path parameters. The request must include an 'accept' header with the value 'application/pdf'. The response is a PDF file if successful (HTTP 200). In case of errors, it returns JSON error messages with appropriate HTTP status codes such as 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), and 404 (Not Found).
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Collaborator Payslips

  • ID: get_collaborator_payslips
  • Operation: read
  • Entities: collaborator, company, payslip
  • Summary: This API endpoint retrieves all the payslips of a specific collaborator identified by their ID within a company. The request requires the company ID and collaborator ID as path parameters. The response includes an array of payslip objects, each containing details such as the year, month, contract ID, payslip ID, and a URL to retrieve the payslip file. The API returns various error responses for bad requests, unauthorized access, forbidden actions, and not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Collaborators Meal Vouchers

  • ID: get_collaborators_meal_vouchers
  • Operation: read
  • Entities: collaborator, meal voucher, company
  • Summary: This API endpoint retrieves all collaborators' meal vouchers for a specified month for a given company. The request requires the company ID as a path parameter and the date in YYYYMM format as a query parameter. Optional query parameters include nextPageToken for pagination and maxResults to limit the number of items fetched at once. The response includes a list of meal vouchers with details such as collaborator ID, voucher count, voucher amount, day-off eligibility, and company and employee part amounts. The response also includes metadata for pagination.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Collaborators of a Company

  • ID: get_collaborators_of_a_company
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves the list of collaborators for a specified company. The list is paginated and can be filtered using various query parameters. The required path parameter is 'companyId', which specifies the company whose collaborators are to be retrieved. Optional query parameters include 'nextPageToken' for pagination, 'maxResults' to limit the number of results (default is 10, maximum is 50), 'includeInProgressContracts' to include contracts that are in progress, and 'email' to filter collaborators by email. The response includes a list of collaborators with detailed information such as personal details, contact information, and contract details. The API returns different status codes for various outcomes, including 200 for success, 400 for bad requests, 401 for unauthorized access, 403 for forbidden actions, and 404 for not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Company Absences

  • ID: get_company_absences
  • Operation: read
  • Entities: absence, contract, company
  • Summary: This API endpoint retrieves the absences of a specified company. The list of absences is paginated and can be filtered using query parameters such as contractId. The request requires the companyId as a path parameter and accepts optional query parameters like nextPageToken for pagination and maxResults to limit the number of items fetched at once. The response includes a list of absences with details such as absence ID, contract ID, start and end dates, and absence type. The API also handles various error responses including 400 Bad Request, 401 Unauthorized, 403 Forbidden, and 404 Not Found.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Company Accounting Data

  • ID: get_company_accounting_data
  • Operation: read
  • Entities: month, accounting, company
  • Summary: This API endpoint retrieves the accounting data of a specified company for a given month. The data is returned in CSV format. The request requires the company ID as a path parameter and the date in YYYYMM format as a query parameter. The response is a binary stream representing the CSV file. If the request is successful, a 200 status code is returned with the CSV data. Possible error responses include 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), and 404 (Not Found), each providing a JSON object with an error message and details.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Company Accounting Data for a Given Month

  • ID: get_company_accounting_data_for_a_given_month
  • Operation: read
  • Entities: company, employee, accounting data
  • Summary: This API endpoint retrieves the accounting data of a specified company for a given month. It is currently in beta and subject to changes, and is only available for companies in France and the UK. The endpoint requires the company ID as a path parameter and the date in YYYYMM format as a query parameter. The response includes detailed accounting entries such as operation date, analytic codes, employee full name, contract ID, account ID, account name, debit, and credit amounts. The data returned for French companies matches the automatic accounting exports, while for UK companies, it matches the automatic payroll journals. Proper configuration of company accounting exports or payroll journals is necessary to obtain detailed data.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Company Basic Information

  • ID: get_company_basic_information
  • Operation: read
  • Entities: error, contract, company
  • Summary: This API endpoint retrieves the basic information of a company using the company ID. The request is made using the GET method to the URL https://partner-api.payfit.com/companies/{companyId}. The only required path parameter is 'companyId', which is the unique identifier of the company. The response includes the company's ID, name, country, and the number of active contracts. Possible error responses include 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), and 404 (Not Found), each providing a human-readable error message and additional details if applicable.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Company Collaborators

  • ID: get_company_collaborators
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves the list of collaborators for a specified company. The list is paginated and can be filtered using various query parameters. The required path parameter is 'companyId', which specifies the company whose collaborators are to be retrieved. Optional query parameters include 'nextPageToken' for pagination, 'maxResults' to specify the number of items to fetch (default is 10, maximum is 50), 'includeInProgressContracts' to include contracts that are in progress, and 'email' to filter collaborators by email. The response includes detailed information about each collaborator, such as their ID, name, birth date, gender, nationality, and contract details. The response also includes metadata for pagination. Error responses include status codes 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), and 404 (Not Found), each with a descriptive error message.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Company Contracts

  • ID: get_company_contracts
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves all contracts for a specified company. The list of contracts is paginated. The request requires the company ID as a path parameter. Optional query parameters include 'nextPageToken' for pagination, 'maxResults' to specify the number of items to fetch (default is 10, maximum is 50), and 'includeInProgressContracts' to include contracts that are in progress or in creation. The response includes a list of contracts with details such as contract ID, company ID, start and end dates, job name, status, and collaborator ID. The response also includes pagination metadata.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Company Document

  • ID: get_company_document
  • Operation: read
  • Entities: document, company
  • Summary: This API endpoint retrieves a specific document for a company using the company ID and document ID as path parameters. The request must include an 'accept' header specifying 'application/pdf' to receive the document in PDF format. The response will be the binary data of the document if successful (HTTP 200). If there are errors, such as a bad request, unauthorized access, forbidden action, or resource not found, the API will return an appropriate error message with HTTP status codes 400, 401, 403, or 404 respectively.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Contract Information by ID

  • ID: get_contract_information_by_id
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves contract information by its ID. It requires the company ID and contract ID as path parameters. The request must include an 'accept' header specifying 'application/json'. The response includes detailed contract information such as contract ID, company ID, start date, job name, status, and collaborator ID. It also provides time-related information if the appropriate scope is set. Possible response codes include 200 for success, 400 for bad request, 401 for unauthorized access, 403 for forbidden action, and 404 for resource not found.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get French Company Information

  • ID: get_french_company_information
  • Operation: read
  • Entities: error, contract, company
  • Summary: This API endpoint retrieves the basic information of a company with French-specific data. It requires the 'companyId' as a path parameter to identify the company. The response includes details such as the company's ID, name, country, number of active contracts, SIREN, SIRET, address, city, postal code, and health insurance proration method. The API returns various HTTP status codes, including 200 for a successful response, 400 for a bad request, 401 for unauthorized access, 403 for forbidden actions, and 404 if the resource is not found.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get French Contract Information by ID

  • ID: get_french_contract_information_by_id
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves detailed information about a specific French contract by its ID. It requires the company ID and contract ID as path parameters. The response includes various details about the contract such as the contract ID, company ID, collaborator ID, job name, start and end dates, status, weekly hours, and other French-specific contract details. The API returns a 200 status code with the contract details if successful, or error codes 400, 401, 403, or 404 with corresponding error messages if there are issues with the request.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get French Specific Contracts for a Company

  • ID: get_french_specific_contracts_for_a_company
  • Operation: read
  • Entities: collaborator, contract, company
  • Summary: This API endpoint retrieves all contracts with French-specific data for a given company. The endpoint is paginated and allows filtering by various query parameters. The required path parameter is 'companyId', which specifies the company for which contracts are being retrieved. Optional query parameters include 'nextPageToken' for pagination, 'maxResults' to limit the number of results returned (default is 10, maximum is 50), 'fields' to specify additional fields (deprecated), and 'includeInProgressContracts' to include contracts that are in progress. The response includes detailed information about each contract, such as contract ID, company ID, job name, start and end dates, status, and various French-specific contract details. The response also includes pagination metadata.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Health Insurance Contracts

  • ID: get_health_insurance_contracts
  • Operation: read
  • Entities: health insurance contract, employee, company
  • Summary: This API endpoint retrieves all health insurance contracts for a specified company. The request requires the 'companyId' as a path parameter, which is the unique identifier of the company. The request must include an 'accept' header with the value 'application/json'. The response will include a list of health insurance contracts, each with details such as the contract ID, reference, population code, option code, affiliated contract IDs, computation type, contribution base, and contribution rates supported by both employer and employee. The API can return various error responses, including 400 for bad requests, 401 for unauthorized access, 403 for forbidden actions, and 404 for not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Income Taxes Documents for UK Companies

  • ID: get_income_taxes_documents_for_uk_companies
  • Operation: read
  • Entities: document, contract, company
  • Summary: This API endpoint retrieves all documents related to income taxes (P45, P60, P11D) for UK companies. The request requires the company ID as a path parameter. The response includes an array of documents, each with details such as document ID, creation date, contract ID, type, year, month, and a URL to download the document. The API returns various error codes for bad requests, unauthorized access, forbidden actions, and not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Payment File Payroll for a Company

  • ID: get_payment_file_payroll_for_a_company
  • Operation: read
  • Entities: payment file, payroll, company
  • Summary: This API endpoint retrieves the payment file payroll for a specified company and month. The request requires the company ID as a path parameter and the date in YYYYMM format as a query parameter. The response is a binary file representing the payment file payroll. If the request is successful, a 200 status code is returned with the binary data. In case of errors, appropriate error messages and status codes (400, 401, 403, 404) are returned in JSON format.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Payment File Payroll for Company

  • ID: get_payment_file_payroll_for_company
  • Operation: read
  • Entities: payment file, payroll, company
  • Summary: This API endpoint retrieves the payment file payroll for a specified company and month. The request requires the company ID as a path parameter and the date in YYYYMM format as a query parameter. The response is a binary file representing the payment file if successful. In case of errors, it returns a JSON object with error details. Possible error responses include 400 for bad requests, 401 for unauthorized access, 403 for forbidden actions, and 404 for not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Payroll Status for a Given Pay Period

  • ID: get_payroll_status_for_a_given_pay_period
  • Operation: read
  • Entities: payroll status, company, pay period
  • Summary: This API endpoint retrieves the payroll status for a specified company and pay period. The request requires the company ID as a path parameter and the date in YYYYMM format as a query parameter. The response includes the payroll status, which can be 'completed' or 'not_completed', and the execution end date of the last payroll for the given month. The API returns various error codes for bad requests, unauthorized access, forbidden actions, and not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Provident Fund Contracts

  • ID: get_provident_fund_contracts
  • Operation: read
  • Entities: provident fund contract, employee, company
  • Summary: This API endpoint retrieves all Provident Fund contracts for a specified company. The request requires the 'companyId' as a path parameter to identify the company. The response includes an array of contracts, each with details such as 'idContrat', 'refContrat', 'codePopulation', 'codeOption', 'affiliatedContractIds', 'modeCalculCotisation', and 'baseDeCotisation'. The API returns various HTTP status codes, including 200 for success, 400 for bad requests, 401 for unauthorized access, 403 for forbidden actions, and 404 for not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Worked Time for Contracts

  • ID: get_worked_time_for_contracts
  • Operation: read
  • Entities: contract, company, time
  • Summary: This API endpoint retrieves the worked time for every contract for a specified pay period for a given company. The endpoint is paginated and allows for specifying the maximum number of items to fetch at once, with a default of 10 and a maximum of 50. The required path parameter is 'companyId', which identifies the company. The required query parameter is 'date', which specifies the month in the format YYYYMM. Optional query parameters include 'nextPageToken' for pagination and 'maxResults' to define the number of items to fetch. The response includes a list of contracts with details such as 'effectiveWorkedTime', 'payedWorkedTime', and 'workTimeUnit'. The API is currently available only for French companies.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Collaborator

  • ID: post_create_a_collaborator
  • Operation: write
  • Entities: collaborator, contract, company
  • Summary: This API endpoint allows the creation of a collaborator for a specified company. The collaborator is created without a contract and will not appear in the PayFit app's collaborators list. To create a contract, a separate endpoint must be used. The request requires the company ID as a path parameter and a JSON body containing the collaborator's first name, last name, personal email, and personal address. The response returns the collaborator's ID upon successful creation. Error responses include 400 for bad requests, 401 for unauthorized access, 403 for forbidden actions, and 404 for not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Basic Contract for a Collaborator

  • ID: post_create_basic_contract_for_collaborator
  • Operation: write
  • Entities: collaborator, contract, company
  • Summary: This API endpoint allows the creation of a basic contract for a collaborator within a specified company. The contract is not finalized upon creation, and the employee will not be available for payroll until their information is completed by an admin in the PayFit app. It is recommended to avoid creating multiple contracts for an employee during the initialization phase to prevent confusion. The API is currently available only for France, with plans to expand to Spain and the United Kingdom. The request requires the company ID and collaborator ID as path parameters, and a JSON body containing the job title and start date of the contract. The response does not return data upon successful creation but may return error messages for bad requests, unauthorized access, forbidden actions, or not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create Billing Declaration for Partner Company

  • ID: post_create_billing_declaration_for_partner_company
  • Operation: write
  • Entities: billing declaration, employee, company
  • Summary: This API endpoint allows partners to create a billing declaration for a specific company. The request requires the company ID as a path parameter and a JSON body containing the number of employees per product and the month of application in the format YYYYMM. The response can be a successful creation with a 204 status code or various error messages with corresponding status codes such as 400 for bad requests, 401 for unauthorized access, 403 for forbidden actions, and 404 for not found resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create Collaborator

  • ID: post_create_collaborator
  • Operation: write
  • Entities: collaborator, contract, company
  • Summary: This API endpoint allows the creation of a collaborator for a specified company. The collaborator is created without a contract and will not appear in the PayFit app's collaborators list. To create a contract, a separate endpoint must be used. The request requires the company ID as a path parameter and a JSON body containing the collaborator's first name, last name, personal email, and personal address. The response will return the ID of the created collaborator if successful. Possible error responses include 400 Bad Request, 401 Unauthorized, 403 Forbidden, and 404 Not Found.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create or Update Health Insurance Contracts for a Company

  • ID: post_create_or_update_health_insurance_contracts
  • Operation: write
  • Entities: health insurance contract, company, setup sheet
  • Summary: This API allows specific partners to create or update health insurance contracts for French companies by submitting setup sheets. The setup sheets are documents sent to 'net-entreprises.fr' when new health insurance or prevoyance contracts are available. The API requires the company ID as a path parameter and accepts PDF and XML files as multipart/form-data in the request body. The response can be a success message with a 201 status code or various error messages with status codes 400, 401, 403, or 404, each providing a human-readable error description and additional details.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Request Regularization for Late Affiliation in PayFit

  • ID: post_request_regularization_for_late_affiliation_in_payfit
  • Operation: write
  • Entities: contract, company, regularization
  • Summary: This API endpoint allows PayFit partners to request a regularization in case an affiliation was applied too late. The endpoint requires the company ID and contract ID as path parameters. The request body must include an array of health insurance contract IDs and an effective date. The response can be a 204 No Content for successful requests, or various error responses such as 400 Bad Request, 401 Unauthorized, 403 Forbidden, and 404 Not Found, each with a human-readable error message.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Affiliation of a Provident Fund to an Employee Contract

  • ID: put_affiliation_of_a_provident_fund_to_an_employee_contract
  • Operation: write
  • Entities: provident fund, contract, company
  • Summary: This API endpoint allows the affiliation of a provident fund to an employee contract. It requires the company ID and contract ID as path parameters. The request body must include an array of provident fund contract IDs. The API returns a 204 status code with no content on success. In case of errors, it returns appropriate error messages with status codes 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), and 404 (Not Found).
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Affiliation of Health Insurance to Employee Contract

  • ID: put_affiliation_of_health_insurance_to_employee_contract
  • Operation: write
  • Entities: contract, company, health insurance
  • Summary: This API endpoint allows the affiliation of a health insurance to an employee contract. It requires the company ID and contract ID as path parameters. The request body must include an array of health insurance contract IDs. The endpoint returns no data on a successful request (HTTP 204). Possible error responses include 400 Bad Request, 401 Unauthorized, 403 Forbidden, and 404 Not Found, each providing a human-readable error message and additional details if applicable.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Affiliation of Provident Fund to Employee Contract

  • ID: put_affiliation_of_provident_fund_to_employee_contract
  • Operation: write
  • Entities: provident fund, contract, company
  • Summary: This API endpoint allows the affiliation of a provident fund to an employee contract. It requires the company ID and contract ID as path parameters. The request body must include an array of provident fund contract IDs. The API returns a 204 status code with no content on success. In case of errors, it returns appropriate error messages with status codes 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), and 404 (Not Found).
  • Input Fields: Input Fields
  • Output Fields: Output Fields