+ +
+

Bringing Farmers & Customers Together

+

Our API bridges the gap between local farmers and customers, creating a seamless marketplace for fresh, farm-to-table products.

+ +
+
+
๐Ÿ‘จโ€๐ŸŒพ
+

Farmers

+

List products, manage inventory, set flexible pricing (per kg, unit, wholesale), and receive orders directly from customers.

+
+ +
โ†”
+ +
+
๐Ÿ›’
+

Customers

+

Browse fresh produce, place orders, make secure payments, and leave reviews to support local farming.

+
+
+
+ + +
+

๐ŸŒพ Farm Products You Can Sell

+

From fresh vegetables to seasonal fruits, dairy products to grainsโ€”list and sell any farm product through our API.

+
+
+ Fresh vegetables and greens +
Fresh Vegetables & Greens
+
+
+ Seasonal fruits +
Seasonal Fruits & Berries
+
+
+ Dairy products +
Dairy Products & Eggs
+
+
+ Grains and cereals +
Grains, Cereals & Seeds
+
+
+ Herbs and spices +
Herbs & Aromatics
+
+
+ Root vegetables +
Root Vegetables & Tubers
+
+
+
+ +
-

๐Ÿš€ RESTful API

-

Modern REST API built with Node.js, Express, and TypeScript for seamless integration

+
+

๐Ÿ‘จโ€๐ŸŒพ Farmer Features

+

Complete product management with multiple pricing options, order tracking, customer reviews, and sales analytics.

-

๐Ÿ” Secure Authentication

-

JWT-based authentication with OAuth support for Google and Facebook login

+
+

๐Ÿ›’ Customer Experience

+

Advanced search & filtering, favorites, order history, secure checkout, and easy communication with farmers.

-

๐Ÿ“ฑ Mobile Ready

-

Optimized for mobile applications with push notifications and real-time updates

+
+

๐Ÿ” Enterprise Security

+

JWT authentication, role-based access control, rate limiting, data validation, and comprehensive security headers.

+
+
+

๐Ÿ’ณ Flexible Payment Options

+

Built-in (AdwaPay): Use POST /paymentCollection/mobile for integrated card or mobile money payments. External Providers: Integrate your own payment gateway (Stripe, Flutterwave, M-Pesa) and confirm via POST /payment/confirm-external. Full transaction lifecycle management with webhooks and notifications.

+ +
+

๐Ÿ’ณ Payment Collection System

+

Choose between our built-in payment provider or integrate your preferred payment gatewayโ€”both options fully supported with comprehensive documentation.

+
+
+

Built-in Provider (AdwaPay)

+

Streamlined payment collection supporting card and mobile money. Includes redirect flows, status polling, and automatic webhook notifications.

+
+ POST + /api/v2/transactions/:orderId/paymentCollection/mobile +
+
+
+

External Payment Gateway

+

Use your existing payment infrastructure (Stripe, Flutterwave, M-Pesa, etc.). Process payments externally, then confirm with our API for order updates and notifications.

+
+ POST + /api/v2/transactions/payment/confirm-external +
+
+
+

Configuration: PAYMENT_DEFAULT_PROVIDER=adwa or use ?provider=adwa query parameter. Complete webhook integration available at /transactions/webhook/adwapay. See full documentation for details.

+
+ +
-

๐Ÿ› ๏ธ Technology Stack

+

๐Ÿ› ๏ธ Built With Modern Technology

Node.js
Express.js
TypeScript
PostgreSQL
Sequelize ORM
-
JWT Authentication
+
JWT Auth
Nodemailer
Cloudinary
-
-

๐Ÿ”— API Endpoints

+ +
+

๐Ÿ”— API Endpoints Overview

-

Authentication

+

๐Ÿ”‘ Authentication

POST - /api/v1/auth/signup - User registration with OTP verification + /api/v2/auth/signup - User registration (OTP disabled; keeping auth simple)
POST - /api/v1/auth/login - User login with JWT tokens + /api/v2/auth/login - User login with JWT token generation
-
+ +
POST - /api/v1/auth/refreshToken - Refresh JWT access token + /api/v2/auth/refreshToken - Refresh JWT access tokens
-

Products

+

๐ŸŒพ Products Management

GET - /api/v1/products - Get all products with pagination + /api/v2/products - List all products with pagination & filters
POST - /api/v1/products - Create new product (Farmers only) + /api/v2/products - Create new product (Farmers only)
GET - /api/v1/products/:id - Get product by ID + /api/v2/products/:id - Get detailed product information
PUT - /api/v1/products/:id - Update product (Owner only) + /api/v2/products/:id - Update product details (Owner only)
DELETE - /api/v1/products/:id - Delete product (Owner only) + /api/v2/products/:id - Delete product (Owner only)
-

Orders & Transactions

+

๐Ÿ“ฆ Orders & Transactions

POST - /api/v1/orders - Create new order + /api/v2/orders - Create new order with cart items
GET - /api/v1/orders - Get user orders + /api/v2/orders - Get user order history
POST - /api/v1/payments - Process payment + /api/v2/payments - Process payment for order
-

User Management

+

๐Ÿ‘ค User Management

GET - /api/v1/users/profile - Get user profile + /api/v2/users/profile - Get current user profile
PUT - /api/v1/users/profile - Update user profile + /api/v2/users/profile - Update user profile information
POST - /api/v1/users/upload-avatar - Upload profile picture + /api/v2/users/upload-avatar - Upload profile picture
+
-

๐Ÿ”’ Secure

-

JWT authentication, input validation, and rate limiting

+

๐Ÿ”’ Secure Authentication

+

JWT-based auth with refresh tokens, role-based access control, and session management. (OTP verification disabled โ€” keeping auth simple.)

-

๐Ÿ“Š Scalable

-

Built with scalability in mind using modern architecture patterns

+

๐Ÿ“Š Highly Scalable

+

Built with modern architecture patterns, optimized database queries, and designed to handle growth.

-

๐Ÿ“ฑ Mobile-First

-

Optimized for mobile applications with responsive design

+

๐Ÿ”Œ API-First Design

+

Pure REST API backendโ€”integrate with any frontend: mobile apps, web applications, or third-party platforms.

-

๐ŸŒ Real-time

-

Push notifications and real-time updates for better user experience

+

๐Ÿ”” Real-time Updates

+

Push notifications, webhooks, email alerts, and instant order status updates for seamless user experience.

-
-

๐Ÿš€ Getting Started

-

- Start building your farming marketplace application today! -

- + +
+

๐Ÿš€ Ready to Get Started?

+

Integrate the Farm Marketplace API into your application in minutes with our comprehensive documentation.

+
+

Base URL & Documentation

+

+ /api/v2 +

+

+ ๐Ÿ“– Complete OpenAPI Documentation โ†’ +

+

+ Includes: Authentication guides, endpoint references, request/response schemas, error codes, and code examples. +

+