Manage Seller Address
Managing seller address
Endpoint
Base URL
http://localhost:8080Add Addresses
Method and Endpoint
POST /api/sellers/current/addressesHeaders
Authorization: Bearer access_tokenRequest Body
Request Body
{
"house_name": "house-name",
"street_name": "street-name",
"city_name": "city-name",
"pin_code": "12345"
}Responses
You will get responses like this:
200 (success)
Response Body
{
"message": "Successfully add seller address"
}401 (unauthorized)
Response Body
{
"error": "Invalid authorization header"
}401 (unauthorized - expire token)
Response Body
{
"error": "token is expired: token is expired by 2m19s"
}500 (server error - already added)
Response Body
{
"error": "seller already has an address"
}500 (server error)
Response Body
{
"error": "Internal server error"
}Get Addresses
Method and Endpoint
GET /api/sellers/current/addressesHeaders
Authorization: Bearer access_tokenResponses
You will get responses like this:
200 (success)
Response Body
{
"message": "Successfully get seller address",
"result": {
"house_name": "house-name",
"street_name": "street-name",
"city_name": "city-name",
"pin_code": "12345"
}
}401 (unauthorized)
Response Body
{
"error": "Invalid authorization header"
}401 (unauthorized - expire token)
Response Body
{
"error": "token is expired: token is expired by 2m19s"
}500 (server error)
Response Body
{
"error": "Internal server error"
}Edit Addresses
Method and Endpoint
POST /api/sellers/current/addressesHeaders
Authorization: Bearer access_tokenResponses
You will get responses like this:
200 (success)
Response Body
{
"message": "Successfully update seller address"
}401 (unauthorized)
Response Body
{
"error": "Invalid authorization header"
}401 (unauthorized - expire token)
Response Body
{
"error": "token is expired: token is expired by 2m19s"
}500 (server error)
Response Body
{
"error": "Internal server error"
}Delete Addresses
Method and Endpoint
DELETE /api/sellers/current/addressesHeaders
Authorization: Bearer access_tokenResponses
You will get responses like this:
200 (success)
Response Body
{
"message": "Successfully remove seller address"
}401 (unauthorized)
Response Body
{
"error": "Invalid authorization header"
}401 (unauthorized - expire token)
Response Body
{
"error": "token is expired: token is expired by 2m19s"
}500 (server error)
Response Body
{
"error": "Internal server error"
}