/api/v1

trinkgeldMeister API

Automatisiere Mitarbeiter, Zahlungsläufe, Reports und Webhooks. Die API ist mandantenisoliert, scope-basiert und verlangt bei schreibenden Geldaktionen einen Idempotency-Key.

1

API-Key erzeugen

Im eingeloggten Bereich unter Developers einen Key mit den benötigten Scopes erstellen. Der Klartext-Key wird nur einmal angezeigt.

2

Header setzen

Jeder Request nutzt Authorization: Bearer tgm_.... Schreibende Geldaktionen brauchen zusätzlich Idempotency-Key.

3

Workflow bauen

Mitarbeiter synchronisieren, Zahlungslauf erstellen, Dry Run ausführen, Freigabe setzen und erst danach ausführen.

200/201Request erfolgreich.
400Payload, IBAN, Betrag oder Status ungültig.
401/403API-Key fehlt, ist gesperrt oder Scope reicht nicht.
409Idempotency-Key wurde mit anderem Body wiederverwendet.

Quickstart

Ein Zahlungslauf per API

Die Beispiele zeigen den Kernfluss. Ersetze den API-Key durch einen Key aus deinem trinkgeldMeister Account.

Go

package main
import ("bytes"; "encoding/json"; "fmt"; "io"; "log"; "net/http")
func main() {
  body, _ := json.Marshal(map[string]any{"name":"Mai","items":[]map[string]any{{"operator_id":"17","amount":5125,"currency":"EUR"}}})
  req, _ := http.NewRequest("POST", "https://trinkgeldmeister.com/api/v1/payout-runs", bytes.NewReader(body))
  req.Header.Set("Authorization", "Bearer tgm_test_...")
  req.Header.Set("Content-Type", "application/json")
  req.Header.Set("Idempotency-Key", "run-001")
  res, err := http.DefaultClient.Do(req); if err != nil { log.Fatal(err) }
  defer res.Body.Close()
  raw, _ := io.ReadAll(res.Body)
  fmt.Println(res.StatusCode, string(raw))
}

JavaScript/Node

const headers = { Authorization: "Bearer tgm_test_...", "Content-Type": "application/json" };
const res = await fetch("https://trinkgeldmeister.com/api/v1/payout-runs", {
  method: "POST",
  headers: { ...headers, "Idempotency-Key": "run-2026-05-16" },
  body: JSON.stringify({ name: "Trinkgeld 16.05.2026", items: [{ operator_id: "17", amount: 5125, currency: "EUR" }] })
});
console.log(res.status, await res.json());

Python

import requests
headers = {"Authorization": "Bearer tgm_test_...", "Content-Type": "application/json"}
payload = {"name": "Trinkgeld 16.05.2026", "items": [
    {"operator_id": "17", "amount": 5125, "currency": "EUR"}
]}
res = requests.post("https://trinkgeldmeister.com/api/v1/payout-runs", headers={**headers, "Idempotency-Key": "run-2026-05-16"}, json=payload)
print(res.status_code, res.json())

Rust

use reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
  let res = Client::new()
    .post("https://trinkgeldmeister.com/api/v1/payout-runs")
    .bearer_auth("tgm_test_...")
    .header("Idempotency-Key", "run-001")
    .json(&json!({"name":"Mai","items":[{"operator_id":"17","amount":5125,"currency":"EUR"}]}))
    .send().await?;
  println!("{} {}", res.status(), res.text().await?);
  Ok(())
}

Swift

import Foundation
let apiKey = "tgm_test_..."
let base = "https://trinkgeldmeister.com"
let payload = ["name":"Mai","items":[["operator_id":"17","amount":5125,"currency":"EUR"]]] as [String : Any]
var request = URLRequest(url: URL(string: "\(base)/api/v1/payout-runs")!)
request.httpMethod = "POST"
request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue("run-001", forHTTPHeaderField: "Idempotency-Key")
request.httpBody = try JSONSerialization.data(withJSONObject: payload)
let (data, response) = try await URLSession.shared.data(for: request)
print((response as! HTTPURLResponse).statusCode, String(data: data, encoding: .utf8)!)

curl

export TGM_BASE="https://trinkgeldmeister.com"
export TGM_KEY="tgm_test_..."

