AfriHarvex Developers
/api/v1/. Future shape changes ship under /v2.<iframe src="https://afriharvex.com/embed/storefront/<slug>" width="320" height="460" frameborder="0" style="border:0;border-radius:14px"></iframe>
π‘ JSON API
Storefront Β· GET CORS 120s
/api/v1/storefront/<slug> β fetch a single storefront + its 50 most recent active listings.
# curl example curl https://afriharvex.com/api/v1/storefront/jamsrock # Response (200) { "storefront": { "id": "f74be819-716b-4ed8-a766-178910ff3e9b", "slug": "jamsrock", "name": "Jamsrock", "industry": "Agriculture", "country": "Nigeria", "about": "We buy and sell", "logo_url": null, "cover_url": null, "verified": false, "loyalty_level": "bronze", // bronze | silver | gold | platinum | diamond "is_aggregator": false, // 20%-commission agent flag "url": "https://afriharvex.com/biz/jamsrock", "created_at": "2026-05-04T04:49:28.599764+00:00" }, "listings": [ { "id": "afa57af4-...", "name": "One crate of egg", "price": 6400, // major units (β¦, not kobo) "currency": "NGN", "unit": "crate", "qty": 1, "category": "livestock", "image_url": "https://...supabase.co/.../crate.jpg", "ships_internationally": false, "delivery_fee": 0 } ], "meta": { "api_version": "v1", "listing_count": 1, "fetched_at": "2026-05-26T22:30:00.000Z" } }
| Field | Type | Notes |
|---|---|---|
storefront.loyalty_level | string | One of bronze Β· silver Β· gold Β· platinum Β· diamond |
storefront.is_aggregator | bool | True = seller earns 20% on agent-sourced deals |
storefront.verified | bool | KYC-verified business |
listings[].price | number | Major units (β¦, not kobo). Divide cents by 100 already done. |
listings[].ships_internationally | bool | If false, only ships within seller's country |
Error responses: 404 {"error":"storefront not found"} for unknown / suspended slugs. 400 {"error":"invalid slug"} for malformed input.
π§© Embed Widget
Storefront card Β· GET 300s
/embed/storefront/<slug> β drop-in iframe with logo, name, verified pill, loyalty + aggregator chips, 3 top listings, and a "View on AfriHarvex β" CTA.
<!-- 320Γ460 card, suggested dimensions --> <iframe src="https://afriharvex.com/embed/storefront/jamsrock" width="320" height="460" frameborder="0" style="border:0;border-radius:14px"></iframe>
Click any part of the card opens the live storefront at /biz/<slug> in a new tab. Iframe-safe (frame-ancestors *) so it embeds anywhere β WordPress, Shopify, blogs, Notion, anywhere.
Sellers: grab your own embed snippet inside Profile β Dashboard β π± QR & embed code.
πΊοΈ Sitemap
/sitemap.xml β dynamic, enumerates every public non-suspended storefront slug. Rebuilds every hour at the edge. Use this for SEO crawler hints if you mirror or index AfriHarvex content.
π What you'll never see in the API
The public surface is intentionally narrow. Anything that could identify or contact a user is filtered out at the function head:
- No
emailΒ·phoneΒ·wallet_balanceΒ· KYC docs Β· trust score internals - No
buyer_idΒ·seller_idon the public endpoints β only the storefront identity - No deal ledgers, payment refs, or admin tables
π Coming next
- Public top-earners JSON endpoints (top referrers Β· agents Β· loyalty)
- Listing-detail embed widget (single product card)
- OAuth-scoped private API for partners (signed read access to own deals)
Questions? Bugs? Tag @afriharvex or open an issue. We ship the empire daily.