CHI Entwicklerplattform

v1.0.0 • OAS 3.0 • Staging

Erste Schritte

Diese API bietet Endpunkte für die Verwaltung von Events, Tickets, Organisationen, Zahlungen und Benutzerkonten. Integriere CHI-Services in deine Apps und baue auf dem CHI-Ökosystem auf.

Staging-Umgebung

Base URL: https://api.chi.app

Pagination
GET /events?page=1&limit=20

{
  "data": [...],
  "total": 156,
  "page": 1,
  "lastPage": 8
}

Authentifizierung

Die meisten Endpunkte erfordern Bearer-Token-Authentifizierung. Füge das JWT-Token im Authorization-Header ein:

Authentication
Authorization: Bearer <your-token>

# Example request
curl -X GET https://api.chi.app/events \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json"

Webhooks

Registrieren Sie Webhook-Endpunkte über die API, um Echtzeit-Benachrichtigungen für Ticket-Scans, Zahlungen und Check-ins zu erhalten.

Webhook Payload
POST https://your-server.com/webhook

{
  "event": "ticket.scanned",
  "timestamp": "2025-06-15T14:30:00Z",
  "data": {
    "ticketId": "tkt_abc123",
    "eventId": "evt_xyz789",
    "visitorId": "vis_456def"
  }
}

SDKs

Verwenden Sie unsere offiziellen Pakete, um die CHI-Plattform in Ihrer bevorzugten Sprache zu integrieren.

MCP-Server
Demnächst
Noch nicht verfügbar – der CHI MCP-Server befindet sich noch in Entwicklung.
REST-API
OpenAPI 3.0
Noch nicht veröffentlicht — der API-Zugang ist vorerst nur auf Einladung.
React Storefront SDK
Beta · @chi-ecosystem/storefront-react

Build a full event storefront — live ticket pricing, cart and checkout — without touching REST endpoints, auth, retries, rate limits or data normalization. CHI owns the commerce behavior; you own the visual experience. Ships as headless React hooks plus optional components with zero CSS, so your design system stays yours. Lineup hooks arrive together with the public lineup API.

Install (GitHub Packages registry required for the @chi-ecosystem scope)

npm install @chi-ecosystem/storefront-react @tanstack/react-query

# .npmrc - GitHub Packages auth for the @chi-ecosystem scope
@chi-ecosystem:registry=https://npm.pkg.github.com

Lineup + live tickets in ~20 lines

import {
  ChiStorefrontProvider,
  useTicketDefinitions,
  useQuote,
  formatMoney,
  money,
} from '@chi-ecosystem/storefront-react';

// Once, at the root - CHI handles auth, caching, retries,
// outage healing and quote rate-limit budgets from here on.
<ChiStorefrontProvider eventSlug="your-festival" baseUrl="production">
  <App />
</ChiStorefrontProvider>;

function Tickets() {
  const { definitions } = useTicketDefinitions();   // live prices + stock
  const [lines, setLines] = useState([]);           // your cart UI state
  const { quote } = useQuote({ lines });            // debounced + deduped

  return (
    <div className="my-tickets">                    {/* your CSS, your rules */}
      {definitions.map((d) => (
        <button key={d.id} onClick={() => addLine(setLines, d)}>
          {d.name} - {formatMoney(money(d.priceMinor, d.currency))}
        </button>
      ))}
      <Total>{formatMoney(money(quote?.pricing.totalMinor ?? 0, quote?.pricing.currency ?? 'USD'))}</Total>
    </div>
  );
}

Fehler

Fehler geben ein JSON-Objekt mit statusCode, message und error-Feldern zurück. Behandeln Sie 401 (Token abgelaufen), 403 (verboten) und 429 (Rate begrenzt).

Error Response
{
  "statusCode": 401,
  "message": "Unauthorized",
  "error": "Token expired"
}
CodeBedeutungAktion
400Ungültige AnfrageAnfragekörper und Parameter überprüfen
401Nicht autorisiertToken abgelaufen — erneuern und wiederholen
403VerbotenUnzureichende Berechtigungen für diese Ressource
429Rate begrenztMit exponentiellem Backoff zurückweichen
500ServerfehlerSpäter erneut versuchen oder Support kontaktieren

Ratenbegrenzungen

