Contentful logo

Contentful Community

Disable fallback for locale in API call

Hi,
I have kind a tricky situation where I would be needing fallback for locales for all my content models except for few.
For few, I don’t want to API to return fallback value incase of missing data. If there exists a value in particular locale, return otherwise return null.

Is there a way to somehow pass a key like fallback=false and not get value from fallback locale in response based on that value. ?

Any help would be appreciated.

Hi @a.noor ,

The fallback locale is a functionality coming from our core system, and if enabled, works for all the content models. I’m not sure of your specific use-case, however, you could just add a true/false field in those content models, so that when your application gets a fallback response, the sdk/platform you are using, could just ignore it.

1 Like