Experience fragment
An experience fragment is a reusable, composable piece of an experience that can be embedded into other experiences. Experience fragments are authored and previewed in Contentful and served exclusively via the preview host, so this endpoint is only available on the Experience Preview API.
Requests to the experience fragment endpoint require a preview access token.
Getting localized experience fragments
Requesting an experience fragment with a locale query parameter hydrates it with content in that locale, the same way as an experience:
404 depends on whether the experience fragment has locale-based publishing status recorded. Most experience fragments don’t, since locale-based publishing is tracked at the experience level — in that case any locale is accepted, and unresolved content falls back to null values (see below). If an experience fragment does have locale-based publishing status, requesting a locale that isn’t in it returns a 404, the same way it does for experiences — except the check only confirms the locale exists, not that it’s published, since experience fragments are only ever served in preview.When an experience fragment has no locale-based publishing status, requesting a locale that doesn’t exist for the environment returns the experience fragment hydrated with null values for every contentProperty, along with a corresponding entry in the errors array for each one. Each node’s componentType still resolves to the component backing it, and designProperties still resolve normally, since design values aren’t locale-dependent — only content pulled from bound entries and assets fails to resolve:
Requesting an experience with a non-existent locale on preview always returns a 404, since every experience stores localeStatus and the API can always verify whether the requested locale exists. See Getting localized experiences.