Skip to main content

Update Local Seller Address

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


Description

This endpoint updates the address details for a specific local seller. It allows updating the address, ESG compliance documents, location details, and other related information for the seller.


🔑 Authentication

This endpoint requires authentication via headers.

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

Path Parameters

NameTypeDescription
localSellerIdstringThe unique ID of the local seller.
addressIdstringThe unique ID of the address to update.

Request Body

{
"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
}

Request Body Explanation

NameTypeDescription
docLinksarrayLinks to ESG compliance documents.
docLinks[].namestringThe name of the document (e.g., "SUSTAINABILITY").
docLinks[].esgRequirementstringESG category (e.g., "LABOR_PRACTICES").
docLinks[].statusstringCompliance status (e.g., "NON_COMPLIANT").
docLinks[].linkstringA URL linking to the document.
docLinks[].hasSignOfDeforestationbooleanIndicates if deforestation signs were detected.
docLinks[].isProtectedAreabooleanIndicates if the location is a protected area.
namestringThe name or description of the address (e.g., "Main Warehouse").
addressstringThe full physical address.
countryobjectCountry information (name, code, currency).
stateobjectState information (name, code).
lgaobjectLocal Government Area details (name, code).
latitudenumberLatitude of the address location.
longitudenumberLongitude of the address location.
locationobjectGeoJSON-style location information (type and coordinates).
sizenumberThe size of the location (e.g., farm size in hectares).

Response: 200 OK

{
"message": "Address updated successfully.",
"sellerId": "12345",
"addressId": "67890",
"updatedAddress": {
"name": "Main Warehouse",
"address": "456 Market Street",
"country": {
"name": "Nigeria",
"code": "NG",
"currency": "NGN"
},
"state": {
"name": "Lagos",
"code": "LA"
},
"lga": {
"name": "Ikeja",
"code": "IK"
},
"latitude": 6.5244,
"longitude": 3.3792,
"size": 15
}
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


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

RESPONSE


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