> For the complete documentation index, see [llms.txt](https://mobilic.gitbook.io/api-english-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobilic.gitbook.io/api-english-doc/export-c1b.md). Agents can also search and read this documentation through its [MCP server](https://mobilic.gitbook.io/api-english-doc/~gitbook/mcp).

# Export C1B

Generation of C1B files containing employee activity data

## API REST

To export employee activity data for a company in C1B format, use the following REST API :&#x20;

```
POST /companies/generate_tachograph_files
Content-Type: application/json

{
  "company_ids": [1],
  "user_ids": [100],
  "min_date": "2021-12-16",
  "max_date": "2022-02-14",
  "with_digital_signatures": false,
  "employee_version": false
}
```

### Authentification

In order to use this API, you must be authenticated : [Authentification](https://mobilic.gitbook.io/api-english-doc/guides/authentification.md).

### Query

<table><thead><tr><th width="175">Field</th><th width="284.48837209302326">Description</th><th width="178">Format</th><th>Mandatory</th></tr></thead><tbody><tr><td><code>company_ids</code></td><td>Companies for which we want to export data</td><td>List of company IDs</td><td>Yes</td></tr><tr><td><code>user_ids</code></td><td>Employees for whom we want to filter the data. By default, the data is brought up for all employees</td><td>List of employee IDs</td><td>No (by default: <code>[]</code>) </td></tr><tr><td><code>min_date</code></td><td>Start date of the desired period</td><td>Date in "YYYY-MM-dd" format</td><td>No</td></tr><tr><td><code>max_date</code></td><td>End date of the desired period</td><td>Date in "YYYY-MM-dd" format</td><td>No</td></tr><tr><td><code>with_digital_signatures</code></td><td>Allows digital signatures to be added to files to prove their integrity</td><td>Boolean</td><td>No (by default: <code>[]</code>) </td></tr><tr><td><code>employee_version</code></td><td>Allows to add employee version to the files</td><td>Boolean</td><td>No (by default: <code>false</code>) </td></tr></tbody></table>

### Response

If successful, the API returns a ZIP file :&#x20;

```
HTTP/1.1 200 OK
Content-Disposition: attachment; filename=fichiers_C1B.zip
Content-Type: application/zip
Content-Length: ...
```

### Error cases

<table><thead><tr><th width="440">Description</th><th>HTTP Status</th></tr></thead><tbody><tr><td>No authentication token</td><td>401 Unauthorized</td></tr><tr><td>The authentication token does not correspond to one of the companies entered</td><td>403 Forbidden</td></tr><tr><td>The request is ill-formed (details are in the body of the response)</td><td>404 Bad request</td></tr></tbody></table>
