Using list-variable as param in path of url

Hi! Cannot find the solution for the task. I will reduce it to a small example.
Let’s suggest I have two api endpoints. The first one can return me some IDs. I use it as query variable. And the second one is quite simple:
What i want is to get all messages from each IDs that returned the first query.
What i do. I created the data source as some_host:port/shops and tried to add the path in grafana as $id/message, but in query inspector, i see that all IDs were added to the query. Also, i tried turn on repeating options, but it helps only in field input. In addition info i use JSON API datasource from: