-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
I am trying to use the /catalog/products/{product_id}/metafields endpoint to fetch metafields for the product. This product whose id I used exists, it has a metafields and the store api credentials are valid. But I keep getting this response.

Why is this so and how to get around this problem?
I have also tried /products/{product_id}/metafields as the get request endpoint.
The code I am trying.
const bigCommerce = new BigCommerce({
storeHash: 'xxxxxxxx',
clientId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
accessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
responseType: 'json',
});
module.exports = {
fetchProductMetafields: productId => {
return bigCommerce.get(`/catalog/products/${productId}/metafields`)
.then(metafields => {
return metafields;
});
}
}Am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels