Skip to main content
GET
/
api
/
external
/
v2
/
theme-settings
/
regenerate-scripts-for-shop
Regenerate subscription widget scripts
curl --request GET \
  --url https://subscription-admin.appstle.com/api/external/v2/theme-settings/regenerate-scripts-for-shop
import requests

url = "https://subscription-admin.appstle.com/api/external/v2/theme-settings/regenerate-scripts-for-shop"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://subscription-admin.appstle.com/api/external/v2/theme-settings/regenerate-scripts-for-shop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://subscription-admin.appstle.com/api/external/v2/theme-settings/regenerate-scripts-for-shop';
const options = {method: 'GET'};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/theme-settings/regenerate-scripts-for-shop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://subscription-admin.appstle.com/api/external/v2/theme-settings/regenerate-scripts-for-shop"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://subscription-admin.appstle.com/api/external/v2/theme-settings/regenerate-scripts-for-shop")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
true
{
"detail": "Shop theme settings are not properly configured",
"status": 400,
"title": "Invalid configuration",
"type": "https://example.com/errors/bad-request"
}
{
"detail": "Valid API key is required. Provide via api_key parameter or X-API-Key header.",
"status": 401,
"title": "Authentication required",
"type": "https://example.com/errors/unauthorized"
}
{
"detail": "API key does not have permission to regenerate theme scripts",
"status": 403,
"title": "Insufficient permissions",
"type": "https://example.com/errors/forbidden"
}
{
"detail": "Too many script regeneration requests. Please wait before trying again.",
"retryAfter": 60,
"status": 429,
"title": "Rate limit exceeded",
"type": "https://example.com/errors/rate-limit"
}
{
"detail": "Unable to initiate script regeneration process. Please try again or contact support.",
"status": 500,
"title": "Script regeneration failed",
"type": "https://example.com/errors/internal-error"
}

Headers

X-API-Key
string

Query Parameters

api_key
string

API Key (Deprecated - Use Header X-API-Key instead)

Response

Script regeneration initiated successfully. Returns true to confirm the process has started. Scripts will be regenerated asynchronously in the background and deployed to CDN within 1-2 minutes.

The response is of type boolean.