Renders a page for a theme template
Renders the template to HTML for the theme builder’s preview, optionally with unsaved content, a specific version, sample resources, a country and language, and a preview audience. Nothing is saved. Requires the application_themes view permission.
curl --request POST \
--url https://api.fluid.app/api/application_theme_templates/{id}/render_page \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"resources": [
{
"id": 30117,
"type": "product"
}
],
"country_id": 214,
"language_id": 38,
"preview_audience": {
"kind": "guest"
},
"application_theme_template": {
"content": "{% layout 'theme' %}\n<section class=\"product\">\n <h1>{{ product.title }}</h1>\n</section>"
}
}
EOFimport requests
url = "https://api.fluid.app/api/application_theme_templates/{id}/render_page"
payload = {
"resources": [
{
"id": 30117,
"type": "product"
}
],
"country_id": 214,
"language_id": 38,
"preview_audience": { "kind": "guest" },
"application_theme_template": { "content": "{% layout 'theme' %}
<section class=\"product\">
<h1>{{ product.title }}</h1>
</section>" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
resources: [{id: 30117, type: 'product'}],
country_id: 214,
language_id: 38,
preview_audience: {kind: 'guest'},
application_theme_template: {
content: '{% layout \'theme\' %}\n<section class="product">\n <h1>{{ product.title }}</h1>\n</section>'
}
})
};
fetch('https://api.fluid.app/api/application_theme_templates/{id}/render_page', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/application_theme_templates/{id}/render_page",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resources' => [
[
'id' => 30117,
'type' => 'product'
]
],
'country_id' => 214,
'language_id' => 38,
'preview_audience' => [
'kind' => 'guest'
],
'application_theme_template' => [
'content' => '{% layout \'theme\' %}
<section class="product">
<h1>{{ product.title }}</h1>
</section>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/application_theme_templates/{id}/render_page"
payload := strings.NewReader("{\n \"resources\": [\n {\n \"id\": 30117,\n \"type\": \"product\"\n }\n ],\n \"country_id\": 214,\n \"language_id\": 38,\n \"preview_audience\": {\n \"kind\": \"guest\"\n },\n \"application_theme_template\": {\n \"content\": \"{% layout 'theme' %}\\n<section class=\\\"product\\\">\\n <h1>{{ product.title }}</h1>\\n</section>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/application_theme_templates/{id}/render_page")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resources\": [\n {\n \"id\": 30117,\n \"type\": \"product\"\n }\n ],\n \"country_id\": 214,\n \"language_id\": 38,\n \"preview_audience\": {\n \"kind\": \"guest\"\n },\n \"application_theme_template\": {\n \"content\": \"{% layout 'theme' %}\\n<section class=\\\"product\\\">\\n <h1>{{ product.title }}</h1>\\n</section>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/application_theme_templates/{id}/render_page")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resources\": [\n {\n \"id\": 30117,\n \"type\": \"product\"\n }\n ],\n \"country_id\": 214,\n \"language_id\": 38,\n \"preview_audience\": {\n \"kind\": \"guest\"\n },\n \"application_theme_template\": {\n \"content\": \"{% layout 'theme' %}\\n<section class=\\\"product\\\">\\n <h1>{{ product.title }}</h1>\\n</section>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"liquid_content": "{% layout 'theme' %}\n<section class=\"product\">\n <h1>{{ product.title }}</h1>\n</section>",
"html_content": "<section class=\"product\">\n <h1>Dunder Mifflin 20lb Copy Paper</h1>\n</section>",
"page_stylesheet": ".product h1 { font-family: 'Libre Baskerville', serif; }",
"template_stylesheet": "",
"preview_audience": {
"kind": "guest",
"member_type_id": null,
"matched_site_id": null,
"selected_site_accessible": null
},
"preview_url": "https://shop.dundermifflin.com/products/20lb-copy-paper?preview=true&template_id=48213",
"meta": {
"request_id": "4f1c2a9e-7b3d-4e8a-9c61-2d5f8a0b3e17",
"timestamp": "2026-09-22T15:04:12Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer token authentication
Path Parameters
Body
Builder-only synthetic viewer. Does not authenticate a member.
- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Render the page as a visitor from this active company country. Falls back to the company default when absent, unknown, inactive, or not enabled for the company. When preview_audience is supplied, an unavailable explicit country ID returns 404 instead; an omitted or null ID still uses the company default.
Render the page in this active company language. Falls back to the company default when absent, unknown, inactive, or not enabled for the company. When preview_audience is supplied, an unavailable explicit language ID returns 404 instead; an omitted or null ID still uses the company default. Content not yet translated for the selected language renders its English version.
Pin a specific navbar template to preview alongside this page. When set, the pinned template wins over the country-scoped auto-pick unless its own country tags exclude the preview country.
Pin a specific footer template to preview alongside this page. Same semantics as navbar_template_id.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Success
Stylesheet for the rendered page. Includes all the css needed by the page.
Stylesheet for the template itself.
Show child attributes
Show child attributes
Preview URL for the rendered resource. System screens return their account-subdomain URL without a template ID or version.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.fluid.app/api/application_theme_templates/{id}/render_page \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"resources": [
{
"id": 30117,
"type": "product"
}
],
"country_id": 214,
"language_id": 38,
"preview_audience": {
"kind": "guest"
},
"application_theme_template": {
"content": "{% layout 'theme' %}\n<section class=\"product\">\n <h1>{{ product.title }}</h1>\n</section>"
}
}
EOFimport requests
url = "https://api.fluid.app/api/application_theme_templates/{id}/render_page"
payload = {
"resources": [
{
"id": 30117,
"type": "product"
}
],
"country_id": 214,
"language_id": 38,
"preview_audience": { "kind": "guest" },
"application_theme_template": { "content": "{% layout 'theme' %}
<section class=\"product\">
<h1>{{ product.title }}</h1>
</section>" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
resources: [{id: 30117, type: 'product'}],
country_id: 214,
language_id: 38,
preview_audience: {kind: 'guest'},
application_theme_template: {
content: '{% layout \'theme\' %}\n<section class="product">\n <h1>{{ product.title }}</h1>\n</section>'
}
})
};
fetch('https://api.fluid.app/api/application_theme_templates/{id}/render_page', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/application_theme_templates/{id}/render_page",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resources' => [
[
'id' => 30117,
'type' => 'product'
]
],
'country_id' => 214,
'language_id' => 38,
'preview_audience' => [
'kind' => 'guest'
],
'application_theme_template' => [
'content' => '{% layout \'theme\' %}
<section class="product">
<h1>{{ product.title }}</h1>
</section>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/application_theme_templates/{id}/render_page"
payload := strings.NewReader("{\n \"resources\": [\n {\n \"id\": 30117,\n \"type\": \"product\"\n }\n ],\n \"country_id\": 214,\n \"language_id\": 38,\n \"preview_audience\": {\n \"kind\": \"guest\"\n },\n \"application_theme_template\": {\n \"content\": \"{% layout 'theme' %}\\n<section class=\\\"product\\\">\\n <h1>{{ product.title }}</h1>\\n</section>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/application_theme_templates/{id}/render_page")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resources\": [\n {\n \"id\": 30117,\n \"type\": \"product\"\n }\n ],\n \"country_id\": 214,\n \"language_id\": 38,\n \"preview_audience\": {\n \"kind\": \"guest\"\n },\n \"application_theme_template\": {\n \"content\": \"{% layout 'theme' %}\\n<section class=\\\"product\\\">\\n <h1>{{ product.title }}</h1>\\n</section>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/application_theme_templates/{id}/render_page")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resources\": [\n {\n \"id\": 30117,\n \"type\": \"product\"\n }\n ],\n \"country_id\": 214,\n \"language_id\": 38,\n \"preview_audience\": {\n \"kind\": \"guest\"\n },\n \"application_theme_template\": {\n \"content\": \"{% layout 'theme' %}\\n<section class=\\\"product\\\">\\n <h1>{{ product.title }}</h1>\\n</section>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"liquid_content": "{% layout 'theme' %}\n<section class=\"product\">\n <h1>{{ product.title }}</h1>\n</section>",
"html_content": "<section class=\"product\">\n <h1>Dunder Mifflin 20lb Copy Paper</h1>\n</section>",
"page_stylesheet": ".product h1 { font-family: 'Libre Baskerville', serif; }",
"template_stylesheet": "",
"preview_audience": {
"kind": "guest",
"member_type_id": null,
"matched_site_id": null,
"selected_site_accessible": null
},
"preview_url": "https://shop.dundermifflin.com/products/20lb-copy-paper?preview=true&template_id=48213",
"meta": {
"request_id": "4f1c2a9e-7b3d-4e8a-9c61-2d5f8a0b3e17",
"timestamp": "2026-09-22T15:04:12Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}