Get the installed sandboxed custom template for a public shop page
GET
/storefront/sites/{host}/code-template/{page}
const url = 'https://example.com/storefront/sites/example/code-template/home';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/storefront/sites/example/code-template/homeInert JSON only, never an HTML response or the source archive. Resolved from this host’s current approved live revision, or its own valid preview token. No arbitrary key or revision parameter. Nothing for closed, off, unknown, unpaid or unverified shops.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”host
required
string
page
required
string
Query Parameters
Section titled “Query Parameters”preview
string
Responses
Section titled “Responses”Approved sandbox document
Media typeapplication/json
object
html
required
string
css
required
string
javascript
required
string
Example generated
{ "html": "example", "css": "example", "javascript": "example"}Not changed
No installed template page
Too many requests