Skip to main content

Introduction

The import feature is the only way to create and update user-locations. This guide explains how to achieve this, through four steps:
1

Format Your CSV File

Make sure your file conforms to the expected CSV formatting.
2

Analyze Your CSV File

Check if there’s any error with your CSV file by uploading it with the ?create=false query parameter.
3

Import Your File

Once there’s no more errors, then your may upload it for processing with the ?create=true query parameter.
4

Track The Import Progress

Import may take a while depending on the number of rows, you can poll for its progress through the API.
You need to give your API key the Import schedule permission in Lucca Office.

1. Format Your CSV File

UTF-8 encoded

The CSV file must be UTF-8 encoded (with BOM).

Semi-colon column divider

The expected divider between columns is a semi-colon character ”;”. Make sure to escape this character in cell values.
Here are the available columns:
Make sure to include the exact column headers in the first row of your CSV, as these are used for identification.
As a result, you’ll obtain one row per day or half-day of each employee.
Please note:
  • the login can be found by using the Users or Employee API endpoints.
  • workLocationName and areaName can be found by using Work-locations API.

2. Upload Your File For Analysis

The server will respond with a summaryId, make sure to keep a note of it, you’ll need it. For example, you can use it to track the progress of the analysis:
Once processing is done, you may retrieve the analysis results, which are comprised of:
  • Errors: these will block any proper import and thus must be fixed.
  • Warnings: point out minor inconsistencies in the corresponding rows, but they can still be imported successfully.

3. Process Import

Please note that an import, once launched, cannot be undone.
The actual import processing is triggered in the same way as the analysis. The only difference being the ?create=true query parameter. Feel free to set the overrideUserLocations query parameter to true if you want to replace existing User Locations.
Make sure to keep the summaryId returned by the server.
Once processing is done, you may retrieve the results, which are comprised of:
  • Errors indicate lines were not imported.
  • Warnings point out minor inconsistencies in the corresponding rows, but still, they were imported successfully.
Other rows were processed successfully (creations, updates or even deletions).