Skip to content

Get Wishlist

Get all items in the authenticated user's wishlist.

Endpoint

GET /v1/products/wishlist/?currency_id={currency_id}

Authentication

Required (User role)

Query Parameters

Parameter Type Required Description
currency_id integer Yes Currency ID for price display

Response

Success (200 OK)

Returns an array of wishlist items:

[
  {
    "id": 1,
    "product": {
      "id": 5,
      "product_id": 10,
      "product": {
        "id": 10,
        "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",
      "description_es": "Descripción del Producto",
      "description_de": "Produktbeschreibung",
      "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": true,
      "created": "2025-01-15T10:30:00Z"
    }
  }
]

Error Responses

Unauthorized (401)

{
  "error": "Missing token on header!"
}

Currency Not Found (404)

{
  "error": "Currency not found"
}

Example Request

curl -X GET "https://api.luxmart.site/v1/products/wishlist/?currency_id=1" \
  -H "Authorization: Token your_access_token"

Notes

  • Returns all wishlist items for the authenticated user
  • Results are ordered by ID descending (newest first)
  • 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)
  • is_wish will always be true for items in the wishlist
  • Only returns non-deleted product variants
  • 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