Skip to content

Fix: is_saved always false in /api/v1/products response even with valid token #435

@ngarahmady

Description

@ngarahmady

Hi Bagisto team 👋

I'm using the /api/v1/products endpoint to fetch the list of products for an authenticated customer.

Each product in the response includes an is_saved field. However, even if the customer has already added that product to the wishlist, the value of is_saved is always false.

Example:

  1. /api/v1/customer/wishlist confirms that product ID 2166 is in wishlist.
  2. But /api/v1/products returns:
{ "id": 2166, "is_saved": false }

Expected:

If the customer is authenticated via Bearer token, and a product is already wishlisted, then is_saved should return true for that product in the /products response.

Why it matters:
Many frontend apps show a wishlist (heart icon) in product grids and search results. Without a reliable is_saved, they have to cross-match with /wishlist manually.

Thanks in advance for fixing this! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions