Storefront
11 endpoints. Each needs an API key or OAuth token with the scope shown; the key already names its store, so paths start at /v1/store. Generated from the live contract; also in openapi.json.
What the editor previews with: the page it shows plus a sample of the catalog (never all of it), the shop context and the storefront origin
/v1/store/storefront/preview-dataOr name the store: GET /v1/stores/{storeId}/storefront/preview-data
Parameters
type"" | "product" | "collection" | "page"queryhandlestringquery
Response GetStorefrontPreviewDataResponse
catalogStorefrontCatalogrequiredstorefrontOriginstringrequiredaccentHuenumberrequiredbuyerGateBuyerGate | nullrequiredshopStorefrontShop | nullrequired
Example
curl "https://api.shopfa.st/v1/store/storefront/preview-data" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/storefront/preview-data', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/storefront/preview-data",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/storefront/preview-data", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Page data for the editor preview: products by handle or id and collection slices, from the same source storefront renders read
/v1/store/storefront/preview-data/pageOr name the store: POST /v1/stores/{storeId}/storefront/preview-data/page
Body
handlesstring[]idsprd_…[]relatedbooleanslicesobject[]handlestringrequiredsource"collection" | "category"sort"featured" | "best-selling" | "newest" | "price-ascending" | "price-descending" | "title-ascending"offsetintegerafterstring | nulllimitintegerrequired
Response PageDataResponse
productsStorefrontProduct[]requiredmissingstring[]requiredredirectsobject[]requiredfromstringrequiredtostringrequired
slicesCollectionSlice[]requiredgeneratedAtTimestamprequired
Example
curl -X POST "https://api.shopfa.st/v1/store/storefront/preview-data/page" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"handles": [],
"ids": [],
"related": false,
"slices": []
}'const res = await fetch('https://api.shopfa.st/v1/store/storefront/preview-data/page', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"handles": [],
"ids": [],
"related": false,
"slices": []
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"POST",
"https://api.shopfa.st/v1/store/storefront/preview-data/page",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"handles": [],
"ids": [],
"related": False,
"slices": []
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/storefront/preview-data/page", strings.NewReader(`{
"handles": [],
"ids": [],
"related": false,
"slices": []
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
Product feed URLs and per-product eligibility and issues
/v1/store/storefront/feedsOr name the store: GET /v1/stores/{storeId}/storefront/feeds
Parameters
limitinteger | string | nullquerycursorstring | nullquery
Response GetFeedReportResponse
googleUrlstringrequiredmetaUrlstringrequiredsitemapUrlstringrequiredproductsobject[]requiredproductIdstringrequiredtitlestringrequiredlistedbooleanrequiredreasonstringrequiredissuesobject[]requiredidstringrequiredfieldstringrequiredmessagestringrequired
nextCursorstringrequiredtotalintegerrequiredlistedintegerrequired
Example
curl "https://api.shopfa.st/v1/store/storefront/feeds" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/storefront/feeds', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/storefront/feeds",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/storefront/feeds", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Emails collected by newsletter sections, newest first
/v1/store/storefront/newsletterOr name the store: GET /v1/stores/{storeId}/storefront/newsletter
Response ListNewsletterSubscribersResponse
totalintegerrequiredlast30Daysintegerrequiredsubscribersobject[]requiredemailstringrequiredsourcestringrequiredpagestringrequiredcreatedAtstringrequired
Example
curl "https://api.shopfa.st/v1/store/storefront/newsletter" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/storefront/newsletter', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/storefront/newsletter",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/storefront/newsletter", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Cart drawer and checkout customization
/v1/store/storefront/checkout-settingsOr name the store: GET /v1/stores/{storeId}/storefront/checkout-settings
Response StorefrontCheckoutSettings
cartCartSettingsrequiredcheckoutCheckoutSettingsrequiredstoreNamestringrequiredthemeThemeLookrequiredstorefrontOriginstringrequiredupdatedAtTimestamprequired
Example
curl "https://api.shopfa.st/v1/store/storefront/checkout-settings" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/storefront/checkout-settings', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/storefront/checkout-settings",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/storefront/checkout-settings", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Save the checkout settings
/v1/store/storefront/checkout-settingsOr name the store: PUT /v1/stores/{storeId}/storefront/checkout-settings
Body
layout"two_column" | "one_column"logoobjectkind"name" | "image"imageUrlstring | null
colorsobjectmode"theme" | "custom"backgroundstringsurfacestringtextstringmutedstringaccentstringonAccentstring
fieldsobjectname"required" | "optional" | "hidden"country"required" | "optional" | "hidden"phone"required" | "optional" | "hidden"address"required" | "optional" | "hidden"
customFieldsobject[]idstringrequiredlabelstringrequiredtype"text" | "textarea" | "number" | "email" | "url" | "select" | "checkbox" | "discord"requiredrequiredbooleanrequiredplaceholderstringhelpstringoptionsstring[]productIdsprd_…[]
showDiscountFieldbooleanshowGiftCardFieldbooleanconsentobjectenabledbooleantextstringlinkLabelstringlinkUrlstring
marketingOptInobjectenabledbooleanlabelstring
trustBadges"secure" | "instant" | "refund" | "support"[]showOrderBumpsbooleanemailVerification"never" | "products" | "always"verifyProductIdsprd_…[]offerAccountsbooleanthankYouobjectheadingstringmessagestringredirectUrlstring | nullredirectDelaySecinteger
stringsobjectcontactHeadingstringdetailsHeadingstringpaymentHeadingstringsummaryHeadingstringpayButtonstringfreeButtonstringemailHelpstringdiscountPlaceholderstringgiftCardPlaceholderstringapplystringsecureNotestring
minOrderMinorinteger | nullmaxOrderMinorinteger | nullcartMode"separate" | "one_page"methodDiscountsobject[]method"card" | "apple_pay" | "google_pay" | "paypal" | "crypto" | "bank_transfer" | "store_credit" | "manual" | "cash_app" | "skins" | "gift_code"requiredbpsintegerrequired
Response StorefrontCheckoutSettings
cartCartSettingsrequiredcheckoutCheckoutSettingsrequiredstoreNamestringrequiredthemeThemeLookrequiredstorefrontOriginstringrequiredupdatedAtTimestamprequired
Example
curl -X PUT "https://api.shopfa.st/v1/store/storefront/checkout-settings" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"layout": "two_column",
"logo": {
"kind": "name",
"imageUrl": null
},
"colors": {
"mode": "theme",
"background": "#0f0f17",
"surface": "#17171f",
"text": "#f2f2f7",
"muted": "#9a9aa8",
"accent": "#7c5cff",
"onAccent": "#ffffff"
},
"fields": {
"name": "required",
"country": "required",
"phone": "hidden",
"address": "hidden"
},
"customFields": [],
"showDiscountField": true,
"showGiftCardField": true,
"consent": {
"enabled": true,
"text": "I agree to the {link} and understand digital products are delivered instantly.",
"linkLabel": "Terms of Service",
"linkUrl": "/policies/terms-of-service"
},
"marketingOptIn": {
"enabled": false,
"label": "Email me about new releases and offers"
},
"trustBadges": [
"secure",
"instant",
"refund"
],
"showOrderBumps": true,
"emailVerification": "products",
"verifyProductIds": [],
"offerAccounts": true,
"thankYou": {
"heading": "Thanks for your order",
"message": "Your files and keys are below. We also sent them to your inbox.",
"redirectUrl": null,
"redirectDelaySec": 8
},
"strings": {
"contactHeading": "Contact",
"detailsHeading": "Your details",
"paymentHeading": "Payment",
"summaryHeading": "Order summary",
"payButton": "Pay {amount}",
"freeButton": "Get it free",
"emailHelp": "Your receipt, keys and download links go here.",
"discountPlaceholder": "Discount code",
"giftCardPlaceholder": "Gift card code",
"apply": "Apply",
"secureNote": "Payments are encrypted and processed securely."
},
"minOrderMinor": null,
"maxOrderMinor": null,
"cartMode": "separate",
"methodDiscounts": []
}'const res = await fetch('https://api.shopfa.st/v1/store/storefront/checkout-settings', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"layout": "two_column",
"logo": {
"kind": "name",
"imageUrl": null
},
"colors": {
"mode": "theme",
"background": "#0f0f17",
"surface": "#17171f",
"text": "#f2f2f7",
"muted": "#9a9aa8",
"accent": "#7c5cff",
"onAccent": "#ffffff"
},
"fields": {
"name": "required",
"country": "required",
"phone": "hidden",
"address": "hidden"
},
"customFields": [],
"showDiscountField": true,
"showGiftCardField": true,
"consent": {
"enabled": true,
"text": "I agree to the {link} and understand digital products are delivered instantly.",
"linkLabel": "Terms of Service",
"linkUrl": "/policies/terms-of-service"
},
"marketingOptIn": {
"enabled": false,
"label": "Email me about new releases and offers"
},
"trustBadges": [
"secure",
"instant",
"refund"
],
"showOrderBumps": true,
"emailVerification": "products",
"verifyProductIds": [],
"offerAccounts": true,
"thankYou": {
"heading": "Thanks for your order",
"message": "Your files and keys are below. We also sent them to your inbox.",
"redirectUrl": null,
"redirectDelaySec": 8
},
"strings": {
"contactHeading": "Contact",
"detailsHeading": "Your details",
"paymentHeading": "Payment",
"summaryHeading": "Order summary",
"payButton": "Pay {amount}",
"freeButton": "Get it free",
"emailHelp": "Your receipt, keys and download links go here.",
"discountPlaceholder": "Discount code",
"giftCardPlaceholder": "Gift card code",
"apply": "Apply",
"secureNote": "Payments are encrypted and processed securely."
},
"minOrderMinor": null,
"maxOrderMinor": null,
"cartMode": "separate",
"methodDiscounts": []
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"PUT",
"https://api.shopfa.st/v1/store/storefront/checkout-settings",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"layout": "two_column",
"logo": {
"kind": "name",
"imageUrl": None
},
"colors": {
"mode": "theme",
"background": "#0f0f17",
"surface": "#17171f",
"text": "#f2f2f7",
"muted": "#9a9aa8",
"accent": "#7c5cff",
"onAccent": "#ffffff"
},
"fields": {
"name": "required",
"country": "required",
"phone": "hidden",
"address": "hidden"
},
"customFields": [],
"showDiscountField": True,
"showGiftCardField": True,
"consent": {
"enabled": True,
"text": "I agree to the {link} and understand digital products are delivered instantly.",
"linkLabel": "Terms of Service",
"linkUrl": "/policies/terms-of-service"
},
"marketingOptIn": {
"enabled": False,
"label": "Email me about new releases and offers"
},
"trustBadges": [
"secure",
"instant",
"refund"
],
"showOrderBumps": True,
"emailVerification": "products",
"verifyProductIds": [],
"offerAccounts": True,
"thankYou": {
"heading": "Thanks for your order",
"message": "Your files and keys are below. We also sent them to your inbox.",
"redirectUrl": None,
"redirectDelaySec": 8
},
"strings": {
"contactHeading": "Contact",
"detailsHeading": "Your details",
"paymentHeading": "Payment",
"summaryHeading": "Order summary",
"payButton": "Pay {amount}",
"freeButton": "Get it free",
"emailHelp": "Your receipt, keys and download links go here.",
"discountPlaceholder": "Discount code",
"giftCardPlaceholder": "Gift card code",
"apply": "Apply",
"secureNote": "Payments are encrypted and processed securely."
},
"minOrderMinor": None,
"maxOrderMinor": None,
"cartMode": "separate",
"methodDiscounts": []
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/storefront/checkout-settings", strings.NewReader(`{
"layout": "two_column",
"logo": {
"kind": "name",
"imageUrl": null
},
"colors": {
"mode": "theme",
"background": "#0f0f17",
"surface": "#17171f",
"text": "#f2f2f7",
"muted": "#9a9aa8",
"accent": "#7c5cff",
"onAccent": "#ffffff"
},
"fields": {
"name": "required",
"country": "required",
"phone": "hidden",
"address": "hidden"
},
"customFields": [],
"showDiscountField": true,
"showGiftCardField": true,
"consent": {
"enabled": true,
"text": "I agree to the {link} and understand digital products are delivered instantly.",
"linkLabel": "Terms of Service",
"linkUrl": "/policies/terms-of-service"
},
"marketingOptIn": {
"enabled": false,
"label": "Email me about new releases and offers"
},
"trustBadges": [
"secure",
"instant",
"refund"
],
"showOrderBumps": true,
"emailVerification": "products",
"verifyProductIds": [],
"offerAccounts": true,
"thankYou": {
"heading": "Thanks for your order",
"message": "Your files and keys are below. We also sent them to your inbox.",
"redirectUrl": null,
"redirectDelaySec": 8
},
"strings": {
"contactHeading": "Contact",
"detailsHeading": "Your details",
"paymentHeading": "Payment",
"summaryHeading": "Order summary",
"payButton": "Pay {amount}",
"freeButton": "Get it free",
"emailHelp": "Your receipt, keys and download links go here.",
"discountPlaceholder": "Discount code",
"giftCardPlaceholder": "Gift card code",
"apply": "Apply",
"secureNote": "Payments are encrypted and processed securely."
},
"minOrderMinor": null,
"maxOrderMinor": null,
"cartMode": "separate",
"methodDiscounts": []
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
Save the cart drawer settings
/v1/store/storefront/cart-settingsOr name the store: PUT /v1/stores/{storeId}/storefront/cart-settings
Body
mode"drawer" | "page"side"right" | "left"widthintegershowUpsellsbooleanupsellHeadingstringshowDiscountFieldbooleanshowGiftCardFieldbooleanshowNotesbooleannotesLabelstringshowTrustLinebooleantrustLinestringshowProgressbooleanprogressMessagestringprogressReachedMessagestringlabelsobjecttitlestringcheckoutstringviewCartstringcontinueShoppingstringemptyTitlestringemptyBodystringemptyCtastring
colorsobjectmode"theme" | "custom"backgroundstringsurfacestringtextstringmutedstringaccentstringonAccentstring
Response StorefrontCheckoutSettings
cartCartSettingsrequiredcheckoutCheckoutSettingsrequiredstoreNamestringrequiredthemeThemeLookrequiredstorefrontOriginstringrequiredupdatedAtTimestamprequired
Example
curl -X PUT "https://api.shopfa.st/v1/store/storefront/cart-settings" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "drawer",
"side": "right",
"width": 420,
"showUpsells": true,
"upsellHeading": "Pairs well with",
"showDiscountField": true,
"showGiftCardField": true,
"showNotes": false,
"notesLabel": "Note for the seller",
"showTrustLine": true,
"trustLine": "Instant delivery to your inbox. Secure checkout.",
"showProgress": true,
"progressMessage": "Add {remaining} more to get {reward}",
"progressReachedMessage": "You unlocked {reward}",
"labels": {
"title": "Your cart",
"checkout": "Check out",
"viewCart": "View cart",
"continueShopping": "Keep shopping",
"emptyTitle": "Your cart is empty",
"emptyBody": "Browse the catalog and add something you like.",
"emptyCta": "Browse products"
},
"colors": {
"mode": "theme",
"background": "#0f0f17",
"surface": "#17171f",
"text": "#f2f2f7",
"muted": "#9a9aa8",
"accent": "#7c5cff",
"onAccent": "#ffffff"
}
}'const res = await fetch('https://api.shopfa.st/v1/store/storefront/cart-settings', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"mode": "drawer",
"side": "right",
"width": 420,
"showUpsells": true,
"upsellHeading": "Pairs well with",
"showDiscountField": true,
"showGiftCardField": true,
"showNotes": false,
"notesLabel": "Note for the seller",
"showTrustLine": true,
"trustLine": "Instant delivery to your inbox. Secure checkout.",
"showProgress": true,
"progressMessage": "Add {remaining} more to get {reward}",
"progressReachedMessage": "You unlocked {reward}",
"labels": {
"title": "Your cart",
"checkout": "Check out",
"viewCart": "View cart",
"continueShopping": "Keep shopping",
"emptyTitle": "Your cart is empty",
"emptyBody": "Browse the catalog and add something you like.",
"emptyCta": "Browse products"
},
"colors": {
"mode": "theme",
"background": "#0f0f17",
"surface": "#17171f",
"text": "#f2f2f7",
"muted": "#9a9aa8",
"accent": "#7c5cff",
"onAccent": "#ffffff"
}
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"PUT",
"https://api.shopfa.st/v1/store/storefront/cart-settings",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"mode": "drawer",
"side": "right",
"width": 420,
"showUpsells": True,
"upsellHeading": "Pairs well with",
"showDiscountField": True,
"showGiftCardField": True,
"showNotes": False,
"notesLabel": "Note for the seller",
"showTrustLine": True,
"trustLine": "Instant delivery to your inbox. Secure checkout.",
"showProgress": True,
"progressMessage": "Add {remaining} more to get {reward}",
"progressReachedMessage": "You unlocked {reward}",
"labels": {
"title": "Your cart",
"checkout": "Check out",
"viewCart": "View cart",
"continueShopping": "Keep shopping",
"emptyTitle": "Your cart is empty",
"emptyBody": "Browse the catalog and add something you like.",
"emptyCta": "Browse products"
},
"colors": {
"mode": "theme",
"background": "#0f0f17",
"surface": "#17171f",
"text": "#f2f2f7",
"muted": "#9a9aa8",
"accent": "#7c5cff",
"onAccent": "#ffffff"
}
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/storefront/cart-settings", strings.NewReader(`{
"mode": "drawer",
"side": "right",
"width": 420,
"showUpsells": true,
"upsellHeading": "Pairs well with",
"showDiscountField": true,
"showGiftCardField": true,
"showNotes": false,
"notesLabel": "Note for the seller",
"showTrustLine": true,
"trustLine": "Instant delivery to your inbox. Secure checkout.",
"showProgress": true,
"progressMessage": "Add {remaining} more to get {reward}",
"progressReachedMessage": "You unlocked {reward}",
"labels": {
"title": "Your cart",
"checkout": "Check out",
"viewCart": "View cart",
"continueShopping": "Keep shopping",
"emptyTitle": "Your cart is empty",
"emptyBody": "Browse the catalog and add something you like.",
"emptyCta": "Browse products"
},
"colors": {
"mode": "theme",
"background": "#0f0f17",
"surface": "#17171f",
"text": "#f2f2f7",
"muted": "#9a9aa8",
"accent": "#7c5cff",
"onAccent": "#ffffff"
}
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
Whether the storefront is password protected, if a password is set, and the message buyers see
/v1/store/storefront/passwordOr name the store: GET /v1/stores/{storeId}/storefront/password
Response StorePasswordSettings
enabledbooleanrequiredhasPasswordbooleanrequiredmessagestringrequiredupdatedAtTimestamp | nullrequired
Example
curl "https://api.shopfa.st/v1/store/storefront/password" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/storefront/password', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/storefront/password",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/storefront/password", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Turn password protection on or off, set a new password (stored as a hash) and the message buyers see
/v1/store/storefront/passwordOr name the store: PUT /v1/stores/{storeId}/storefront/password
Body
enabledbooleanrequiredpasswordstring | nullrequiredmessagestringrequired
Response StorePasswordSettings
enabledbooleanrequiredhasPasswordbooleanrequiredmessagestringrequiredupdatedAtTimestamp | nullrequired
Example
curl -X PUT "https://api.shopfa.st/v1/store/storefront/password" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": false,
"password": "string",
"message": "string"
}'const res = await fetch('https://api.shopfa.st/v1/store/storefront/password', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"enabled": false,
"password": "string",
"message": "string"
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"PUT",
"https://api.shopfa.st/v1/store/storefront/password",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"enabled": False,
"password": "string",
"message": "string"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/storefront/password", strings.NewReader(`{
"enabled": false,
"password": "string",
"message": "string"
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
Social links of the store and where templates show them (header, footer or both), shared by every template
/v1/store/storefront/socialOr name the store: GET /v1/stores/{storeId}/storefront/social
Response StoreSocialSettings
socialStoreSocialrequiredsavedbooleanrequiredliveThemeobject | nullrequired
Example
curl "https://api.shopfa.st/v1/store/storefront/social" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/storefront/social', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/storefront/social",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/storefront/social", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Replace the social links (in order) and where they show; every template picks them up at once
/v1/store/storefront/socialOr name the store: PUT /v1/stores/{storeId}/storefront/social
Body
placement"footer" | "header" | "both"linksobject[]requirednetwork"x" | "instagram" | "youtube" | "tiktok" | "discord" | "github" | "facebook" | "threads" | "bluesky" | "website" | "telegram" | "reddit" | "whatsapp" | "twitch" | "kick" | "steam" | "email" | "custom"requiredurlstringrequiredlabelstring
Response StoreSocialSettings
socialStoreSocialrequiredsavedbooleanrequiredliveThemeobject | nullrequired
Example
curl -X PUT "https://api.shopfa.st/v1/store/storefront/social" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"placement": "footer",
"links": [
{
"network": "x",
"url": "string"
}
]
}'const res = await fetch('https://api.shopfa.st/v1/store/storefront/social', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"placement": "footer",
"links": [
{
"network": "x",
"url": "string"
}
]
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"PUT",
"https://api.shopfa.st/v1/store/storefront/social",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"placement": "footer",
"links": [
{
"network": "x",
"url": "string"
}
]
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/storefront/social", strings.NewReader(`{
"placement": "footer",
"links": [
{
"network": "x",
"url": "string"
}
]
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)