While using the product API, the categories are passed as categoryPath and it must be passed in the same way to the recommendation requests.
Depending on the option how the product database transfer is integrated, you need to call different methods to get product recommendations for the product category screen.