I had a problem with incorrect route setup, which I've fixed, but I don't fully understand why the fix worked.
[ApiController]
[Route("api/[controller]")
public class DetailsController : ControllerBase
{
[HttpGet]
[Route("api/[controller]/{transactNo}")]
public IActionResult Detail(int transactNo)
{
...
When I was calling api/details/123 I was getting route not found, until I removed the Route attribute from the class. So I guess they were conflicting, but why?