Skip to content

Get All Variants (All Products)

Get a paginated list of all product variants across all products owned by the authenticated store.

Endpoint

GET /v1/products/store/all/

Authentication

Required (Store role)

Query Parameters

Parameter Type Required Description
page integer Yes Page number (starts at 1)
count integer Yes Items per page (max 100)
search string No Search by variant name (case-insensitive)

Response

Success (200 OK)

{
  "count": 25,
  "data": [
    {
      "id": 1,
      "product_id": 5,
      "product": {
        "id": 5,
        "store_id": 3,
        "store": {...},
        "category_id": 2,
        "category": {...},
        "brand_id": 1,
        "brand": {...},
        "currency_id": 1,
        "currency": {...},
        "created": "2025-01-15T10:30:00Z"
      },
      "name_az": "Məhsul Adı",
      "name_en": "Product Name",
      "name_es": "Nombre del Producto",
      "name_de": "Produktname",
      "description_az": "Məhsul Təsviri",
      "description_en": "Product Description",
      "sku": "SKU-001",
      "stock_quantity": 100,
      "price": 29.99,
      "attributes": [...],
      "images": [...],
      "created": "2025-01-15T10:30:00Z"
    }
  ]
}

Error Responses

Unauthorized (401)

{
  "error": "Unauthorized"
}

Example Request

curl -X GET "https://api.luxmart.site/v1/products/store/all/?page=1&count=20&search=laptop" \
  -H "Authorization: Token your_store_token"

Notes

  • Returns variants from all products owned by the authenticated store
  • Results are ordered by ID descending (newest first)
  • Only returns non-deleted products and variants
  • Includes full product details with store, category, brand, and currency information