Skip to content

Search Products By Store

Search for products by a specific store. Public endpoint.

Endpoint

GET /v1/products/store/site/by/?id={store_id}

Authentication

Not required (public endpoint)

Query Parameters

Parameter Type Required Description
id integer Yes Store ID
page integer Yes Page number (starts at 1)
count integer Yes Items per page (max 100)
search string No Search term (searches in product name and description)
lang string No Language code for search ("az", "en", "es", "de")
currency_id integer No Currency ID for price conversion

Response

Success (200 OK)

{
  "count": 25,
  "data": [
    {
      "id": 1,
      "product_id": 5,
      "product": {...},
      "name_az": "Məhsul Adı",
      "name_en": "Product Name",
      "sku": "SKU-001",
      "stock_quantity": 100,
      "price": 29.99,
      "discount_percent": 10.0,
      "discount_price": 26.99,
      "currency_name": "AZN",
      "attributes": [
        {
          "id": 1,
          "attribute_id": 1,
          "attribute_name": "Color",
          "attribute_name_az": "Rəng",
          "attribute_name_en": "Color",
          "attribute_name_es": "Color",
          "attribute_name_de": "Farbe",
          "attribute_type": "select",
          "value": "Red",
          "value_az": "Qırmızı",
          "value_en": "Red",
          "value_es": "Rojo",
          "value_de": "Rot",
          "is_filter": true,
          "is_view": true
        }
      ],
      "images": [...],
      "is_wish": false,
      "created": "2025-01-15T10:30:00Z"
    }
  ]
}

Error Responses

Missing ID Parameter (400)

{
  "message": "Param not send!"
}

Pagination Error (400)

{
  "error": "page cannot be zero or minus"
}

Example Request

curl -X GET "https://api.luxmart.site/v1/products/store/site/by/?id=3&page=1&count=20&search=laptop&lang=en&currency_id=1"

Notes

  • Only returns products from the specified store
  • Only returns non-deleted product variants
  • Search matches against product name and description in the specified language
  • If lang is not provided, search may not work correctly
  • is_wish indicates if the product is in the user's wishlist (requires authentication header)
  • Price is converted to specified currency if currency_id is provided
  • discount_percent is the discount percentage (0 if no discount)
  • discount_price is the final price after discount (calculated from converted price if currency_id is provided)
  • Results are ordered by ID descending (newest first)
  • This is a public endpoint, no authentication required
  • Attribute names and values include translations for all supported languages (attribute_name_az, attribute_name_en, attribute_name_es, attribute_name_de, value_az, value_en, value_es, value_de)
  • Base fields (attribute_name, value) are kept for backward compatibility