Docs
Dashboard
On this page

    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

    GET/v1/store/storefront/preview-data

    Or name the store: GET /v1/stores/{storeId}/storefront/preview-data

    storefront:readgetStorefrontPreviewData

    Parameters

    • type"" | "product" | "collection" | "page"query
    • handlestringquery

    Response GetStorefrontPreviewDataResponse

    • catalogStorefrontCatalogrequired
    • storefrontOriginstringrequired
    • accentHuenumberrequired
    • buyerGateBuyerGate | nullrequired
    • shopStorefrontShop | 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Page data for the editor preview: products by handle or id and collection slices, from the same source storefront renders read

    POST/v1/store/storefront/preview-data/page

    Or name the store: POST /v1/stores/{storeId}/storefront/preview-data/page

    storefront:writerole: storefront:readgetStorefrontPreviewPage

    Body

    • handlesstring[]
    • idsprd_…[]
    • relatedboolean
    • slicesobject[]
      • handlestringrequired
      • source"collection" | "category"
      • sort"featured" | "best-selling" | "newest" | "price-ascending" | "price-descending" | "title-ascending"
      • offsetinteger
      • afterstring | null
      • limitintegerrequired

    Response PageDataResponse

    • productsStorefrontProduct[]required
    • missingstring[]required
    • redirectsobject[]required
      • fromstringrequired
      • tostringrequired
    • slicesCollectionSlice[]required
    • generatedAtTimestamprequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Product feed URLs and per-product eligibility and issues

    GET/v1/store/storefront/feeds

    Or name the store: GET /v1/stores/{storeId}/storefront/feeds

    storefront:readgetFeedReport

    Parameters

    • limitinteger | string | nullquery
    • cursorstring | nullquery

    Response GetFeedReportResponse

    • googleUrlstringrequired
    • metaUrlstringrequired
    • sitemapUrlstringrequired
    • productsobject[]required
      • productIdstringrequired
      • titlestringrequired
      • listedbooleanrequired
      • reasonstringrequired
      • issuesobject[]required
        • idstringrequired
        • fieldstringrequired
        • messagestringrequired
    • nextCursorstringrequired
    • totalintegerrequired
    • listedintegerrequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Emails collected by newsletter sections, newest first

    GET/v1/store/storefront/newsletter

    Or name the store: GET /v1/stores/{storeId}/storefront/newsletter

    storefront:readlistNewsletterSubscribers

    Response ListNewsletterSubscribersResponse

    • totalintegerrequired
    • last30Daysintegerrequired
    • subscribersobject[]required
      • emailstringrequired
      • sourcestringrequired
      • pagestringrequired
      • createdAtstringrequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Cart drawer and checkout customization

    GET/v1/store/storefront/checkout-settings

    Or name the store: GET /v1/stores/{storeId}/storefront/checkout-settings

    storefront:readgetCheckoutSettings

    Response StorefrontCheckoutSettings

    • cartCartSettingsrequired
    • checkoutCheckoutSettingsrequired
    • storeNamestringrequired
    • themeThemeLookrequired
    • storefrontOriginstringrequired
    • updatedAtTimestamprequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Save the checkout settings

    PUT/v1/store/storefront/checkout-settings

    Or name the store: PUT /v1/stores/{storeId}/storefront/checkout-settings

    storefront:writeupdateCheckoutSettings

    Body

    • layout"two_column" | "one_column"
    • logoobject
      • kind"name" | "image"
      • imageUrlstring | null
    • colorsobject
      • mode"theme" | "custom"
      • backgroundstring
      • surfacestring
      • textstring
      • mutedstring
      • accentstring
      • onAccentstring
    • fieldsobject
      • name"required" | "optional" | "hidden"
      • country"required" | "optional" | "hidden"
      • phone"required" | "optional" | "hidden"
      • address"required" | "optional" | "hidden"
    • customFieldsobject[]
      • idstringrequired
      • labelstringrequired
      • type"text" | "textarea" | "number" | "email" | "url" | "select" | "checkbox" | "discord"required
      • requiredbooleanrequired
      • placeholderstring
      • helpstring
      • optionsstring[]
      • productIdsprd_…[]
    • showDiscountFieldboolean
    • showGiftCardFieldboolean
    • consentobject
      • enabledboolean
      • textstring
      • linkLabelstring
      • linkUrlstring
    • marketingOptInobject
      • enabledboolean
      • labelstring
    • trustBadges"secure" | "instant" | "refund" | "support"[]
    • showOrderBumpsboolean
    • emailVerification"never" | "products" | "always"
    • verifyProductIdsprd_…[]
    • offerAccountsboolean
    • thankYouobject
      • headingstring
      • messagestring
      • redirectUrlstring | null
      • redirectDelaySecinteger
    • stringsobject
      • contactHeadingstring
      • detailsHeadingstring
      • paymentHeadingstring
      • summaryHeadingstring
      • payButtonstring
      • freeButtonstring
      • emailHelpstring
      • discountPlaceholderstring
      • giftCardPlaceholderstring
      • applystring
      • secureNotestring
    • minOrderMinorinteger | null
    • maxOrderMinorinteger | null
    • cartMode"separate" | "one_page"
    • methodDiscountsobject[]
      • method"card" | "apple_pay" | "google_pay" | "paypal" | "crypto" | "bank_transfer" | "store_credit" | "manual" | "cash_app" | "skins" | "gift_code"required
      • bpsintegerrequired

    Response StorefrontCheckoutSettings

    • cartCartSettingsrequired
    • checkoutCheckoutSettingsrequired
    • storeNamestringrequired
    • themeThemeLookrequired
    • storefrontOriginstringrequired
    • updatedAtTimestamprequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Save the cart drawer settings

    PUT/v1/store/storefront/cart-settings

    Or name the store: PUT /v1/stores/{storeId}/storefront/cart-settings

    storefront:writeupdateCartSettings

    Body

    • mode"drawer" | "page"
    • side"right" | "left"
    • widthinteger
    • showUpsellsboolean
    • upsellHeadingstring
    • showDiscountFieldboolean
    • showGiftCardFieldboolean
    • showNotesboolean
    • notesLabelstring
    • showTrustLineboolean
    • trustLinestring
    • showProgressboolean
    • progressMessagestring
    • progressReachedMessagestring
    • labelsobject
      • titlestring
      • checkoutstring
      • viewCartstring
      • continueShoppingstring
      • emptyTitlestring
      • emptyBodystring
      • emptyCtastring
    • colorsobject
      • mode"theme" | "custom"
      • backgroundstring
      • surfacestring
      • textstring
      • mutedstring
      • accentstring
      • onAccentstring

    Response StorefrontCheckoutSettings

    • cartCartSettingsrequired
    • checkoutCheckoutSettingsrequired
    • storeNamestringrequired
    • themeThemeLookrequired
    • storefrontOriginstringrequired
    • updatedAtTimestamprequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Whether the storefront is password protected, if a password is set, and the message buyers see

    GET/v1/store/storefront/password

    Or name the store: GET /v1/stores/{storeId}/storefront/password

    storefront:readrole: storefront:readgetStorePassword

    Response StorePasswordSettings

    • enabledbooleanrequired
    • hasPasswordbooleanrequired
    • messagestringrequired
    • updatedAtTimestamp | 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Turn password protection on or off, set a new password (stored as a hash) and the message buyers see

    PUT/v1/store/storefront/password

    Or name the store: PUT /v1/stores/{storeId}/storefront/password

    storefront:writerole: storefront:writeupdateStorePassword

    Body

    • enabledbooleanrequired
    • passwordstring | nullrequired
    • messagestringrequired

    Response StorePasswordSettings

    • enabledbooleanrequired
    • hasPasswordbooleanrequired
    • messagestringrequired
    • updatedAtTimestamp | 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Social links of the store and where templates show them (header, footer or both), shared by every template

    GET/v1/store/storefront/social

    Or name the store: GET /v1/stores/{storeId}/storefront/social

    storefront:readrole: storefront:readgetStoreSocial

    Response StoreSocialSettings

    • socialStoreSocialrequired
    • savedbooleanrequired
    • liveThemeobject | 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Replace the social links (in order) and where they show; every template picks them up at once

    PUT/v1/store/storefront/social

    Or name the store: PUT /v1/stores/{storeId}/storefront/social

    storefront:writerole: storefront:writeupdateStoreSocial

    Body

    • placement"footer" | "header" | "both"
    • linksobject[]required
      • network"x" | "instagram" | "youtube" | "tiktok" | "discord" | "github" | "facebook" | "threads" | "bluesky" | "website" | "telegram" | "reddit" | "whatsapp" | "twitch" | "kick" | "steam" | "email" | "custom"required
      • urlstringrequired
      • labelstring

    Response StoreSocialSettings

    • socialStoreSocialrequired
    • savedbooleanrequired
    • liveThemeobject | 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)
    Try it with your key

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Was this page helpful?