โครงสร้าง API พื้นฐานสำหรับจองบัตรคอนเสิร์ตและอีเวนต์ รองรับระบบ Dual-Engine, Atomic Seat Locking, Cryptographic Identity Lock, Fair Allocation Window, 1% Scaled Sandbox, Booking Playback และ Dynamic Living Pass ในอัตรา 1,000 บาท/อีเวนต์ + 1 บาท/ใบ
https://api.livezala.com/v1/ticketing
≤ 2,000 seats · Sharded SQLite Durable Objects + D1 ACID + R2
> 2,000 seats · Signed upstream router ready for Redis Lua + Postgres
| Method | Path | Capability |
|---|---|---|
| POST | /admin/organizers | Instant Organizer Onboarding & One Token (lz_live_...) |
| PUT | /vault/payment | AES-256-GCM Payment Credentials Vault (Omise / Stripe / 2C2P / Thai QR) |
| POST | /events | Create Event + Shard Zone DOs (Dual-Engine auto-routing) |
| POST | /events/:id/publish | Organizer KYC + Activation Fee gate + Compile Static Page to R2 |
| POST | /events/:id/holds | Two-Phase Hold, Plan A→B→C Smart Fallback, Squad Adjacent & Identity Lock |
| GET | /events/:id/queue/:zoneId/:entryId | Fair Allocation Window lottery result & millisecond benchmark |
| POST | /webhooks/payment/:provider | Phase 2 ACID DB Commit + Fee Calculation + Mint Living Pass |
| GET | /passes/:ticketId | Dynamic Living Pass (Rotating 20s QR + Countdown / Doors Open / Keepsake) |
| POST | /sandbox/simulate | 1% Scaled Simulation (sbx:*) + 100x Reverse Extrapolation |
| POST | /events/:id/playback/compact | Compact Keyframe + Delta Frames artifact to R2 CDN |
curl -X POST "https://api.livezala.com/v1/ticketing/events/{eventId}/holds" \
-H "Authorization: Bearer lz_live_..." \
-H "Content-Type: application/json" \
-d '{
"identity": { "type": "TH_NATIONAL_ID", "value": "1100800123451" },
"device": { "deviceUuid": "dev-9f2c", "fingerprintHash": "fp-abc" },
"plans": [
{ "zoneId": "zone_vip", "quantity": 2, "adjacent": true },
{ "zoneId": "zone_ga", "quantity": 2 }
]
}'