Stores
Search Store

Search Store

Fetch all data store by query name for customer

Endpoint

Base URL
http://localhost:8080
Method and Endpoint
GET /api/sellers/current/products/search
Headers
Authorization: Bearer access_token

Responses

You will get example responses like this:

200 (success)

Response Body
{
  "message": "Search store by Name successfully",
  "data": [
    {
      "id": "60c72b2f9b1e8b3d4c8d2c6e",
      "name": "TechStore",
      "description": "Your one-stop shop for the latest tech gadgets.",
      "logo": "https://example.com/images/logo_techstore.jpg",
      "banner": "https://example.com/images/banner_techstore.jpg",
      "created_at": "2024-01-15T10:20:30.370Z",
      "updated_at": "2024-05-30T10:20:30.370Z",
      "email": "contact@techstore.com",
      "store_id": "ST123456",
      "contact": {},
      "address": {}
    },
    {
      "id": "60d72b2f9b1e8b3d4c8d2c6f",
      "name": "GadgetHub",
      "description": "Best deals on gadgets and accessories.",
      "logo": "https://example.com/images/logo_gadgethub.jpg",
      "banner": "https://example.com/images/banner_gadgethub.jpg",
      "created_at": "2023-11-10T12:00:00.370Z",
      "updated_at": "2024-05-30T11:00:30.370Z",
      "email": "info@gadgethub.com",
      "store_id": "ST789012",
      "contact": {},
      "address": {}
    }
  ]
}

401 (unauthorized)

Response Body
{
  "error": "Invalid authorization header"
}

401 (unauthorized - expire token)

Response Body
{
  "error": "token is expired: token is expired by 2m19s"
}

401 (not found)

Response Body
{
  "error": "no store was found"
}

500 (server error)

Response Body
{
  "error": "Internal server error"
}

500 (server error - failed)

If query to database get troble while get the store data

Response Body
{
  "error": "failed to get all store by query"
}