Update Local Seller
Method: PATCH
/api/v1/local-sellers/{localSellerId}
Description
This endpoint updates the details of a specific local seller (e.g., farmer or merchant). It allows updating personal information, business details, ESG compliance documents, and addresses.
🔑 Authentication
This endpoint requires authentication via headers.
| Param | Value | Type |
|---|---|---|
tenantId | {{tenantId}} | string |
userId | {{userId}} | string |
countryCode | {{countryCode}} | string (optional) |
Path Parameter
| Name | Type | Description |
|---|---|---|
localSellerId | string | The unique ID of the local seller. |
Request Body
{
"type": "FARMER",
"firstName": "string",
"lastName": "string",
"email": "string",
"hasSmartphone": false,
"hasBankAccount": false,
"country": {
"name": "string",
"code": "string",
"currency": "string"
},
"state": {
"name": "string",
"code": "string"
},
"lga": {
"name": "string",
"code": "string"
},
"address": "string",
"phone": "string",
"photo": "string",
"dob": 0,
"nin": 0,
"ninDocument": 0,
"addresses": [
{
"docLinks": [
{
"name": "SUSTAINABILITY",
"esgRequirement": "LABOR_PRACTICES",
"status": "NON_COMPLIANT",
"link": "string",
"hasSignOfDeforestation": false,
"isProtectedArea": false
}
],
"name": "string",
"address": "string",
"country": {
"name": "string",
"code": "string",
"currency": "string"
},
"state": {
"name": "string",
"code": "string"
},
"lga": {
"name": "string",
"code": "string"
},
"latitude": 0,
"longitude": 0,
"location": {
"type": "string",
"coordinates": [
"string"
]
},
"size": 0
}
],
"businessId": "string",
"userId": "string",
"tenantId": "string"
}
Request Body Explanation
| Name | Type | Description |
|---|---|---|
type | string | Type of seller (e.g., "FARMER" or "MINER"). |
firstName | string | The first name of the local seller. |
lastName | string | The last name of the local seller. |
email | string | The email address of the seller. |
hasSmartphone | boolean | Indicates if the seller has a smartphone. |
hasBankAccount | boolean | Indicates if the seller has a bank account. |
country | object | Country information (name, code, and currency). |
state | object | State information (name and code). |
lga | object | Local Government Area (LGA) information (name and code). |
address | string | The primary address of the local seller. |
phone | string | The seller’s phone number. |
photo | string | A URL to the seller’s photo. |
dob | number | The date of birth of the seller. |
nin | number | The seller’s National Identification Number (NIN). |
ninDocument | number | A URL to the NIN document. |
addresses | array | List of additional addresses associated with the local seller. |
addresses[].docLinks | array | Links to ESG compliance documents. |
addresses[].docLinks[].name | string | The name of the document (e.g., "SUSTAINABILITY"). |
addresses[].docLinks[].esgRequirement | string | ESG category (e.g., "LABOR_PRACTICES"). |
addresses[].docLinks[].status | string | Compliance status (e.g., "NON_COMPLIANT"). |
addresses[].docLinks[].link | string | A URL linking to the document. |
addresses[].docLinks[].hasSignOfDeforestation | boolean | Indicates if deforestation signs were detected. |
addresses[].docLinks[].isProtectedArea | boolean | Indicates if the location is a protected area. |
addresses[].name | string | The name or description of the address (e.g., "Main Warehouse"). |
addresses[].address | string | The full physical address. |
addresses[].country | object | Country information (name, code, currency). |
addresses[].state | object | State information (name, code). |
addresses[].lga | object | Local Government Area details (name, code). |
addresses[].latitude | number | Latitude of the address location. |
addresses[].longitude | number | Longitude of the address location. |
addresses[].location | object | GeoJSON-style location information (type and coordinates). |
addresses[].size | number | The size of the location (e.g., farm size in hectares). |
businessId | string | The ID of the business associated with the local seller. |
userId | string | The ID of the user submitting the update. |
tenantId | string | The ID of the tenant associated with the local seller. |
Example Response
{
"message": "Local seller updated successfully.",
"sellerId": "12345",
"updatedDetails": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+2348012345678",
"address": "123 Main Street",
"type": "FARMER"
}
}
LANGUAGE
CURL REQUEST
curl --request PATCH \
--url /api/v1/local-sellers/{localSellerId} \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!