API Reference
PBCP
Overview

PBCP API

ส่ง business event เข้าแพลตฟอร์ม แล้วอ่านบริบทหรือเรื่องราวของลูกค้ากลับมา

Base URL: https://pbcp-api.pcampus.co

วิธีเชื่อมต่อ

Authorization: Bearer pip_YOUR_API_KEY
x-tenant-id: your-tenant-id
Content-Type: application/json

ตัวอย่าง — ส่ง event

curl https://pbcp-api.pcampus.co/events \
  -H "Authorization: Bearer pip_YOUR_API_KEY" \
  -H "x-tenant-id: your-tenant-id" \
  -H "Content-Type: application/json" \
  -d '{
    "schemaVersion": "1.0",
    "tenantId": "your-tenant-id",
    "eventId": "550e8400-e29b-41d4-a716-446655440000",
    "eventName": "order.created",
    "occurredAt": "2026-07-15T10:00:00.000Z",
    "actor": { "type": "user", "id": "user-001" },
    "source": { "system": "your-app", "channel": "web" },
    "payload": { "orderId": "ORD-1001" }
  }'

ตัวอย่างคำตอบ

{
  "eventId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "accepted"
}

หน้าตัวอย่างถัดไป

หน้าใช้เมื่อ
Event APIส่ง event จากระบบของคุณ
Example eventsดูชื่อ event ตัวอย่าง
Context APIอ่านสถานะล่าสุดของลูกค้า
Story APIอ่านเรื่องราวที่ประกอบแล้ว
Intelligence APIอ่านคำแนะนำตัวอย่าง