Dynamic section rendring API is returning 404

Hi,

I have a section on product page that showsf products from main products’s variants metafields. i-e when main product variant changes the products in that section should chnage pased on variant selected. I am using section rendering api to chnage the section products based on variant selected. But it is giving me 404 error. Here is my code

fetch(‘/products/’+this.productHandle+‘?section_id=shopify-section-template–17825889157344__wear_it_with_ntyGjJ&variant_id=’+this.currentVariant.id)
.then((response) => {
$(“#shopify-section-template–17825889157344__wear_it_with_ntyGjJ”).replaceWith(response);
})
.then(data => {
console.log(data);
});

Any help would be appreciated

Thanks