API Documentation
REST API reference for marketplace clients and integrations.
Authentication
Authentication uses the existing secure session cookie for private endpoints.
Roles
super_admin, business_store, store, seller, buyer, viewer
Control product count, media size, and selling permissions for every account role. Zero products means unlimited only for selling roles.
/api/v1/locationsPublicReady-to-select province/capital, district, commune/sangkat, and village hierarchy.
Query
type=province|municipality|district|commune|village
parent=01
Use the returned code as parent to load the next administrative level.
Response
{
"data": [ ... ],
"meta": { "count": 1 }
}
Try endpoint
/api/v1/productsPublicPublished products with store, price, stock, and promotion data.
Query
?q=tomatoAuthenticated responses may include distance_km when both buyer and public store coordinates are available.
Response
{
"data": [ ... ],
"meta": { "count": 1 }
}
Try endpoint
/api/v1/storesPublicActive public stores and verification data.
Exact coordinates are returned only for stores whose location visibility is public.
Response
{
"data": [ ... ],
"meta": { "count": 1 }
}
Try endpoint
/api/v1/meSessionCurrent authenticated account profile and wallet summary.
Response
{
"data": [ ... ],
"meta": { "count": 1 }
}
Try endpoint
/api/v1/ordersSessionAuthenticated buyer or seller order records.
Super admin sees all orders; selling roles see their store orders; buyers/viewers see their own orders.
Response
{
"data": [ ... ],
"meta": { "count": 1 }
}
Try endpoint
/api/v1/notificationsSessionAuthenticated account notifications.
Response
{
"data": [ ... ],
"meta": { "count": 1 }
}
Try endpoint
API examples
curl -H "Accept: application/json" \
"https://phumikasephal.com/api/v1/locations"
curl -H "Accept: application/json" \
"https://phumikasephal.com/api/v1/products?q=rice"
Private endpoint: send the authenticated session cookie.