API Reference
Store & Products API
Manage your Kerabie store, products, orders, and product analytics.
The Store API lets you manage products, process orders, and track per-product analytics (views, inquiries, sales).
Products
List products
GET /store/products
Authorization: Bearer YOUR_API_KEY{
"products": [
{
"id": 1,
"name": "Blue Sneakers",
"price": 15000,
"currency": "NGN",
"imageUrl": "https://...",
"category": "Footwear",
"stock": 24,
"views": 312,
"inquiries": 18,
"salesCount": 9,
"salesAmount": 135000
}
]
}Create a product
POST /store/products
Authorization: Bearer YOUR_API_KEY{
"name": "Blue Sneakers",
"description": "Comfortable everyday sneakers",
"price": 15000,
"currency": "NGN",
"category": "Footwear",
"imageUrl": "https://...",
"stock": 50,
"sku": "SNKR-BLU-001"
}Product analytics (per-product stats)
GET /store/products/stats
Authorization: Bearer YOUR_API_KEYReturns products sorted by views (most viewed first), with view count, inquiry count, sales count, and revenue.
{
"products": [
{
"id": 1,
"name": "Blue Sneakers",
"views": 312,
"inquiries": 18,
"salesCount": 9,
"salesAmount": 135000
}
]
}Public Storefront
These endpoints are unauthenticated and called by your public storefront.
Track product view
Called automatically by the Kerabie storefront when a visitor adds a product to cart.
POST /public/store/{slug}/view/{productId}
Content-Type: application/json{ "sessionId": "ks_abc123" }Track product inquiry
Call this when a visitor opens chat asking about a specific product.
POST /public/store/{slug}/inquiry/{productId}Orders
List orders
GET /store/orders?status=pending
Authorization: Bearer YOUR_API_KEYUpdate order status
PATCH /store/orders/{id}
Authorization: Bearer YOUR_API_KEY{ "status": "fulfilled" }Status values: pending | paid | fulfilled | cancelled