curl "$TGM_BASE/api/v1/tenant" \
  -H "Authorization: Bearer $TGM_KEY"

curl -X POST "$TGM_BASE/api/v1/payout-runs" \
  -H "Authorization: Bearer $TGM_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: run-2026-05-16" \
  -d '{"name":"Trinkgeld 16.05.2026","items":[{"operator_id":"17","amount":5125,"currency":"EUR","transfer_text":"Trinkgeld 16.05.2026"}]}'

Referenz

Ressourcen und Methoden

Alle Endpunkte sind tenant-isoliert. SuperAdmin-Endpunkte sind nur für interne Administration und nutzen den MegaAdmin-Token.

Mandant

GET

/api/v1/tenant

tenant.read

Liest Stammdaten, Plan und Transfertext des aktuellen Mandanten.

Scope
tenant.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/tenant' \
  -H 'Authorization: Bearer tgm_test_...'
PATCH

/api/v1/tenant

tenant.write

Aktualisiert Report-Email oder Überweisungstext-Vorlage.

Scope
tenant.write
Idempotency
nicht erforderlich
Request Body
{"report_email":"finance@example.test","transfer_text_template":"Trinkgeld {{tenant_name}} {{date}}"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/tenant' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"report_email":"finance@example.test","transfer_text_template":"Trinkgeld {{tenant_name}} {{date}}"}'

Mitarbeiter

GET

/api/v1/employees

employee.read

Listet Mitarbeiter des API-Key-Mandanten.

Scope
employee.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/employees' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/employees

employee.write

Legt einen Mitarbeiter inklusive Operator-ID, Handy und Auszahlungskonto an.

Scope
employee.write
Idempotency
nicht erforderlich
Request Body
{"operator_id":"99","name":"API Mitarbeiter","phone":"0170 1234567","status":"active","iban":"DE89370400440532013000","account_holder":"API Mitarbeiter"}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/employees' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"operator_id":"99","name":"API Mitarbeiter","phone":"0170 1234567","status":"active","iban":"DE89370400440532013000","account_holder":"API Mitarbeiter"}'
GET

/api/v1/employees/1

employee.read

Liest einen Mitarbeiter innerhalb des API-Key-Mandanten.

Scope
employee.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/employees/1' \
  -H 'Authorization: Bearer tgm_test_...'
PATCH

/api/v1/employees/1

employee.write

Aktualisiert einen Mitarbeiter innerhalb des Mandanten.

Scope
employee.write
Idempotency
nicht erforderlich
Request Body
{"location":"Bar","status":"active","phone":"0170 7654321"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/employees/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"location":"Bar","status":"active","phone":"0170 7654321"}'
DELETE

/api/v1/employees/1

employee.write

Setzt einen Mitarbeiter innerhalb des Mandanten auf deleted.

Scope
employee.write
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/employees/1' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/employees/import

employee.write

Importiert oder aktualisiert Mitarbeiter per CSV mit Operator-ID oder Mitarbeiter-Referenz.

Scope
employee.write
Idempotency
nicht erforderlich
Request Body
{"csv":"operator_id,name,email,phone,status,iban,account_holder\n77,API Import,api-import@example.test,0170 1234567,active,DE89370400440532013000,API Import\n"}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/employees/import' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"csv":"operator_id,name,email,phone,status,iban,account_holder\n77,API Import,api-import@example.test,0170 1234567,active,DE89370400440532013000,API Import\n"}'

Provider

GET

/api/v1/providers

provider.read

Listet konfigurierte Provider-Verbindungen.

Scope
provider.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/providers' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/providers

provider.write

Legt eine Provider-Verbindung mit Secret-Referenzen an.

Scope
provider.write
Idempotency
nicht erforderlich
Request Body
{"provider":"stripe_global_payouts","display_name":"Stripe Sandbox","mode":"sandbox","credential_ref":"env:STRIPE_SECRET_KEY","webhook_secret_ref":"env:STRIPE_GLOBAL_PAYOUTS_WEBHOOK_SECRET","financial_account_ref":"fa_test","active":false}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/providers' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"provider":"stripe_global_payouts","display_name":"Stripe Sandbox","mode":"sandbox","credential_ref":"env:STRIPE_SECRET_KEY","webhook_secret_ref":"env:STRIPE_GLOBAL_PAYOUTS_WEBHOOK_SECRET","financial_account_ref":"fa_test","active":false}'
PATCH

/api/v1/providers/1

provider.write

Aktualisiert Anzeigename, Status, Modus oder Secret-Referenzen einer Provider-Verbindung.

Scope
provider.write
Idempotency
nicht erforderlich
Request Body
{"display_name":"Stripe Sandbox Updated","active":true}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/providers/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"display_name":"Stripe Sandbox Updated","active":true}'
DELETE

