Skip to main content

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.

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

Path Parameter

NameTypeDescription
localSellerIdstringThe 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

NameTypeDescription
typestringType of seller (e.g., "FARMER" or "MINER").
firstNamestringThe first name of the local seller.
lastNamestringThe last name of the local seller.
emailstringThe email address of the seller.
hasSmartphonebooleanIndicates if the seller has a smartphone.
hasBankAccountbooleanIndicates if the seller has a bank account.
countryobjectCountry information (name, code, and currency).
stateobjectState information (name and code).
lgaobjectLocal Government Area (LGA) information (name and code).
addressstringThe primary address of the local seller.
phonestringThe seller’s phone number.
photostringA URL to the seller’s photo.
dobnumberThe date of birth of the seller.
ninnumberThe seller’s National Identification Number (NIN).
ninDocumentnumberA URL to the NIN document.
addressesarrayList of additional addresses associated with the local seller.
addresses[].docLinksarrayLinks to ESG compliance documents.
addresses[].docLinks[].namestringThe name of the document (e.g., "SUSTAINABILITY").
addresses[].docLinks[].esgRequirementstringESG category (e.g., "LABOR_PRACTICES").
addresses[].docLinks[].statusstringCompliance status (e.g., "NON_COMPLIANT").
addresses[].docLinks[].linkstringA URL linking to the document.
addresses[].docLinks[].hasSignOfDeforestationbooleanIndicates if deforestation signs were detected.
addresses[].docLinks[].isProtectedAreabooleanIndicates if the location is a protected area.
addresses[].namestringThe name or description of the address (e.g., "Main Warehouse").
addresses[].addressstringThe full physical address.
addresses[].countryobjectCountry information (name, code, currency).
addresses[].stateobjectState information (name, code).
addresses[].lgaobjectLocal Government Area details (name, code).
addresses[].latitudenumberLatitude of the address location.
addresses[].longitudenumberLongitude of the address location.
addresses[].locationobjectGeoJSON-style location information (type and coordinates).
addresses[].sizenumberThe size of the location (e.g., farm size in hectares).
businessIdstringThe ID of the business associated with the local seller.
userIdstringThe ID of the user submitting the update.
tenantIdstringThe 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

AUTHORIZATION

Bearer

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!