Events
Business+Verwalten Sie Events, Messen und Veranstaltungen.
Erforderliche Bereiche:
events
Endpunkte
GET
/api/v1/events
Alle Events auflisten
GET
/api/v1/events/{id}
Einzelnes Event abrufen
POST
/api/v1/events
Neues Event erstellen
PUT/PATCH
/api/v1/events/{id}
Event aktualisieren
DELETE
/api/v1/events/{id}
Event löschen
Abfrageparameter
| Parameter | Beschreibung |
|---|---|
search
|
Suchbegriff zum Filtern der Ergebnisse |
visible
|
Nach Sichtbarkeit filtern (0 oder 1) |
upcoming
|
Nur zukünftige Events anzeigen (1) |
sort
|
Sortierfeld (title, event_key, date_from, date_to, city) |
order
|
Sortierrichtung (ASC oder DESC, Standard: DESC) |
include
|
Verknüpfte Daten einschließen (opening_hours, participant_count) |
Request-Schema
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
title
|
string | Ja | Name des Events |
event_key
|
string | Nein | Eindeutiger Schlüssel für das Event (wird automatisch generiert, wenn nicht angegeben) |
description
|
string | Nein | Beschreibung des Events |
date_from
|
string | Nein | Startdatum (ISO 8601 Format) |
date_to
|
string | Nein | Enddatum (ISO 8601 Format) |
country
|
string | Nein | Ländercode (Standard: DE) |
state
|
string | Nein | Bundesland oder Region |
city
|
string | Nein | Stadtname |
application_deadline
|
string | Nein | Bewerbungsfrist (ISO 8601 Format) |
is_visible
|
boolean | Nein | Ob das Event öffentlich sichtbar ist |
opening_hours
|
array | Nein | Array von Öffnungszeiteneinträgen |
Response-Schema
| Feld | Typ |
|---|---|
id
|
integer |
event_key
|
string |
title
|
string |
description
|
string|null |
country
|
string |
state
|
string|null |
city
|
string|null |
date_from
|
string|null |
date_to
|
string|null |
application_deadline
|
string|null |
is_visible
|
boolean |
image
|
object|null |
Codebeispiele
curl -X GET "https://your-tenant.plandocket.com/api/v1/events" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
<?php
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://your-tenant.plandocket.com';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $baseUrl . '/api/v1/events',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
print_r($data);
const apiKey = 'YOUR_API_KEY';
const baseUrl = 'https://your-tenant.plandocket.com';
const response = await fetch(`${baseUrl}/api/v1/events`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
import requests
api_key = 'YOUR_API_KEY'
base_url = 'https://your-tenant.plandocket.com'
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json',
}
response = requests.get(f'{base_url}/api/v1/events', headers=headers)
data = response.json()
print(data)
Beispiel-Antwort
200 OK
{
"data": {
"event_id": 1,
"created_at": 1704067200,
"updated_at": 1704067200
},
"meta": {
"request_id": "req_abc123"
}
}