Skip to main content

Get Local Sellers

Method: GET
/api/v1/local-sellers


Description

This endpoint retrieves a list of local sellers (e.g., farmers or merchants) based on the provided filters. You can search by various criteria such as name, address, status, and date range.


🔑 Authentication

This endpoint requires authentication via headers.

ParamValueType
tenantId{{tenantId}}string
userId{{userId}}string
countryCode{{countryCode}}string

Query Parameters

NameTypeDescription
localSellerSearchstringSearch for sellers by name or keyword.
localSellerDateRangestringFilter sellers by date range (e.g., 2020-11-12,2022-11-15).
localSellerByAddressstringSearch sellers by address.
localSellerByLgastringFilter sellers by Local Government Area (comma-separated city codes).
localSellerByStatesstringFilter sellers by states (comma-separated state codes).
localSellerByCountriesstringFilter sellers by countries (comma-separated country codes).
localSellerByTypesstringFilter sellers by type (FARMER, MINER).
localSellerByPhonestringSearch sellers by phone number.
localSellerByLastNamestringSearch sellers by last name.
localSellerByStatusesstringFilter sellers by status (PENDING, ACCEPTED, REJECTED, AWAITING_APPROVAL).
localSellerByFirstnamestringSearch sellers by first name.
localSellerByEmailstringSearch sellers by email address.
byTenantIdsstringFilter by tenant IDs (comma-separated).
byUserIdsstringFilter by user IDs (comma-separated).
byBusinessIdsstringFilter by business IDs (comma-separated).
orderstringSort results in ascending (ASC) or descending (DESC) order.
pagestringSpecify the page number for paginated results.
limitstringSpecify the number of results per page.

Example Request

GET /api/v1/local-sellers?localSellerByStates=LA,AB&page=1&limit=10  

Response: 200

[
{
"sellerId": "67a81ecca9a55da218c22c35",
"type": "FARMER",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"address": "123 Market Road",
"state": "Lagos",
"country": "Nigeria",
"phone": "+2348012345678",
"createdAt": "2025-02-12T04:04:39.986Z",
"status": "ACCEPTED"
},
{
"sellerId": "89b23fdda1c99cb443f87d02",
"type": "MINER",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane.smith@example.com",
"address": "45 Gold Street",
"state": "Abuja",
"country": "Nigeria",
"phone": "+2348098765432",
"createdAt": "2025-02-10T11:22:30.000Z",
"status": "PENDING"
}
]

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/local-sellers \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!