# Widget analytics

Daily views per widget

Endpoint: `https://api.bookingmood.com/v1/widget_analytics`, supporting `GET`. Authenticate with the header `Authorization: Bearer YOUR_API_KEY` (see [authentication](https://www.bookingmood.com/hu-HU/api-reference/authentication.md)).

## The widget analytic object

| Attribute | Type | Description |
| --- | --- | --- |
| `organization_id` | `uuid` | Identifier of the organization the widget is defined in. |
| `widget_id` | `uuid` | Identifier of the viewed widget. |
| `date` | `date` | Date of the views. |
| `views` | `integer` | Number of views on the date. |

```json
{
  "organization_id": "00000000-0000-0000-0000-000000000000",
  "widget_id": "00000000-0000-0000-0000-000000000000",
  "date": "2026-10-30",
  "views": 1
}
```

## List widget analytics

`GET /v1/widget_analytics`

Filter on any attribute with `column=operator.value` (see [filtering](https://www.bookingmood.com/hu-HU/api-reference/filtering.md)). Choose columns and embed related resources with `select` (see [selecting](https://www.bookingmood.com/hu-HU/api-reference/selecting.md)), and sort and paginate with `order`, `limit` and `offset` (see [sorting and pagination](https://www.bookingmood.com/hu-HU/api-reference/sorting-pagination.md)).

```bash
curl -X GET "https://api.bookingmood.com/v1/widget_analytics?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Responses:

- `200`: A list of widget analytics with the selected columns. `206` when the list is a partial range.
- `400`: The request is malformed, for example an unknown column or an invalid filter.
- `401`: The API key is missing or invalid.

Errors have a JSON body with a `code`, `message`, `details` and `hint`. See the [introduction](https://www.bookingmood.com/hu-HU/api-reference.md) for more on errors. The full API is described by the OpenAPI spec at https://api.bookingmood.com/v1/openapi.json.
