Country templates
Move a sitemap rule onto a resource
Turns a sitemap template rule into a country template of the resource
whose page it fires on, and deletes the rule, together or not at all.
Visitors from the rule's country keep getting the same template on the
rule's path. The rule must be an active template rule on one of the
resource's storefront paths (for a product, products/<slug> or
shop/<slug>) that names no other resource, must serve only its own
country (not default or the company's default country), and its
template must be tagged with exactly the rule's country. The cached
pages of every path the resource is served at are cleared for that
country once the move lands. Requires theme update permission.
POST
/
api
/
v202604
/
themes
/
{theme_id}
/
country-templates
/
rules
/
{rule_id}
/
move
Move a sitemap rule onto a resource
curl --request POST \
--url https://api.fluid.app/api/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_type": "Product",
"resource_id": 30117
}
'import requests
url = "https://api.fluid.app/api/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move"
payload = {
"resource_type": "Product",
"resource_id": 30117
}
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({resource_type: 'Product', resource_id: 30117})
};
fetch('https://api.fluid.app/api/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move', 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/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move",
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([
'resource_type' => 'Product',
'resource_id' => 30117
]),
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/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move"
payload := strings.NewReader("{\n \"resource_type\": \"Product\",\n \"resource_id\": 30117\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/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_type\": \"Product\",\n \"resource_id\": 30117\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move")
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 \"resource_type\": \"Product\",\n \"resource_id\": 30117\n}"
response = http.request(request)
puts response.read_body{
"country_template": {
"template_id": 902377,
"template_name": "Mexico Product",
"themeable_type": "product",
"country_ids": [
142
]
},
"status": 201,
"meta": {
"request_uuid": "2a7c5e18-9d4b-4f63-a0e1-7b3c8d6f2e94",
"timestamp": "2026-11-19T16:44:05Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"error": {
"message": "<string>",
"details": {
"type": "not_found",
"region_code": "<string>",
"template_country_codes": [
"<string>"
],
"template_id": 123,
"country_ids": [
123
]
}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {
"type": "not_found",
"region_code": "<string>",
"template_country_codes": [
"<string>"
],
"template_id": 123,
"country_ids": [
123
]
}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
Path Parameters
Body
application/json
⌘I
Move a sitemap rule onto a resource
curl --request POST \
--url https://api.fluid.app/api/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_type": "Product",
"resource_id": 30117
}
'import requests
url = "https://api.fluid.app/api/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move"
payload = {
"resource_type": "Product",
"resource_id": 30117
}
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({resource_type: 'Product', resource_id: 30117})
};
fetch('https://api.fluid.app/api/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move', 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/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move",
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([
'resource_type' => 'Product',
'resource_id' => 30117
]),
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/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move"
payload := strings.NewReader("{\n \"resource_type\": \"Product\",\n \"resource_id\": 30117\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/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_type\": \"Product\",\n \"resource_id\": 30117\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v202604/themes/{theme_id}/country-templates/rules/{rule_id}/move")
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 \"resource_type\": \"Product\",\n \"resource_id\": 30117\n}"
response = http.request(request)
puts response.read_body{
"country_template": {
"template_id": 902377,
"template_name": "Mexico Product",
"themeable_type": "product",
"country_ids": [
142
]
},
"status": 201,
"meta": {
"request_uuid": "2a7c5e18-9d4b-4f63-a0e1-7b3c8d6f2e94",
"timestamp": "2026-11-19T16:44:05Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"error": {
"message": "<string>",
"details": {
"type": "not_found",
"region_code": "<string>",
"template_country_codes": [
"<string>"
],
"template_id": 123,
"country_ids": [
123
]
}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {
"type": "not_found",
"region_code": "<string>",
"template_country_codes": [
"<string>"
],
"template_id": 123,
"country_ids": [
123
]
}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}