How can I render a section template with AJAX on a product page?

Hey

Your API call is a request for a homepage’s section! So, obviously, it has no product/collection data

With section rendering, if you want to add product/collection context simply call

fetch(`/products/your-product-handle?section_id=your-section-id`)

Same for collection.