> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.theottoapp.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.theottoapp.com/_mcp/server.

# Get Events

GET https://api.theottoapp.com/events

Retrieve a paginated list of events for your organization.

Reference: https://api-docs.theottoapp.com/api-reference/events/get-events

## Request

### Query parameters

- `event_types` (list of integer, optional) — List of event type IDs to filter by.
- `locations` (list of integer, optional) — List of location IDs to filter by.
- `item` (integer, optional) — Item ID to filter events by.
- `limit` (integer, optional, default: 10) — Number of records to return per page.
- `page` (integer, optional, default: 1) — Page number to fetch.
- `include_child_locations` (boolean, optional, default: false) — Include events from child locations of the specified locations.
- `from_dtm` (datetime, optional) — Filter events starting on or after this ISO-8601 date-time.
- `to_dtm` (datetime, optional) — Filter events ending on or before this ISO-8601 date-time.
- `search` (string, optional) — Keyword search across event titles.

## Response

### 200

200 response

- `events` (list of EventsResponseEventsItems, optional)
- `meta` (EventsResponseMeta, optional)

## Types

### EventsResponseEventsItems

- `id` (integer, optional)
- `title` (string, optional)
- `from_dtm` (datetime, optional, nullable)
- `to_dtm` (datetime, optional, nullable)
- `all_day` (boolean, optional)
- `desc` (string, optional, nullable)
- `image_url` (string, optional, nullable)
- `event_data` (EventsResponseEventsItemsEventData, optional)
- `address_data` (EventsResponseEventsItemsAddressData, optional)
- `active` (boolean, optional)
- `location` (PublicAPILocation, optional, nullable)
- `event_type` (PublicAPIEventType, optional, nullable)
- `item` (EventsResponseEventsItemsItem, optional, nullable)

### EventsResponseMeta

- `total_rows` (integer, optional)
- `page` (integer, optional)
- `limit` (integer, optional)

### EventsResponseEventsItemsEventData

### EventsResponseEventsItemsAddressData

### PublicAPILocation

- `id` (integer, optional)
- `name` (string, optional)
- `full_name` (string, optional)
- `abbr_name` (string, optional)
- `address_1` (string, optional)
- `address_2` (string, optional)
- `city` (string, optional)
- `state_province` (string, optional)
- `postal_code` (string, optional)
- `country_code` (string, optional)
- `latitude` (string, optional)
- `longitude` (string, optional)

### PublicAPIEventType

- `id` (integer, required)
- `desc` (string, required)

### EventsResponseEventsItemsItem

- `id` (integer, optional)
- `name` (string, optional)
- `description` (string, optional)
- `image_url` (string, optional)

## Examples

**Response**

```json
{
  "events": [
    {
      "id": 1,
      "title": "string",
      "from_dtm": "2024-01-15T09:30:00Z",
      "to_dtm": "2024-01-15T09:30:00Z",
      "all_day": true,
      "desc": "string",
      "image_url": "string",
      "event_data": {},
      "address_data": {},
      "active": true,
      "location": {
        "id": 1,
        "name": "string",
        "full_name": "string",
        "abbr_name": "string",
        "address_1": "string",
        "address_2": "string",
        "city": "string",
        "state_province": "string",
        "postal_code": "string",
        "country_code": "string",
        "latitude": "string",
        "longitude": "string"
      },
      "event_type": {
        "id": 1,
        "desc": "string"
      },
      "item": {
        "id": 1,
        "name": "string",
        "description": "string",
        "image_url": "string"
      }
    }
  ],
  "meta": {
    "total_rows": 1,
    "page": 1,
    "limit": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.theottoapp.com/events"

querystring = {"event_types":"[1,2,3]","item":"42","limit":"10","locations":"[10,12]","page":"1"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.theottoapp.com/events?event_types=%5B1%2C2%2C3%5D&item=42&limit=10&locations=%5B10%2C12%5D&page=1';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.theottoapp.com/events?event_types=%5B1%2C2%2C3%5D&item=42&limit=10&locations=%5B10%2C12%5D&page=1"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.theottoapp.com/events?event_types=%5B1%2C2%2C3%5D&item=42&limit=10&locations=%5B10%2C12%5D&page=1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.theottoapp.com/events?event_types=%5B1%2C2%2C3%5D&item=42&limit=10&locations=%5B10%2C12%5D&page=1")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.theottoapp.com/events?event_types=%5B1%2C2%2C3%5D&item=42&limit=10&locations=%5B10%2C12%5D&page=1');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.theottoapp.com/events?event_types=%5B1%2C2%2C3%5D&item=42&limit=10&locations=%5B10%2C12%5D&page=1");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.theottoapp.com/events?event_types=%5B1%2C2%2C3%5D&item=42&limit=10&locations=%5B10%2C12%5D&page=1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```