# PayFit

> Read PayFit company, employee, contract, absence and payroll records.

App · 15 actions. Web page: https://docs.lodol.com/docs/integrations/payfit

## Actions

### Get accounting data

Get accounting data from PayFit. France only.

**Inputs**

- Date (`date`, date, required): Choose any date in the payroll month to fetch.

**Outputs**

- `data` (list): The response from PayFit.

**Example output**

```json
{
  "data": [
    {
      "accountId": "example",
      "accountName": "example",
      "analyticCodes": [
        {
          "code": "example",
          "type": "example",
          "value": "example"
        }
      ],
      "contractId": "example",
      "credit": 1,
      "debit": 1,
      "employeeFullName": "example",
      "operationDate": "example"
    }
  ]
}
```

### Get collaborator

Get collaborator from PayFit.

**Inputs**

- Collaborator ID (`collaborator_id`, text, required): The id of collaborator to fetch

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "birthDate": "example",
    "birthName": "example",
    "contracts": [
      {
        "endDate": "example",
        "id": "example",
        "startDate": "example",
        "status": "ACTIVE"
      }
    ],
    "countryOfBirth": "example",
    "firstName": "example",
    "gender": "example",
    "id": "example",
    "lastName": "example",
    "matricule": "example",
    "nationalIdentificationNumber": "example",
    "nationalIdentificationType": "example",
    "nationality": "example",
    "secondLastName": "example",
    "terminationDate": "example"
  }
}
```

### Get company

Get company from PayFit.

**Inputs**: None.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "address": "example",
    "city": "example",
    "country": "FR",
    "id": "example",
    "identificationNumber": "example",
    "name": "example",
    "nbActiveContracts": 1,
    "postalCode": "example"
  }
}
```

### Get contract

Get contract from PayFit.

**Inputs**

- Contract ID (`contract_id`, text, required): The id of the contract

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "collaboratorId": "example",
    "companyId": "example",
    "contractId": "example",
    "endDate": "example",
    "fullTimeEquivalent": 1,
    "isFullTime": true,
    "jobName": "example",
    "probationEndDate": "example",
    "standardWeeklyHours": 1,
    "startDate": "example",
    "status": "ACTIVE"
  }
}
```

### Get payroll status

Get payroll status from PayFit.

**Inputs**

- Date (`date`, date, required): Choose any date in the payroll month to fetch.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "executionEndDate": "example",
    "status": "completed"
  }
}
```

### List absences

List absences from PayFit.

**Inputs**

- Next page token (`next_page_token`, text): The encoded pagination token
- Max results (`max_results`, text): Allows to define the maximum number of items to fetch at once. (Max: 50, Default: 10). Default: `10`.
- Contract ID (`contract_id`, text): Filter by contractId.
- Status (`status`, text): Filter by status. Defaults to `approved`. Multiple statuses can be provided, separated by commas, for example `status=approved,pending_approval`. If `all` is provided, all absences will be returned, regardless of their status. Possible statuses are: - approved - pending_approval - declined - cancelled - pending_cancellation
- Begin date (`begin_date`, date): Defines the minimal begin date of absences to fetch. Every absences with params.beginDate <= absences.endDate will be included.
- End date (`end_date`, date): Defines the maximal end date of absences to fetch. Every absences with params.endDate >= absences.startDate will be included.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "absences": [
      {
        "contractId": "example",
        "endDate": {},
        "id": "example",
        "startDate": {},
        "status": "approved",
        "type": "fr_adoption"
      }
    ],
    "meta": {
      "count": 1,
      "nextPageToken": "example"
    }
  }
}
```

### List auto enrolment documents

List auto enrolment documents from PayFit. United Kingdom only.

**Inputs**: None.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "documents": [
      {
        "contractId": "example",
        "createdAt": "example",
        "documentId": "example",
        "documentUrl": "example",
        "month": "example",
        "year": "example"
      }
    ]
  }
}
```

### List collaborators

List collaborators from PayFit.

**Inputs**

