Skip to content

Commerce API

The commerce namespace exposes the BushTrade product surface—local businesses, products and offers, buyer inquiries, and scam reports. It is backed by the mukoko_bushtrade_db Supabase project.

Use these endpoints when building consumer or partner experiences that browse listings, accept inquiries, or surface trust signals.

Base path: /v1/commerce

MethodPathAuthPurpose
GET/v1/commerce/productsOptionalList products. Supports business_id, limit, offset.
GET/v1/commerce/products/{product_id}OptionalFetch a single product.
POST/v1/commerce/productsRequiredCreate a product owned by the caller.
GET/v1/commerce/businessesOptionalList local businesses.
GET/v1/commerce/businesses/{business_id}OptionalFetch a single business.
GET/v1/commerce/offersOptionalList offers. Supports product_id.
POST/v1/commerce/inquiriesRequiredSend an inquiry against a product or business.
POST/v1/commerce/scam-reportsRequiredReport a product, business, or offer for review.
Terminal window
curl "https://api.nyuchi.com/v1/commerce/products?limit=20"
{
"data": [
{ "id": "p_01", "name": "Honey 500g", "price": 4.5, "currency": "USD", "business_id": "b_42" }
],
"count": 1
}
Terminal window
curl -X POST https://api.nyuchi.com/v1/commerce/products \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Honey 500g",
"description": "Wild forest honey, harvested in Mashonaland.",
"price": 4.5,
"currency": "USD",
"business_id": "b_42"
}'

The caller’s identity is recorded as created_by automatically.

Inquiries always belong to the authenticated person.

Terminal window
curl -X POST https://api.nyuchi.com/v1/commerce/inquiries \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "product_id": "p_01", "message": "Do you ship to Bulawayo?" }'

target_type must be product, business, or offer. The reporter is recorded automatically.

Terminal window
curl -X POST https://api.nyuchi.com/v1/commerce/scam-reports \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "target_type": "product", "target_id": "p_01", "reason": "Listed at impossible price." }'