Getting reference data in content delivery api in one http call

Hi All,

I have created a page for which the response is such
https://cdn.contentful.com/spaces/jvjbgiuyhm44/environments/master/entries/6poymdcqeIsTHBd7zGrKEm?access_token=EdVfECZ8Nu7pnTQmtn31VMWDS7cT48nneVwT40wJMy0&include=10

Now in this I have more content as reference so in the response I get them as links and get their id but I want all that data in one HTTP call rather than me calling them again and again I thought using include parameter should solve this problem but it does not seem to be working

For example again I have to call https://cdn.contentful.com/spaces/jvjbgiuyhm44/environments/master/entries/OYr3rNxLcaYkdR7OhfUGX?access_token=EdVfECZ8Nu7pnTQmtn31VMWDS7cT48nneVwT40wJMy0&include=1 to get the data for first component.

Any help on this would be much appreciated. thank you

Hi @shehad07, the include parameter only works with /entries endpoint, so you will need to modify your query to the following to fetch linked data within one API call:

https://cdn.contentful.com/spaces/jvjbgiuyhm44/environments/master/entries?sys.id=OYr3rNxLcaYkdR7OhfUGX&include=5&access_token=EdVfECZ8Nu7pnTQmtn31VMWDS7cT48nneVwT40wJMy0

In CURL API, the content of linked entries are nested under ‘includes’ object, meanwhile if you use one of our official SDKs, the linked entries can be resolved along with the ‘parent’ entry.

Last but not least, please kindly invoke your access token once the issue is resolved :))