Missing product attributes in Commerce.js API response

212 views Asked by At

I've had an issue when sending requests to fetch products from the Commerce.js API.

It's that I cannot retrieve the list of attributes I set for each product from the UI that this service provides.

Product Attributes

API Response

In the API docs, it is shown that it's possible to fetch the attributes of each product.

Otherwise, would you please suggest any alternative to Commerce.js that is highly customizable?

2

There are 2 answers

2
Sofia Kyriazi On BEST ANSWER

I had the same problem. In case you used Commerce SDK, I tried that at first but it seems that it doesn't return the attributes. Instead you can try retrieving the products using the fetch API with the secret key. That worked for me

0
Alaa Asaad On

Make sure the Attribute itself set to Visible, it's by default Private that can't be fetched

1