Skip to content
Log in

Feeds Controller - Liquid Controller Reference

On this page

Description

The Feeds controller serves a store’s feeds at /feeds/<path>. A feed is public and needs no sign-in, so a controller template is where you add a check of your own.

Property Value
Controller FeedsController
Liquid Template Path controllers/feeds/
Namespace —

Actions

Action HTTP Method Route Result
show GET /feeds/:path(.:format) Renders the feed in the requested format, or serves the pre-built result

StoreConnect sets the content type from the requested format. Custom response headers set from Liquid are not applied to a feed response.

Example

Create a theme template with the key controllers/feeds/show to require a shared key on every feed request:

```liquid

{% before %} {% if current_request.params.key != “partner-feed-2026” %} {% respond body: “Access denied”, layout: false %} {% endif %} {% endbefore %} ```

A request without the right key gets Access denied in place of the feed, wrapped to match the feed’s format:

  • A .csv or .txt feed returns the text as plain text.
  • A .json feed returns {"html":"Access denied","flash":null,"alert":null,"notice":null}.
  • An .xml feed returns the text inside the application layout, even with layout: false.
  • Any other format, such as .jsonl, returns the text as HTML.

{% respond %} always sends HTTP status 200, so a partner system has to check the body for the denial, not the status.

See how Liquid controllers work for the phases and the tags you can use in them.

Was this article helpful?

Was this article helpful?