Contentful logo

Contentful Community

How can i get reference detail data with one single API call

Hi,

I defined a new field as “many reference”.

When I call this entry API, i only get the reference id instead of the reference data. So how can i get the reference data? what the params did i miss?

The HTTP request is below:
https://cdn.contentful.com/spaces/{{SPACE}}/environments/{{ENVIRONMENT}}/entries/{{ENTRY_ID}}?access_token={{ACCESS_TOKEN}}

2021-03-11 at 9.23 PM

Thank you.

Hi @fayne ,
I think you will need to use the search API call with sys.id as your entry_id as parameter, and then use the ‘&include=1’ option:

Hi @Alma ,

Thank you for your help. I do use this solution now.

But unfortunately i found if i defined a “many reference” field in the content model. this solution will lose the rule of sorting in reference items. Do you have any advice for this issue?

Thank you.