100 Anfragen pro Minute pro API-Schlüssel. Verwenden Sie exponentielles Backoff bei 429-Antworten.

StufeRateBurst
Standard100 req/min20 req/s
Enterprise1000 req/min100 req/s

LLM- & Agenten-Integration

Standard-Kontextdateien

Wir bieten standardisierte Kontextdateien gemäß der llms.txt-Spezifikation. Verweisen Sie Ihre KI-Agenten auf diese URLs, um den vollständigen CHI-Ökosystem-Kontext sofort zu laden.

Agenten-System-Prompt (agent.md)

Um Ihrem Programmierassistenten (Cursor, Windsurf, Copilot) vollständiges Bewusstsein für die CHI-Plattform zu geben, erstellen Sie eine agent.md-Datei in Ihrem Projektstamm und fügen Sie den folgenden Block ein. Dies stellt sicher, dass die KI unseren Design-Tokens und API-Mustern folgt.

agent.md
# CHI Ecosystem API Context for AI Agents

You are integrating with the CHI Ecosystem (EventCHI) REST API.
Base URL: https://api.chi.app (production) | https://api.staging.chi.app (staging)
Auth: Bearer token via Authorization header.

## Resources
- Full Context: https://chi.app/llms-full.txt
- Minimal Context: https://chi.app/llms-minimal.txt
- Entwicklerübersicht: https://chi.app/de/developers
- Aggregator-Kontext: https://chi.app/llms-aggregators.txt
- Noch nicht veröffentlicht — der API-Zugang ist vorerst nur auf Einladung.
- MCP-Server: Noch nicht verfügbar – der CHI MCP-Server befindet sich noch in Entwicklung.

## API Guidelines
1. **Authentication**: All requests require a Bearer token. Obtain tokens via POST /auth/login.
2. **REST Patterns**: Use strict RESTful conventions — resource-based URLs, proper HTTP methods, JSON request/response bodies.
3. **Pagination**: List endpoints support `?page=` and `?limit=` query params. Responses include `total`, `page`, and `lastPage`.
4. **Error Handling**: Errors return `{ statusCode, message, error }`. Handle 401 (token expired), 403 (forbidden), 429 (rate limited).
5. **Webhooks**: Register webhook endpoints via the API to receive real-time event notifications (ticket scans, payments, check-ins).
6. **Rate Limits**: 100 req/min per API key. Use exponential backoff on 429 responses.

## Key Resources
- **Events**: /events — create, manage, and query events.
- **Tickets**: /tickets — issue, validate, and scan tickets.
- **Payments**: /payments — process and track transactions.
- **Visitors**: /visitors — attendee profiles and wallet data.
- **Coupons**: /coupons — create and redeem discount codes.
- **Organizations**: /organizations — manage org settings and team members.

## Key Terminology
- **Visitor App**: The mobile wallet for attendees.
- **Crew App**: POS and access control for staff.
- **Backstage**: The organizer dashboard.

Event-Aggregatoren

Rufe CHI-Events ab, um sie auf deiner Plattform anzuzeigen. Wir bieten mehrere Feed-Formate und eine spezielle KI-Kontextdatei für Aggregatoren.

JSON-Feed
GET /feeds/events.json

Strukturiertes JSON für moderne Anwendungen und APIs

https://api.chi.app/feeds/events.json
Example
fetch('https://api.chi.app/feeds/events.json')
  .then(res => res.json())
  .then(data => {
    console.log(data.items);
  });

// Organization-scoped
fetch('https://api.chi.app/feeds/organizations/{orgId}/events.json')

// Single event JSON-LD
fetch('https://api.chi.app/feeds/events/{eventId}.json')
Aggregator LLMs.txt
/llms-aggregators.txt

Spezielle Kontextdatei für KI-gestützte Aggregatoren zum Verständnis der CHI-Eventdatenstrukturen

Aggregator-Partnerschaft

Verdiene Provisionen für jeden Ticketverkauf, der über deine App oder Plattform kommt. Kontaktiere uns, um unserem Aggregator-Partnerprogramm beizutreten und für getriebene Verkäufe belohnt zu werden.

Kontakt aufnehmen

API-Zugang — Nur auf Einladung

Unsere API ist derzeit nur auf Einladung verfügbar. Wir arbeiten daran, den Zugang in naher Zukunft für alle zu öffnen.