Problem with jsonapi product (with image)

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
bar_on
Posts: 17
Joined: 28 Jul 2024, 01:45

Problem with jsonapi product (with image)

Post by bar_on » 03 Jul 2025, 06:32

Product with media (images) is not listed in the jsonapi/product?include=product.media API.
Not just the included media, but the product itself is also hidden.

I had a product without media that could be shown successfully, but not after I add the media.

Any ideas why this would happen? I did clear some tables (mshop_media) before this problem arises, due to loss of media storage, and was trying to remove all the media.

let url =
import.meta.env.VITE_SERVER_DOMAIN +
`/jsonapi/product?sort=${sortBy}&include=product.media,product.price,product.category,product,attribute`

API used.

User avatar
aimeos
Administrator
Posts: 8624
Joined: 01 Jan 1970, 00:00

Re: Problem with jsonapi product (with image)

Post by aimeos » 03 Jul 2025, 08:07

Guess, the problem is somewhere else. The product isn't returned by the JSON API most likely even if you add no "include" parameter at all. Can you check and see if this product is enabled and doesn't have any start/end time restrictions?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

bar_on
Posts: 17
Joined: 28 Jul 2024, 01:45

Re: Problem with jsonapi product (with image)

Post by bar_on » 04 Jul 2025, 07:50

I've found out that if those products not showing does not have a category selected. Once I select a category it will show up in the API. Not sure if this is intended but it's good for now.

The version I'm using is aimeos 2023.10.9.

Post Reply