Pandabase
Learn

Storefront API

Public read-only API for displaying store information, products, and categories on your frontend.

The Storefront API provides public, read-only access to your store's data. Include your store ID in the URL; no authentication is required. Use it to build storefronts, product pages, and category lists.

Base URL

https://api.pandabase.io/v2/storefront/stores/{storeId}

All endpoints are prefixed with /v2/storefront/stores/{storeId}.

Endpoints

MethodPathDescription
GET/v2/storefront/stores/:storeIdStore info
GET/v2/storefront/stores/:storeId/productsList products (paginated)
GET/v2/storefront/stores/:storeId/products/:productIdProduct detail
GET/v2/storefront/stores/:storeId/categoriesList categories (paginated)
GET/v2/storefront/stores/:storeId/categories/:categoryIdCategory detail

Get Store

Returns public store information including branding, description, and social links.

GET /v2/storefront/stores/{storeId}
{
  "ok": true,
  "data": {
    "id": "shp_abc123",
    "name": "My Store",
    "handle": "my-store",
    "slug": "my-store",
    "description": "We sell digital products.",
    "summary": "Digital goods marketplace",
    "logo": "https://cdn.pandabase.io/stores/logo.png",
    "favicon": "https://cdn.pandabase.io/stores/favicon.png",
    "accentColor": "#07C983",
    "primaryColor": "#0b7031",
    "supportEmail": "support@mystore.com",
    "category": ["SOFTWARE", "DIGITAL_PRODUCTS"],
    "twitterUrl": "https://x.com/mystore",
    "instagramUrl": null,
    "linkedinUrl": null,
    "youtubeUrl": null,
    "tiktokUrl": null
  }
}

List Products

Returns a paginated list of active products. Supports filtering, searching, and sorting.

GET /v2/storefront/stores/{storeId}/products

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (min: 1)
limitinteger25Items per page (1-100)
searchstring—Full-text search on product title
categoryIdstring—Filter by category ID
productTypestring—Filter by type: SERIAL, SERVICE, ONE_TIME, PHYSICAL, SUBSCRIPTION, DIGITAL_DOWNLOAD, LICENSE_KEY
pricingModelstring—Filter by pricing: STANDARD, PAY_WHAT_YOU_WANT, FREE
sortBystringcreatedAtSort field: title, price, createdAt
sortOrderstringdescSort direction: asc, desc
curl "https://api.pandabase.io/v2/storefront/stores/shp_abc123/products?limit=10&sortBy=price&sortOrder=asc"

Only active products are returned. Draft and deleted products are never included in storefront responses.


Get Product

Returns full product details including variants, options, and categories.

GET /v2/storefront/stores/{storeId}/products/{productId}
{
  "ok": true,
  "data": {
    "id": "prd_abc123",
    "title": "Pro Plan",
    "subtitle": "Everything you need",
    "description": "Full access to all features.",
    "handle": "pro-plan",
    "price": 2999,
    "compareAtPrice": 4999,
    "images": ["https://cdn.pandabase.io/products/pro.png"],
    "inStock": true,
    "currency": "USD",
    "productType": "LICENSE_KEY",
    "message": "Thanks for purchasing!",
    "pricingModel": "STANDARD",
    "status": "ACTIVE",
    "minimumPrice": null,
    "maxPerCustomer": 3,
    "fulfillmentMode": "MANAGED_LICENSE",
    "availableFrom": null,
    "availableUntil": null,
    "billingInterval": null,
    "billingAnchor": null,
    "trialDays": null,
    "options": [
      {
        "id": "opt_abc123",
        "name": "License Type",
        "values": ["Personal", "Commercial"],
        "position": 0
      }
    ],
    "variants": [
      {
        "id": "var_abc123",
        "title": "Personal License",
        "slug": "personal-license",
        "description": "For individual use",
        "sku": "PRO-PERSONAL",
        "options": { "License Type": "Personal" },
        "price": 2999,
        "compareAtPrice": 4999,
        "images": [],
        "inStock": true,
        "quantity": null,
        "trackStock": false,
        "position": 0
      }
    ],
    "categories": [
      { "id": "ctg_abc123", "name": "Software", "slug": "software" }
    ]
  }
}

The product detail response includes fields not shown in the list view: description, message, fulfillmentMode, maxPerCustomer, availableFrom/availableUntil, subscription fields, options, and variants.


List Categories

Returns a paginated list of categories. Supports filtering by featured status and parent category.

GET /v2/storefront/stores/{storeId}/categories

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (min: 1)
limitinteger25Items per page (1-100)
featuredboolean—Filter by featured status
parentIdstring—Filter by parent category ID (for subcategories)
curl "https://api.pandabase.io/v2/storefront/stores/shp_abc123/categories?featured=true"

Get Category

Returns category details including subcategories and up to 50 active products.

GET /v2/storefront/stores/{storeId}/categories/{categoryId}
{
  "ok": true,
  "data": {
    "id": "ctg_abc123",
    "name": "Software",
    "slug": "software",
    "description": "Software products and licenses",
    "icon": "code",
    "parentId": null,
    "displayOrder": 0,
    "featured": true,
    "metaTitle": "Software Products",
    "metaDescription": "Browse our software collection",
    "showInNavigation": true,
    "children": [
      { "id": "ctg_def456", "name": "Plugins", "slug": "plugins" }
    ],
    "products": [
      {
        "id": "prd_abc123",
        "title": "Pro Plan",
        "handle": "pro-plan",
        "price": 2999,
        "images": ["https://cdn.pandabase.io/products/pro.png"],
        "inStock": true
      }
    ]
  }
}

The category detail endpoint returns up to 50 products. For full product listings within a category, use the List Products endpoint with the categoryId filter.


Error Responses

All error responses follow the standard format:

{
  "ok": false,
  "error": "Store not found"
}
StatusErrorWhen
404Store not foundInvalid or blocked store ID
404Product not foundProduct doesn't exist, is draft, or is deleted
404Category not foundCategory doesn't exist in this store

Example: Building a Product Page

const STORE_ID = "shp_abc123";
const API = `https://api.pandabase.io/v2/storefront/stores/${STORE_ID}`;

// Fetch store branding
const store = await fetch(`${API}`).then((r) => r.json());

// Fetch featured products
const products = await fetch(
  `${API}/products?limit=12&sortBy=createdAt&sortOrder=desc`,
).then((r) => r.json());

// Fetch a single product with variants
const product = await fetch(`${API}/products/prd_abc123`).then((r) =>
  r.json(),
);

// Fetch categories for navigation
const categories = await fetch(`${API}/categories?featured=true`).then((r) =>
  r.json(),
);

All monetary values are in cents (integers). Divide by 100 for display (e.g., 2999 = $29.99).

Last updated on

On this page