API Key Based request parameter additon

We have a question on API key-based additional parameters.

Let’s say we have our API called as abc.in hosted in Tyk Gateway with the endpoint named as “XYZ/data”

So technically all the endpoints of abc.in can be accessed through “XYZ/data”

example: abc.in/valuations => mytyk.com/xyz/data/valuations

valuations endpoint: Internally it’s calling 2 different 3rd party services to get the data, normalize and send it as a response

and consider we have 3 API keys configured to access this API via Gateway.

Now our question is based on the API key we need to identify which of the 3rd party services data can be send it in response.

Let’s say “Valuations” endpoint giving data from “a”, “b”, “c” Gateway should add the flags in the given request based on the API key like below.

{ “a”: true, “b”: false, “c”: true}

this will differ for different API keys.

We tried Url rewriting and adding context variables but all are at the API level. we don’t know how to map it at the API key level. We have policies in place that will take for quotas, request limits, and allowed URLs only.

Any thoughts?