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.
| Param | Value | Type |
|---|---|---|
tenantId | {{tenantId}} | string |
userId | {{userId}} | string |
countryCode | {{countryCode}} | string (optional) |
Request Body
| Name | Type | Description |
|---|---|---|
type | string | Type of seller (e.g., FARMER, RETAILER) |
firstName | string | First name of the seller |
lastName | string | Last name of the seller |
email | string | Seller’s email address |
country | object | Country information |
state | object | State information |
lga | object | Local Government Area (LGA) details |
address | string | Physical address of the seller |
phone | string | Phone number |
photo | string | URL to the seller’s photo |
dob | date-time | Date of birth |
nin | number | National Identification Number (NIN) |
ninDocument | string | URL to NIN document |
addresses | array | Additional addresses associated with the seller |
hasSmartphone | boolean | Indicates whether the seller has a smartphone |
hasBankAccount | boolean | Indicates whether the seller has a bank account |
businessId | string | Associated business ID |
userId | string | User ID of the seller |
tenantId | string | Tenant 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
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!