Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.shopi.lk/llms.txt

Use this file to discover all available pages before exploring further.

shop.getShop()

Returns the core shop record — name, subdomain, custom domain, and active theme.
const info = await shop.getShop();

Response

{
  id: string;
  shop_name: string;
  subdomain: string;               // e.g. "halaldude"
  custom_domain: string | null;    // e.g. "shop.halaldude.lk"
  primary_domain: string | null;
  business_type: string | null;
  is_active: boolean;
  active_theme: number | null;
}

Example

const info = await shop.getShop();

document.title = info.shop_name;

if (info.custom_domain) {
  console.log(`Live at: https://${info.custom_domain}`);
}
Returns 404 if the shop is inactive or not found. Always check is_active before rendering.