- Next page token (`next_page_token`, text): The encoded pagination token
- Max results (`max_results`, text): Allows to define the maximum number of items to fetch at once. (Max: 50, Default: 10). Default: `10`.
- Email (`email`, text): Filter by email. Important note: only emails in the collaborator's contracts are used for the search, so you can't filter by the login email.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "collaborators": [
      {
        "birthDate": "example",
        "birthName": "example",
        "contracts": [
          {}
        ],
        "countryOfBirth": "example",
        "firstName": "example",
        "gender": "example",
        "id": "example",
        "lastName": "example",
        "matricule": "example",
        "nationalIdentificationNumber": "example",
        "nationalIdentificationType": "example",
        "nationality": "example",
        "secondLastName": "example",
        "terminationDate": "example"
      }
    ],
    "meta": {
      "count": 1,
      "nextPageToken": "example"
    }
  }
}
```

### List contracts

List contracts from PayFit.

**Inputs**

- Next page token (`next_page_token`, text): The encoded pagination token
- Max results (`max_results`, text): Allows to define the maximum number of items to fetch at once. (Max: 50, Default: 10). Default: `10`.
- Include in progress contracts (`include_in_progress_contracts`, text): Allow to returns the in progress contracts (or in creation). Default: `false`.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "contracts": [
      {
        "birthName": "example",
        "collaboratorId": "example",
        "companyId": "example",
        "contractId": "example",
        "endDate": "example",
        "firstName": "example",
        "fullTimeEquivalent": 1,
        "isFullTime": true,
        "jobName": "example",
        "lastName": "example",
        "probationEndDate": "example",
        "standardWeeklyHours": 1,
        "startDate": "example",
        "status": "ACTIVE"
      }
    ],
    "meta": {
      "count": 1,
      "nextPageToken": "example"
    }
  }
}
```

### List health insurance contracts

List health insurance contracts from PayFit. France only.

**Inputs**: None.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "contracts": [
      {
        "affiliatedContractIds": [
          "example"
        ],
        "baseDeCotisation": "example",
        "codeOption": "example",
        "codePopulation": "example",
        "idContrat": "example",
        "modeCalculCotisation": "example",
        "refContrat": "example",
        "tauxCotisationPatronale": 1,
        "tauxCotisationSalariale": 1
      }
    ]
  }
}
```

### List income tax documents

List income tax documents from PayFit. United Kingdom only.

**Inputs**: None.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "documents": [
      {
        "contractId": "example",
        "createdAt": "example",
        "documentId": "example",
        "documentUrl": "example",
        "month": "example",
        "type": "P60",
        "year": "example"
      }
    ]
  }
}
```

### List meal vouchers

List meal vouchers from PayFit. France only.

**Inputs**

- Date (`date`, date, required): Choose any date in the payroll month to fetch.
- Next page token (`next_page_token`, text): The encoded pagination token
- Max results (`max_results`, text): Allows to define the maximum number of items to fetch at once. (Max: 50, Default: 10). Default: `10`.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "mealVouchers": [
      {
        "collaboratorId": "example",
        "dayOffEligibility": true,
        "voucherAmount": 1,
        "voucherCompanyPartAmount": 1,
        "voucherEmployeePartAmount": 1,
        "vouchersCount": 1
      }
    ],
    "meta": {
      "count": 1,
      "nextPageToken": "example"
    }
  }
}
```

### List payslips

List payslips from PayFit.

**Inputs**

- Collaborator ID (`collaborator_id`, text, required): The id of collaborator to fetch payslips

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "payslips": [
      {
        "contractId": "example",
        "month": "example",
        "payslipId": "example",
        "payslipUrl": "example",
        "year": "example"
      }
    ]
  }
}
```

### List provident fund contracts

List provident fund contracts from PayFit. France only.

**Inputs**: None.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "contracts": [
      {
        "affiliatedContractIds": [
          "example"
        ],
        "baseDeCotisation": "example",
        "codeOption": "example",
        "codePopulation": "example",
        "idContrat": "example",
        "modeCalculCotisation": "example",
        "refContrat": "example"
      }
    ]
  }
}
```

### List worked time

List worked time from PayFit. France only.

**Inputs**

- Next page token (`next_page_token`, text): The encoded pagination token
- Max results (`max_results`, text): Allows to define the maximum number of items to fetch at once. (Max: 50, Default: 10). Default: `10`.
- Date (`date`, date, required): Choose any date in the payroll month to fetch.

**Outputs**

- `data` (object): The response from PayFit.

**Example output**

```json
{
  "data": {
    "contracts": [
      {
        "contractId": "example",
        "effectiveWorkedTime": 1,
        "payedWorkedTime": 1,
        "workTimeUnit": "days"
      }
    ],
    "meta": {
      "count": 1,
      "nextPageToken": "example"
    }
  }
}
```
