How to set parameter from API response

Final API call looks like this:[[at(document.type%2C+“consultant”)]]

Here q is particular query.
And ref is a string representing the required content version (master, preview, release preview, etc).

I can retrieve the master ref using the /api endpoint
Screenshot 2020-11-24 175923

So first I need to get ref parameter then make an API call with this ref value.

In this case how should I set my API Connector to make my data requests?
Thank you!

Guys can anyone help?

You can embed one API call in another to add in parameters that also come from the API.