/api/v1/providers/1

provider.write

Deaktiviert eine Provider-Verbindung fachlich und erzeugt ein `provider.disabled` Event.

Scope
provider.write
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/providers/1' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/providers/1/test

provider.write

Prüft Key-, Modus-, Webhook- und Funding-Kontext der Provider-Verbindung.

Scope
provider.write
Idempotency
nicht erforderlich
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/providers/1/test' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/providers/1/rotate-secret-ref

provider.write

Ersetzt Credential-, Webhook- oder Funding-Referenzen, ohne Secret-Werte offenzulegen.

Scope
provider.write
Idempotency
nicht erforderlich
Request Body
{"credential_ref":"env:STRIPE_SECRET_KEY_NEXT"}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/providers/1/rotate-secret-ref' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"credential_ref":"env:STRIPE_SECRET_KEY_NEXT"}'

Import

POST

/api/v1/imports

import.write

Parst eine CSV-Zahlungsliste mit optionalem Spaltenmapping und erzeugt einen geprüften Auszahlungslauf.

Scope
import.write
Idempotency
erforderlich
Request Body
{"name":"Mai Trinkgeld","csv":"Bediener Nr,Trinkgeld EUR,Zweck\n17,51.25,Trinkgeld Mai\n","mapping":{"operator_id":"Bediener Nr","amount":"Trinkgeld EUR","transfer_text":"Zweck"}}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/imports' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Idempotency-Key: idem-post-api-v1-imports' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Mai Trinkgeld","csv":"Bediener Nr,Trinkgeld EUR,Zweck\n17,51.25,Trinkgeld Mai\n","mapping":{"operator_id":"Bediener Nr","amount":"Trinkgeld EUR","transfer_text":"Zweck"}}'
GET

/api/v1/imports/imp_1

payout.read

Liest Importstatus und den verknüpften Auszahlungslauf.

Scope
payout.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/imports/imp_1' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/imports/imp_1/rows

payout.read

Listet die normalisierten Importzeilen aus den gespeicherten Auszahlungspositionen.

Scope
payout.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/imports/imp_1/rows' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/imports/imp_1/validate

import.write

Gibt den aktuellen Validierungsstatus des Imports zurück.

Scope
import.write
Idempotency
nicht erforderlich
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/imports/imp_1/validate' \
  -H 'Authorization: Bearer tgm_test_...'

Auszahlungen

POST

/api/v1/payout-runs

payout.write

Erzeugt einen Lauf aus JSON-Positionen.

Scope
payout.write
Idempotency
erforderlich
Request Body
{"name":"Mai Trinkgeld","items":[{"operator_id":"17","amount":5125,"currency":"EUR"}]}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/payout-runs' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Idempotency-Key: idem-post-api-v1-payout-runs' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Mai Trinkgeld","items":[{"operator_id":"17","amount":5125,"currency":"EUR"}]}'
GET

/api/v1/payout-runs

payout.read

Listet Auszahlungsläufe des Mandanten.

Scope
payout.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/payout-runs' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/payout-runs/1

payout.read

Liest Detailstatus und Positionen eines Laufs.

Scope
payout.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/payout-runs/1' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/payout-runs/1/dry-run

payout.write

Führt den technischen Probelauf ohne Geldbewegung aus.

Scope
payout.write
Idempotency
erforderlich
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/payout-runs/1/dry-run' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Idempotency-Key: idem-post-api-v1-payout-runs-1-dry-run'
POST

/api/v1/payout-runs/1/approve

payout.write

Setzt den Lauf auf freigegeben.

