v1.0.0 • OAS 3.0 • स्टेजिंग
यह API इवेंट्स, टिकट्स, ऑर्गनाइज़ेशन, पेमेंट और यूज़र अकाउंट मैनेज करने के लिए एंडपॉइंट्स प्रदान करता है। CHI सर्विसेज़ को अपनी ऐप्स में इंटीग्रेट करें और CHI इकोसिस्टम पर बिल्ड करें।
Base URL: https://api.chi.app
GET /events?page=1&limit=20
{
"data": [...],
"total": 156,
"page": 1,
"lastPage": 8
}ज़्यादातर एंडपॉइंट्स के लिए Bearer टोकन ऑथेंटिकेशन ज़रूरी है। JWT टोकन को Authorization हेडर में शामिल करें:
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 पंजीकृत करें।
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"
}
}CHI प्लेटफ़ॉर्म को अपनी पसंदीदा भाषा में एकीकृत करने के लिए हमारे आधिकारिक पैकेज का उपयोग करें।
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.
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
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 (दर सीमित) को संभालें।
{
"statusCode": 401,
"message": "Unauthorized",
"error": "Token expired"
}| कोड | अर्थ | कार्रवाई |
|---|---|---|
| 400 | खराब अनुरोध | अनुरोध बॉडी और पैरामीटर जांचें |
| 401 | अनधिकृत | टोकन समाप्त — रिफ्रेश करें और पुनः प्रयास करें |
| 403 | निषिद्ध | इस संसाधन के लिए अपर्याप्त अनुमतियां |
| 429 | दर सीमित | एक्सपोनेंशियल विलंब के साथ पीछे हटें |
| 500 | सर्वर त्रुटि | बाद में पुनः प्रयास करें या सपोर्ट से संपर्क करें |
प्रति API कुंजी प्रति मिनट 100 अनुरोध। 429 प्रतिक्रियाओं पर एक्सपोनेंशियल बैकऑफ़ का उपयोग करें।
| स्तर | दर | बर्स्ट |
|---|---|---|
| मानक | 100 req/min | 20 req/s |
| एंटरप्राइज़ | 1000 req/min | 100 req/s |
हम llms.txt विनिर्देश के अनुरूप मानकीकृत संदर्भ फ़ाइलें प्रदान करते हैं। पूर्ण CHI पारिस्थितिकी तंत्र संदर्भ को तुरंत लोड करने के लिए अपने AI एजेंट को इन URLs पर इंगित करें।
अपने कोडिंग सहायक (Cursor, Windsurf, Copilot) को CHI प्लेटफ़ॉर्म की पूर्ण जानकारी देने के लिए, अपने प्रोजेक्ट रूट में एक agent.md फ़ाइल बनाएं और निम्नलिखित ब्लॉक पेस्ट करें। यह सुनिश्चित करता है कि AI हमारे डिज़ाइन टोकन और API पैटर्न का पालन करे।
# 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 कॉन्टेक्स्ट फ़ाइल प्रदान करते हैं।
आधुनिक एप्लिकेशन और API के लिए स्ट्रक्चर्ड JSON
https://api.chi.app/feeds/events.jsonfetch('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')CHI इवेंट डेटा स्ट्रक्चर को समझने के लिए AI-संचालित एग्रीगेटर्स हेतु समर्पित कॉन्टेक्स्ट फ़ाइल
आपकी ऐप या प्लेटफ़ॉर्म से आने वाली हर टिकट बिक्री पर कमीशन कमाएं। हमारे एग्रीगेटर पार्टनरशिप प्रोग्राम में शामिल होने के लिए संपर्क करें।
संपर्क करेंहमारी API वर्तमान में केवल आमंत्रण द्वारा उपलब्ध है। हम निकट भविष्य में सभी के लिए पहुँच खोलने पर काम कर रहे हैं।