v1

latestOpenAPI 3.1.0Apache 2.02026-07-22160175414.0 KB
Imports

Import entitlements

Import entitlements credits leave accounts by adding the values provided in the import file to the employees' existing balances. Each value in the file is treated as a new credit entry, increasing the current entitlement total. This operation generates new accounting entries of type "entitlements import". It corresponds to the "Entitlements import" feature in the Lucca Absences UI. See the Entitlements imports guide to understand the differences with Replace entitlements.

Supported file formats:

  • CSV
    • "UTF-8" encoding
    • separator “;”
  • XSLX

Columns to fill in:

Column nameDescription
LegalEntityCodeEmployee legal entity code.
EmployeeNumberEmployee payroll number.
LastNameLast name.
FirstNameFirst name.
Account number or name (one column per account)Value to import for the account defined in the header.

Remark: A template file can be downloaded from the import page (Credit / Debit> A group of collaborators> File import).

In the event of a malformed (or unrecognized) file, no data will be imported; the problems detected will be specified in the globalErrors field.

If successful, the number of imported lines is indicated by the “successLinesCount” field; the lines in error are detailed in the lineErrors field.

Remarks: Any import made by the API is of course available in the import history. A simulation returns the same level of information, but does not trigger an import

List of errors handled

Here is the list of fatal errors, which can be returned in the globalErrors:

  • Unauthorized
  • FileEmpty,
  • FileExtensionNotSupported,
  • ColumnsFormatNotSupported,
  • AccountColumnMissing,
  • ColumnNamesDistinct,
  • LineErrorForbiddenInStrictMode,

The list of line processing errors, which can be restored in the lineErrors:

  • AccountNotFound,
  • AccountsNotFound,
  • AccountColumnsProcessing,
  • LegalEntityCodesNotFound,
  • MissingValuesForAccount,
  • AccountNotAvailableForUser,
  • LegalEntityCodeRequired,
  • EmployeeNumberRequired,
  • LoginRequired,
  • LoginNotFound,
  • AccountNumberRequired,
  • LegalEntityNotFound,
  • EmployeeNumberNotExist,
  • EmployeeNumberNotInLegalEntity,
  • FistNameAndLastNameNotMatching,
  • FistNameNotMatching,
  • LastLameNotMatching,
  • FistNameAndLastNameNotMatchingEmployeeNumber,
  • FistNameNotMatchingEmployeeNumber,
  • LastLameNotMatchingEmployeeNumber,
  • FistNameAndLastNameNotMatchingLogin,
  • FistNameNotMatchingLogin,
  • LastLameNotMatchingLogin,
  • DuplicatedLine,
  • AmbiguousLegalEntity,
  • ColumnNotExists,
  • LegalEntityNameNotAvailable,
  • AccountNameNotUnique

The list of import generation errors:

  • UnableToCreditAccount
post/timmi-absences/api/public/services/v1.0/leaveEntitlementsImport

Query parameters

strictboolean

In strict mode, if the import has errors, nothing is imported. Without strict mode, the lines in error are ignored and those in success are imported.

simulateboolean

Allows you to simulate the import. In this case, the response indicates the theoretical result of the import without any data being recorded.

Response

Example response

successLinesCountinteger
globalErrorsobject
lineErrorsobject