Scope
payout.write
Idempotency
erforderlich
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/payout-runs/1/approve' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Idempotency-Key: idem-post-api-v1-payout-runs-1-approve'
POST

/api/v1/payout-runs/1/execute

payout.execute

Führt einen freigegebenen Lauf aus, sofern Abo und Feature Flags passen.

Scope
payout.execute
Idempotency
erforderlich
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/payout-runs/1/execute' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Idempotency-Key: idem-post-api-v1-payout-runs-1-execute'
POST

/api/v1/payout-runs/1/cancel

payout.write

Setzt einen Lauf auf canceled, bevor eine Live-Ausführung erfolgt.

Scope
payout.write
Idempotency
erforderlich
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/payout-runs/1/cancel' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Idempotency-Key: idem-post-api-v1-payout-runs-1-cancel'
POST

/api/v1/payout-items/1/retry

payout.execute

Erstellt für eine fehlgeschlagene Auszahlungsposition idempotent einen neuen Provider-Versuch und schreibt das Journal.

Scope
payout.execute
Idempotency
erforderlich
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/payout-items/1/retry' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Idempotency-Key: idem-post-api-v1-payout-items-1-retry'
GET

/api/v1/reports/payout-runs/1.csv

report.read

Lädt den CSV-Report für einen Auszahlungslauf des API-Key-Mandanten.

Scope
report.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/reports/payout-runs/1.csv' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/reports/payout-runs/1.pdf

report.read

Lädt den PDF-Report für einen Auszahlungslauf des API-Key-Mandanten.

Scope
report.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/reports/payout-runs/1.pdf' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/reports/payout-runs/1.json

report.read

Lädt den maschinenlesbaren JSON-Report für einen Auszahlungslauf des API-Key-Mandanten.

Scope
report.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/reports/payout-runs/1.json' \
  -H 'Authorization: Bearer tgm_test_...'

Journal

GET

/api/v1/journal

payout.read

Listet Journalbewegungen und Provider-Referenzen.

Scope
payout.read
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/journal' \
  -H 'Authorization: Bearer tgm_test_...'

SuperAdmin

GET

/api/v1/superadmin/tenants

megaadmin

Listet alle Mandanten. Authentifizierung über X-MegaAdmin-Token oder Bearer MegaAdmin Token.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/tenants' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/superadmin/tenants

megaadmin

Legt einen Mandanten an.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"key":"api-tenant","name":"API Tenant","report_email":"api@example.test","status":"active"}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/superadmin/tenants' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"key":"api-tenant","name":"API Tenant","report_email":"api@example.test","status":"active"}'
GET

/api/v1/superadmin/tenants/1

megaadmin

Liest einen Mandanten.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/tenants/1' \
  -H 'Authorization: Bearer tgm_test_...'
PATCH

/api/v1/superadmin/tenants/1

megaadmin

Aktualisiert Mandantenstammdaten.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"name":"API Tenant Updated","plan_key":"team"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/tenants/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"name":"API Tenant Updated","plan_key":"team"}'
DELETE

/api/v1/superadmin/tenants/1

megaadmin

Setzt einen Mandanten auf deleted.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/superadmin/tenants/1' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/superadmin/users

megaadmin

Listet User/Rollen für `tenant_id` oder den ersten Mandanten.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/users' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/superadmin/users

megaadmin

Legt einen Tenant-User mit Rolle an.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"tenant_id":1,"name":"API Owner","email":"owner@example.test","phone":"+491701234567","role":"owner","phone_verified":true}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/superadmin/users' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"tenant_id":1,"name":"API Owner","email":"owner@example.test","phone":"+491701234567","role":"owner","phone_verified":true}'
PATCH

/api/v1/superadmin/users/1

megaadmin

Aktualisiert Rolle, Status oder Kontaktdaten eines Tenant-Users.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"role":"finance","status":"active"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/users/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"role":"finance","status":"active"}'
DELETE

/api/v1/superadmin/users/1

megaadmin

Setzt einen Tenant-User auf deleted.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/superadmin/users/1' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/superadmin/employees

megaadmin

Listet Mitarbeiter für `tenant_id` oder den ersten Mandanten.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/employees' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/superadmin/employees

