Wishlist Stack

Developer setup

Build on the current Wishlist Stack API.

Use the Shopify app proxy for Online Store themes. Use the direct API, Universal SDK, or Hydrogen integration for headless and custom storefronts.

On this pageShopify app proxyUniversal SDKHydrogenDirect REST APIPagination and limitsApp reference and merchant tools

Shopify Online Store: app proxy

Install Wishlist Stack and sign in as a storefront customer for private wishlist operations. Use the installed /apps/wishlist-stack proxy path; adjust it if the merchant has customized the path. Shopify signs the shopper identity. Native fetch calls do not require a merchant API key or a customer token in the theme.

const response = await fetch(
  '/apps/wishlist-stack/api/lists?page=1&pageSize=20',
  { credentials: 'same-origin' }
);
if (!response.ok) throw new Error('Wishlist request failed');
const { lists, pagination } = await response.json();

Use credentials: 'same-origin' and send Content-Type: application/json for mutations. Lists, items, membership, groups, duplication, and sharing use the same REST paths and payloads through the proxy. Retain the shopper’s selected list ID.

// Retain the list ID selected by the shopper.
const response = await fetch(
  '/apps/wishlist-stack/api/lists/' + encodeURIComponent(selectedListId) + '/share',
  {
    method: 'POST',
    credentials: 'same-origin',
    headers: { 'Content-Type': 'application/json' },
  }
);
if (!response.ok) throw new Error('Unable to share this list');

Private endpoints require a logged-in customer. Public shared-list and shared-group reads can be accessed without login only when the owner has enabled sharing and the resource belongs to that merchant.

Universal JavaScript / TypeScript SDK

npm install @sdg.la/wishlist-stack-sdk

For direct connections, explicitly set the current API origin and provide the merchant key from Quick Start plus the customer’s Shopify access token for private operations.

import { createWishlistStackClient } from '@sdg.la/wishlist-stack-sdk';

const client = createWishlistStackClient({
  baseUrl: 'https://app.wishliststack.com',
  apiKey: 'YOUR_MERCHANT_API_KEY',
  customerAccessToken, // Resolve the signed-in Shopify customer at runtime.
});

const { lists } = await client.lists.getAll();

SDK 0.15.0 retains its constructor key and token requirements even when you point baseUrl at an app proxy. Native same-origin fetch is the simplest key-free proxy setup. For module-script examples and method signatures, see the Universal SDK reference. Use the explicit current origin above when adapting older examples.

Shopify Hydrogen

npm install @sdg.la/wishlist-stack-sdk @sdg.la/wishlist-stack-hydrogen

Set WISHLIST_STACK_BASE_URL=https://app.wishliststack.com and your merchant key in the server environment. The package supplies server-context helpers, React Router middleware, and React hooks. Follow the Hydrogen setup reference and the current Hydrogen instructions in the installed app.

If the browser calls the direct API, allow https://app.wishliststack.com in CSP connect-src and configure permitted storefront origins in the app. Resolve Shopify customer authentication for private operations at runtime.

Direct REST API

API origin: https://app.wishliststack.com. Direct calls use X-Wishlist-Stack-Api-Key; private customer-scoped endpoints also require X-Shopify-Customer-Access-Token.

const response = await fetch('https://app.wishliststack.com/api/lists?page=1&pageSize=20', {
  headers: {
    'X-Wishlist-Stack-Api-Key': merchantApiKey,
    'X-Shopify-Customer-Access-Token': customerAccessToken,
  },
});
if (!response.ok) throw new Error('Wishlist request failed');
const data = await response.json();

Pagination, batches, and feature access

App reference and merchant tools

In Shopify Admin, open Apps → Wishlist Stack → Quick Start and choose your integration method. The installed app also contains API Documentation, Universal SDK, Hydrogen SDK, product/metafield configuration, usage and plan controls, and eligible import and analytics tools.

Publish products to the Online Store so Shopify can supply current product details. The customer-account extension and custom storefront UI are separate integration surfaces; an app installation does not build a custom theme interface for you.

Install Wishlist Stack or contact [email protected] for help.