Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.storefronts.codeFile("STOREFRONT_ID", {
path: "pages/index.liquid",
});<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->storefronts->codeFile('STOREFRONT_ID', [
'path' => 'pages/index.liquid',
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.storefronts.codeFile("STOREFRONT_ID", path="pages/index.liquid")
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/storefronts/{storefrontId}/code/file \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/storefronts/{storefrontId}/code/file"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/storefronts/{storefrontId}/code/file")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/storefronts/{storefrontId}/code/file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"path": "assets/theme.css",
"hash": "5b682f97f28a435c9925b811f88717c9ef845de4df0517b9582dfe25383bcd9c",
"size": 177667,
"added": false,
"changed": false,
"updatedAt": "2026-10-22T16:20:20Z",
"content": "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties;\n:root, :host {\n --fa-font-solid: normal 900 1em/1 'Font Awesome 7 Free';\n --fa-font-regular: normal 400 1em/1 'Font Awesome 7 Free';\n --fa-font-light: normal 300 1em/1 'Font Awesome 7 Pro';\n --fa-font-thin: normal 100 1em/1 'Font Awesome 7 Pro';\n --fa-font-duotone: normal 900 1em/1 'Font Awesome 7 Duotone';\n …"
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Storefront code
Get a file
One file of the storefront’s draft, with its text in content and its SHA-256 in hash. file_not_found for a path it does not have.
Needs the storefronts.read permission (Read Storefronts).
GET
/
stores
/
{storeId}
/
storefronts
/
{storefrontId}
/
code
/
file
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.storefronts.codeFile("STOREFRONT_ID", {
path: "pages/index.liquid",
});<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->storefronts->codeFile('STOREFRONT_ID', [
'path' => 'pages/index.liquid',
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.storefronts.codeFile("STOREFRONT_ID", path="pages/index.liquid")
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/storefronts/{storefrontId}/code/file \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/storefronts/{storefrontId}/code/file"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/storefronts/{storefrontId}/code/file")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/storefronts/{storefrontId}/code/file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"path": "assets/theme.css",
"hash": "5b682f97f28a435c9925b811f88717c9ef845de4df0517b9582dfe25383bcd9c",
"size": 177667,
"added": false,
"changed": false,
"updatedAt": "2026-10-22T16:20:20Z",
"content": "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties;\n:root, :host {\n --fa-font-solid: normal 900 1em/1 'Font Awesome 7 Free';\n --fa-font-regular: normal 400 1em/1 'Font Awesome 7 Free';\n --fa-font-light: normal 300 1em/1 'Font Awesome 7 Pro';\n --fa-font-thin: normal 100 1em/1 'Font Awesome 7 Pro';\n --fa-font-duotone: normal 900 1em/1 'Font Awesome 7 Duotone';\n …"
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
The storefront.
Query Parameters
The file's path, its folder and its name: pages/index.liquid, assets/theme.css.
Example:
"pages/index.liquid"

