CHI डेवलपर प्लेटफ़ॉर्म

v1.0.0 • OAS 3.0 • स्टेजिंग

शुरू करें

यह API इवेंट्स, टिकट्स, ऑर्गनाइज़ेशन, पेमेंट और यूज़र अकाउंट मैनेज करने के लिए एंडपॉइंट्स प्रदान करता है। CHI सर्विसेज़ को अपनी ऐप्स में इंटीग्रेट करें और CHI इकोसिस्टम पर बिल्ड करें।

स्टेजिंग एनवायरनमेंट

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

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

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

ऑथेंटिकेशन

ज़्यादातर एंडपॉइंट्स के लिए Bearer टोकन ऑथेंटिकेशन ज़रूरी है। JWT टोकन को Authorization हेडर में शामिल करें:

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"

वेबहुक्स

टिकट स्कैन, भुगतान और चेक-इन के लिए रीयल-टाइम इवेंट सूचनाएं प्राप्त करने के लिए API के माध्यम से webhook endpoints पंजीकृत करें।

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

CHI प्लेटफ़ॉर्म को अपनी पसंदीदा भाषा में एकीकृत करने के लिए हमारे आधिकारिक पैकेज का उपयोग करें।

MCP सर्वर
जल्द आ रहा है
अभी उपलब्ध नहीं — CHI MCP सर्वर अभी विकासाधीन है।
REST API
OpenAPI 3.0
अभी प्रकाशित नहीं — फ़िलहाल API एक्सेस केवल आमंत्रण द्वारा है।
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>
  );
}

एरर्स

त्रुटियां statusCode, message और error फ़ील्ड के साथ JSON ऑब्जेक्ट लौटाती हैं। 401 (टोकन समाप्त), 403 (निषिद्ध), और 429 (दर सीमित) को संभालें।

Error Response
{
  "statusCode": 401,
  "message": "Unauthorized",
  "error": "Token expired"
}
कोडअर्थकार्रवाई
400खराब अनुरोधअनुरोध बॉडी और पैरामीटर जांचें
401अनधिकृतटोकन समाप्त — रिफ्रेश करें और पुनः प्रयास करें
403निषिद्धइस संसाधन के लिए अपर्याप्त अनुमतियां
429दर सीमितएक्सपोनेंशियल विलंब के साथ पीछे हटें
500सर्वर त्रुटिबाद में पुनः प्रयास करें या सपोर्ट से संपर्क करें

रेट लिमिट्स

प्रति API कुंजी प्रति मिनट 100 अनुरोध। 429 प्रतिक्रियाओं पर एक्सपोनेंशियल बैकऑफ़ का उपयोग करें।

स्तरदरबर्स्ट
मानक100 req/min20 req/s
एंटरप्राइज़1000 req/min100 req/s

LLM और एजेंट एकीकरण

मानक संदर्भ फ़ाइलें

हम llms.txt विनिर्देश के अनुरूप मानकीकृत संदर्भ फ़ाइलें प्रदान करते हैं। पूर्ण CHI पारिस्थितिकी तंत्र संदर्भ को तुरंत लोड करने के लिए अपने AI एजेंट को इन URLs पर इंगित करें।

एजेंट सिस्टम प्रॉम्प्ट (agent.md)

अपने कोडिंग सहायक (Cursor, Windsurf, Copilot) को CHI प्लेटफ़ॉर्म की पूर्ण जानकारी देने के लिए, अपने प्रोजेक्ट रूट में एक agent.md फ़ाइल बनाएं और निम्नलिखित ब्लॉक पेस्ट करें। यह सुनिश्चित करता है कि AI हमारे डिज़ाइन टोकन और API पैटर्न का पालन करे।

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
- डेवलपर अवलोकन: https://chi.app/hi/developers
- एग्रीगेटर संदर्भ: https://chi.app/llms-aggregators.txt
- अभी प्रकाशित नहीं — फ़िलहाल API एक्सेस केवल आमंत्रण द्वारा है।
- MCP सर्वर: अभी उपलब्ध नहीं — CHI MCP सर्वर अभी विकासाधीन है।

## 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.

इवेंट एग्रीगेटर्स

अपने प्लेटफ़ॉर्म पर दिखाने के लिए CHI इवेंट्स फ़ेच करें। हम कई फ़ीड फ़ॉर्मेट और एग्रीगेटर्स के लिए एक समर्पित AI कॉन्टेक्स्ट फ़ाइल प्रदान करते हैं।

JSON फ़ीड
GET /feeds/events.json

आधुनिक एप्लिकेशन और API के लिए स्ट्रक्चर्ड JSON

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')
एग्रीगेटर LLMs.txt
/llms-aggregators.txt

CHI इवेंट डेटा स्ट्रक्चर को समझने के लिए AI-संचालित एग्रीगेटर्स हेतु समर्पित कॉन्टेक्स्ट फ़ाइल

एग्रीगेटर पार्टनरशिप

आपकी ऐप या प्लेटफ़ॉर्म से आने वाली हर टिकट बिक्री पर कमीशन कमाएं। हमारे एग्रीगेटर पार्टनरशिप प्रोग्राम में शामिल होने के लिए संपर्क करें।

संपर्क करें

API एक्सेस — केवल आमंत्रण पर

हमारी API वर्तमान में केवल आमंत्रण द्वारा उपलब्ध है। हम निकट भविष्य में सभी के लिए पहुँच खोलने पर काम कर रहे हैं।