megaadmin

Legt einen Mitarbeiter inklusive Operator-ID und maskierter IBAN an.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"tenant_id":1,"operator_id":"901","name":"API Employee","iban":"DE89370400440532013000","account_holder":"API Employee"}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/superadmin/employees' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"tenant_id":1,"operator_id":"901","name":"API Employee","iban":"DE89370400440532013000","account_holder":"API Employee"}'
PATCH

/api/v1/superadmin/employees/1

megaadmin

Aktualisiert Mitarbeiterstamm, Handy und Kontodaten.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"location":"API Bar","phone":"0170 7654321"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/employees/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"location":"API Bar","phone":"0170 7654321"}'
DELETE

/api/v1/superadmin/employees/1

megaadmin

Setzt einen Mitarbeiter auf deleted.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/superadmin/employees/1' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/superadmin/providers

megaadmin

Listet Provider-Verbindungen für `tenant_id` oder den ersten Mandanten.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/providers' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/superadmin/providers

megaadmin

Legt eine Provider-Verbindung mit Secret-Referenzen an und kann die Konfiguration testen.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"tenant_id":1,"provider":"stripe_global_payouts","display_name":"API Stripe","mode":"sandbox","credential_ref":"env:STRIPE_SECRET_KEY","webhook_secret_ref":"env:STRIPE_GLOBAL_PAYOUTS_WEBHOOK_SECRET","financial_account_ref":"fa_test","active":true,"test":true}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/superadmin/providers' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"tenant_id":1,"provider":"stripe_global_payouts","display_name":"API Stripe","mode":"sandbox","credential_ref":"env:STRIPE_SECRET_KEY","webhook_secret_ref":"env:STRIPE_GLOBAL_PAYOUTS_WEBHOOK_SECRET","financial_account_ref":"fa_test","active":true,"test":true}'
PATCH

/api/v1/superadmin/providers/1

megaadmin

Aktualisiert Provider-Status, Modus oder Secret-Referenzen.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"display_name":"Stripe Sandbox Updated","status":"active"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/providers/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"display_name":"Stripe Sandbox Updated","status":"active"}'
DELETE

/api/v1/superadmin/providers/1

megaadmin

Deaktiviert eine Provider-Verbindung.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/superadmin/providers/1' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/superadmin/payout-runs

megaadmin

Listet Auszahlungsläufe für `tenant_id` oder den ersten Mandanten.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/payout-runs' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/superadmin/payout-runs

megaadmin

Erzeugt einen Auszahlungslauf für einen Mandanten aus JSON-Positionen.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"tenant_id":1,"name":"SuperAdmin Run","items":[{"operator_id":"17","amount":5125,"currency":"EUR"}]}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/superadmin/payout-runs' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"tenant_id":1,"name":"SuperAdmin Run","items":[{"operator_id":"17","amount":5125,"currency":"EUR"}]}'
GET

/api/v1/superadmin/payout-runs/1

megaadmin

Liest einen Auszahlungslauf inklusive Positionen.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/payout-runs/1' \
  -H 'Authorization: Bearer tgm_test_...'
PATCH

/api/v1/superadmin/payout-runs/1

megaadmin

Ändert den Status eines Auszahlungslaufs.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"status":"approved"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/payout-runs/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"status":"approved"}'
DELETE

/api/v1/superadmin/payout-runs/1

megaadmin

Setzt einen Auszahlungslauf auf canceled.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/superadmin/payout-runs/1' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/superadmin/settings

megaadmin

Liest Landing- und SMS-Gateway-Konfiguration ohne Klartext-Secrets.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/settings' \
  -H 'Authorization: Bearer tgm_test_...'
PATCH

/api/v1/superadmin/settings

megaadmin

Aktualisiert Landing-Texte oder SMS-Gateway-Secret-Referenzen.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"landing":{"hero_title":"API Landing"},"sms_gateway":{"sender":"TGM","dry_run":true}}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/settings' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"landing":{"hero_title":"API Landing"},"sms_gateway":{"sender":"TGM","dry_run":true}}'
GET

/api/v1/superadmin/pricing-plans

megaadmin

Listet Preisplaene.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/pricing-plans' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/superadmin/pricing-plans

