Pulse API
Base URL: https://pulse.pcampus.co
Pulse is the Business Story Explorer built on top of the PBCP Story API — developers can embed the Pulse widget or fetch Story data to display in their own UI.
Note: Story data can also be fetched directly from the PBCP Story API and Intelligence API — Pulse is a reference UI that consumes those same APIs.
Embed Widget
Embed a Pulse Story view into your business admin UI via iframe:
<iframe
src="https://pulse.pcampus.co/embed/customer/{customerId}?token={embedToken}"
width="100%"
height="600"
frameborder="0"
></iframe>Generate embed token
POST https://pulse.pcampus.co/embed/token
Authorization: Bearer <pip_api_key>
{
"entityType": "customer",
"entityId": "cust_xxx",
"tenantId": "your-tenant-id",
"expiresIn": 3600
}Response:
{
"embedToken": "emb_xxx",
"expiresAt": "2026-07-16T12:00:00.000Z"
}Endpoints
GET /v1/stories
List recent stories for the tenant.
GET https://pulse.pcampus.co/v1/stories?entityType=customer&limit=20
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-idQuery params:
| Param | Type | Description |
|---|---|---|
entityType | string | customer | order | product |
limit | number | Max results (default 20, max 100) |
cursor | string | Pagination cursor |
segment | string | Filter by Intelligence segment (e.g. at_risk) |
GET /v1/stories/search
Search stories by identity (name / phone / email / orderId).
GET https://pulse.pcampus.co/v1/stories/search?q=สมชาย&tenantId=pharmacy-demo
Authorization: Bearer <pip_api_key>Response:
{
"results": [
{
"entityType": "customer",
"entityId": "cust_001",
"displayName": "สมชาย จันทร์ดี",
"storyUrl": "/v1/stories/customer/cust_001",
"segment": "loyal",
"lastEventAt": "2026-07-15T10:00:00.000Z"
}
]
}GET /v1/stories/:entityType/:entityId
View the full story for an entity — delegates to the PBCP Story API.
GET https://pulse.pcampus.co/v1/stories/customer/cust_001
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-idResponse shape is identical to the PBCP Story API + Intelligence layer.
Configuration
GET /v1/config
View Pulse configuration for the tenant.
GET https://pulse.pcampus.co/v1/config
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-idResponse:
{
"tenantId": "pharmacy-demo",
"domain": "pharmacy",
"defaultView": "story",
"enabledStoryTypes": ["customer", "order", "product"],
"developerModeEnabled": true,
"theme": { "primaryColor": "#2563eb" }
}PATCH /v1/config
PATCH https://pulse.pcampus.co/v1/config
Authorization: Bearer <pip_api_key>
x-tenant-id: your-tenant-id
{
"defaultView": "story",
"developerModeEnabled": false,
"enabledStoryTypes": ["customer", "order"]
}