Skip to main content

Add Local Seller Address

Method: POST
/api/v1/local-sellers/{localSellerId}/address


Description

This endpoint adds an address for a specific local seller (e.g., farmer or merchant). It allows users to associate multiple addresses with a local seller, along with additional documentation and location details.


🔑 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

{
"addresses": [
{
"docLinks": [
{
"name": "SUSTAINABILITY",
"esgRequirement": "LABOR_PRACTICES",
"status": "NON_COMPLIANT",
"link": "https://example.com/document.pdf",
"hasSignOfDeforestation": false,
"isProtectedArea": false
}
],
"name": "Primary Farm",
"address": "123 Farm Road",
"country": {
"name": "Nigeria",
"code": "NG",
"currency": "NGN"
},
"state": {
"name": "Lagos",
"code": "LA"
},
"lga": {
"name": "Ikeja",
"code": "IK"
},
"latitude": 6.5244,
"longitude": 3.3792,
"location": {
"type": "Point",
"coordinates": [
"3.3792",
"6.5244"
]
},
"size": 10
}
],
"userId": "user123",
"tenantId": "tenant123"
}

Request Body Explanation

NameTypeDescription
addressesarrayList of 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., "Primary Farm").
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).
userIdstringThe ID of the user submitting the address.
tenantIdstringThe ID of the tenant associated with the local seller.

Response: 201 Created

{
"message": "Address added successfully.",
"sellerId": "12345",
"addresses": [
{
"name": "Primary Farm",
"address": "123 Farm Road",
"country": {
"name": "Nigeria",
"code": "NG",
"currency": "NGN"
},
"state": {
"name": "Lagos",
"code": "LA"
},
"lga": {
"name": "Ikeja",
"code": "IK"
},
"latitude": 6.5244,
"longitude": 3.3792,
"size": 10
}
]
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /api/v1/local-sellers/{localSellerId}/address \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


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