# GARDENA Data Act API

## Overview

This API allows you to request and download your GARDENA smart system data in compliance with the EU Data Act (Regulation (EU) 2023/2854).

## Authentication

All requests need to be issued using a valid access token obtained from the Authentication API. Send it in this header:

```
Authorization: Bearer <ACCESS TOKEN>
```

## Creating an Export Request

To export your data, you first need to create an export request. This will trigger an asynchronous job that prepares your data for download.

```
curl -X POST \
  https://api-eu-data-act.smart.gardena.dev/v1/export \
  -H 'Authorization: Bearer <ACCESS TOKEN>'
```

By default, the export contains all your data (`full` profile). To leave out data that identifies you or your garden location, send the optional field `export_profile` with the value `minimised`:

```
curl -X POST \
  https://api-eu-data-act.smart.gardena.dev/v1/export \
  -H 'Authorization: Bearer <ACCESS TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"export_profile": "minimised"}'
```

`export_profile` accepts `full` (default) or `minimised`. The `minimised` export leaves out:
- the garden maps
- the device names
- the mower position values
- other device data that identifies you or your location, for example serial numbers, IP addresses and the time zone

The file `export_metadata.json` in the export lists the left-out data. Any other value of `export_profile` gives a 400 response.

**Response (202 Accepted):**
```json
{
  "request_id": "29b1afaa-0aed-4f97-8290-a5da76c6ebfd",
  "timestamp": "2026-04-15T10:30:00.123456+00:00",
  "status_url": "https://api-eu-data-act.smart.gardena.dev/v1/export/29b1afaa-0aed-4f97-8290-a5da76c6ebfd"
}
```

**Rate Limits:** You can create one export request per 24 hours. Only successful exports count: if an export fails, you can create a new request at once. While an export is running, a new request is blocked. If you exceed this limit, subsequent requests will be blocked with a 429 "Too Many Requests" response status code.

## Checking Export Status

Use the `request_id` from the previous step to check the status of your export request:

```
curl -X GET \
  https://api-eu-data-act.smart.gardena.dev/v1/export/<REQUEST ID> \
  -H 'Authorization: Bearer <ACCESS TOKEN>'
```

**Response while processing:**
```json
{
  "request_id": "29b1afaa-0aed-4f97-8290-a5da76c6ebfd",
  "timestamp": "2026-04-15T10:35:00.123456+00:00",
  "state": "inprogress"
}
```

**Response when complete:**
```json
{
  "request_id": "29b1afaa-0aed-4f97-8290-a5da76c6ebfd",
  "timestamp": "2026-04-15T10:45:00.123456+00:00",
  "state": "complete",
  "download_url": "https://api-eu-data-act.smart.gardena.dev/v1/export/29b1afaa-0aed-4f97-8290-a5da76c6ebfd/download"
}
```

**Response when failed:**
```json
{
  "request_id": "29b1afaa-0aed-4f97-8290-a5da76c6ebfd",
  "timestamp": "2026-04-15T10:45:00.123456+00:00",
  "state": "failed",
  "error": "The export failed. Please create a new export request."
}
```

**Possible states:**
- `inprogress` - Export is being processed
- `complete` - Export is ready for download
- `failed` - Export failed (error details included)

## Downloading Your Data

Once the export is complete, download it using the provided download URL. The download URL redirects to a presigned URL. The presigned URL is valid for 15 minutes; call the download URL again to get a new one.

```
curl -X GET \
  https://api-eu-data-act.smart.gardena.dev/v1/export/<REQUEST ID>/download \
  -H 'Authorization: Bearer <ACCESS TOKEN>' \
  -L -o export.zip
```

The export is provided as a ZIP file containing your GARDENA smart system data.

## Errors

Error responses have a JSON body with an `error` field, for example `{"error": "Export request not found"}`.

| Status code | Meaning |
|---|---|
| 400 | The request is not valid: an invalid `export_profile` value or a `request_id` that is not a UUID. |
| 401 | The `Authorization` header is missing. |
| 403 | The access token is not valid, has expired, or does not have the required permissions. |
| 404 | The export request or the export file does not exist. |
| 429 | An export is still running, or your last successful export is less than 24 hours old. The error message tells you when you can create the next one. |

## Support

For additional information, see [release notes](https://developer.husqvarnagroup.cloud/apis/gardena-smart-system-eu-data-act-api?tab=release%20notes) for version history and changes.
