Skip to main content

Create Local Seller

Method: POST
/api/v1/local-sellers

Description

Create a new local seller (e.g., farmers or merchants) under a tenant’s account.

🔑 Authentication

This endpoint requires authentication via headers.

ParamValueType
tenantId{{tenantId}}string
userId{{userId}}string
countryCode{{countryCode}}string (optional)

Request Body

NameTypeDescription
typestringType of seller (e.g., FARMER, RETAILER)
firstNamestringFirst name of the seller
lastNamestringLast name of the seller
emailstringSeller’s email address
countryobjectCountry information
stateobjectState information
lgaobjectLocal Government Area (LGA) details
addressstringPhysical address of the seller
phonestringPhone number
photostringURL to the seller’s photo
dobdate-timeDate of birth
ninnumberNational Identification Number (NIN)
ninDocumentstringURL to NIN document
addressesarrayAdditional addresses associated with the seller
hasSmartphonebooleanIndicates whether the seller has a smartphone
hasBankAccountbooleanIndicates whether the seller has a bank account
businessIdstringAssociated business ID
userIdstringUser ID of the seller
tenantIdstringTenant ID associated with the seller

Example Request

POST /api/v1/local-sellers
Authorization: Bearer {{tenantUserAccessToken}}
Content-Type: application/json

Body

{
"type": "FARMER",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"country": {
"name": "Nigeria",
"code": "NG",
"currency": "NGN"
},
"state": {
"name": "Lagos",
"code": "LA"
},
"lga": {
"name": "Ikeja",
"code": "IK"
},
"address": "123 Market Road",
"phone": "+2348012345678",
"photo": "https://example.com/seller-photo.png",
"dob": "2025-02-12T04:04:39.986Z",
"nin": 1234567890,
"ninDocument": "https://example.com/nin-document.png",
"hasSmartphone": true,
"hasBankAccount": true,
"businessId": "business123",
"userId": "user123",
"tenantId": "tenant123"
}

Response: 201

{
"sellerId": "67a81ecca9a55da218c22c35",
"type": "FARMER",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"address": "123 Market Road",
"createdAt": "2025-02-12T04:04:39.986Z",
"tenantId": "tenant123"
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--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!