megaadmin

Legt einen Preisplan an oder aktualisiert ihn per Key.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"key":"api-plan","name":"API Plan","monthly_price":4900,"employees_monthly":25,"payout_runs_monthly":6,"payout_amount_monthly":500000,"status":"active"}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/superadmin/pricing-plans' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"key":"api-plan","name":"API Plan","monthly_price":4900,"employees_monthly":25,"payout_runs_monthly":6,"payout_amount_monthly":500000,"status":"active"}'
GET

/api/v1/superadmin/pricing-plans/1

megaadmin

Liest einen Preisplan.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/pricing-plans/1' \
  -H 'Authorization: Bearer tgm_test_...'
PATCH

/api/v1/superadmin/pricing-plans/1

megaadmin

Aktualisiert einen Preisplan inklusive Null-Werten für Preis oder Limits.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"name":"Starter Updated","monthly_price":0}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/pricing-plans/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Starter Updated","monthly_price":0}'
DELETE

/api/v1/superadmin/pricing-plans/1

megaadmin

Setzt einen Preisplan auf inactive.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/superadmin/pricing-plans/1' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/superadmin/webhooks

megaadmin

Listet Webhook-Endpunkte je Mandant.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/webhooks' \
  -H 'Authorization: Bearer tgm_test_...'
GET

/api/v1/superadmin/api-keys

megaadmin

Listet API Keys ohne Hash oder Klartext-Key für `tenant_id`.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X GET 'https://trinkgeldmeister.com/api/v1/superadmin/api-keys' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/superadmin/api-keys

megaadmin

Legt einen API Key an und gibt nur Metadaten zurück, nicht den Klartext-Key.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"tenant_id":1,"name":"API Managed Key","scopes":"tenant.read employee.read"}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/superadmin/api-keys' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"tenant_id":1,"name":"API Managed Key","scopes":"tenant.read employee.read"}'
PATCH

/api/v1/superadmin/api-keys/1

megaadmin

Aktualisiert Name, Scopes oder Status eines API Keys ohne Hash oder Klartext-Key offenzulegen.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"name":"API Managed Key Updated","scopes":"tenant.read employee.read payout.read","status":"active"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/api-keys/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"name":"API Managed Key Updated","scopes":"tenant.read employee.read payout.read","status":"active"}'
DELETE

/api/v1/superadmin/api-keys/1

megaadmin

Sperrt einen API Key.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/superadmin/api-keys/1' \
  -H 'Authorization: Bearer tgm_test_...'
POST

/api/v1/superadmin/webhooks

megaadmin

Legt einen Kunden-Webhook für einen Mandanten an.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"tenant_id":1,"name":"API Webhook","url":"https://example.test/tgm","events":"payout.*"}
curl Beispiel
curl -X POST 'https://trinkgeldmeister.com/api/v1/superadmin/webhooks' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"tenant_id":1,"name":"API Webhook","url":"https://example.test/tgm","events":"payout.*"}'
PATCH

/api/v1/superadmin/webhooks/1

megaadmin

Aktualisiert Name, URL, Events, Secret-Referenz oder Status eines Kunden-Webhooks.

Scope
megaadmin
Idempotency
nicht erforderlich
Request Body
{"name":"API Webhook Updated","url":"https://example.test/tgm-updated","events":"payout.*,billing.*","secret_ref":"env:TGM_WEBHOOK_SECRET","status":"active"}
curl Beispiel
curl -X PATCH 'https://trinkgeldmeister.com/api/v1/superadmin/webhooks/1' \
  -H 'Authorization: Bearer tgm_test_...' \
  -H 'Content-Type: application/json' \
  -d '{"name":"API Webhook Updated","url":"https://example.test/tgm-updated","events":"payout.*,billing.*","secret_ref":"env:TGM_WEBHOOK_SECRET","status":"active"}'
DELETE

/api/v1/superadmin/webhooks/1

megaadmin

Deaktiviert einen Kunden-Webhook.

Scope
megaadmin
Idempotency
nicht erforderlich
curl Beispiel
curl -X DELETE 'https://trinkgeldmeister.com/api/v1/superadmin/webhooks/1' \
  -H 'Authorization: Bearer tgm_test_...'