Skip to content

Portal Object ​

The window.Portal object itself: one property per module, plus the settings that say which site the page talks to.

Quick start ​

ts
window.Portal.url_key = 'abc123'; // which site this page talks to
const events = await window.Portal.events.events(); // then use any module
console.log(events.length);

API reference ​

PortalDashboardRenderContext ​

What a section provider's render() receives.

connection ​

The connection being shown.

Type: PortalSiteUserConnection

ts
const connection = dashboardRenderContext.connection;

goTo() ​

Jump to another view, possibly in another group (a purchase's manage target).

ts
dashboardRenderContext.goTo(moduleKey, instance, view, ref);

Parameters

NameTypeRequiredDescription
moduleKeystringYes—
instancestring | nullYes—
viewstringYesThe view key.
refstringNoA reference.

ref ​

A record reference when the view is a detail screen.

Type: string

ts
const ref = dashboardRenderContext.ref;

refresh() ​

Re-render this view — e.g. after a cancel. Also refreshes the sidebar's badge counts.

ts
await dashboardRenderContext.refresh();

Returns

Resolves when the call has completed.

su ​

The page's Site Users client.

Type: PortalSiteUsersInstance

ts
const su = dashboardRenderContext.su;

user ​

The signed-in user.

Type: PortalSiteUserPublic

ts
const user = dashboardRenderContext.user;

view ​

The view key to paint.

Type: string

ts
const view = dashboardRenderContext.view;

PortalDashboardSectionProvider ​

A module's contribution to the account dashboard. Register it with Portal.ui.siteUsers.registerSectionProvider().

moduleKey ​

The module key this provider serves; matches PortalSiteUserConnection.module_key.

Type: string

ts
const moduleKey = dashboardSectionProvider.moduleKey;

render() ​

Paint one view into host. Owns its own fetches, its own empty state and its own errors — a throw here is caught by the shell and rendered as a retry notice inside the pane, never as a blank dashboard.

ts
await dashboardSectionProvider.render(host, ctx);

Parameters

NameTypeRequiredDescription
hostHTMLElementYesPaint one view into host.
ctxPortalDashboardRenderContextYesWhat a section provider's render() receives.

Returns

Resolves when the call has completed.

views() ​

Which views this connection offers. Filter on connection.capabilities — never assume.

ts
const dashboardViews = dashboardSectionProvider.views(connection);

Parameters

NameTypeRequiredDescription
connectionPortalSiteUserConnectionYesA "connection" links a site user's account to one module instance (a store, an event...), so the account dashboard can show that module's data.

Returns

Returns an array of PortalDashboardView.

PortalProcessorsAPIClient ​

Billing calls on Portal.processors (a provider-neutral API client).

configure() ​

Sets the API base URL (for pages on another origin).

ts
processorsAPIClient.configure(options);

Parameters

NameTypeRequiredDescription
optionsobjectYesOptional settings.
options.baseUrlstringNo—

deletePaymentMethod() ​

Deletes a saved card.

ts
const result = await processorsAPIClient.deletePaymentMethod(params);

Parameters

NameTypeRequiredDescription
paramsobjectYesExtra options.
params.processor_reference_numstringYesThe processor's reference number.
params.customer_idstringYesThe customer's id at the provider.
params.method_idstringYesThe saved payment method's id.

Returns

Resolves with an object with these fields:

NameTypeRequiredDescription
successbooleanYesTrue when the call worked.
messagestringNoA message to show the visitor.

getPayments() ​

The customer's charges, subscription and saved cards.

ts
const billingPaymentsResponse = await processorsAPIClient.getPayments(params);

Parameters

NameTypeRequiredDescription
paramsobjectYesExtra options.
params.processor_reference_numstringYesThe processor's reference number.
params.customer_idstringYesThe customer's id at the provider.

Returns

Resolves with a PortalBillingPaymentsResponse: The answer to Portal.processors.getPayments().

getPlans() ​

The subscription plans of the processor.

ts
const result = await processorsAPIClient.getPlans();

Returns

Resolves with an object with these fields:

NameTypeRequiredDescription
successbooleanYesTrue when the call worked.
dataArray<Record<string, unknown>>YesThe data.

getPublicConfig() ​

The processor's public settings (no secrets): provider, mode, publishable key, hosted or embedded, provider extras. No sign-in needed.

ts
const result = await processorsAPIClient.getPublicConfig(processorReferenceNum);

Parameters

NameTypeRequiredDescription
processorReferenceNumstringYes—

Returns

Resolves with an object with these fields:

NameTypeRequiredDescription
reference_numstringYesThe record's reference number.
providerstringYesThe provider's name.
modestringYes—
publishable_keystringYes—
use_hostedbooleanYesTrue when the provider's hosted page is used.
extra_configRecord<string, unknown>Yes—

storePaymentMethod() ​

Saves a payment method to the customer (a Stripe payment method id, or a Square source id).

ts
const result = await processorsAPIClient.storePaymentMethod(params);

Parameters

NameTypeRequiredDescription
paramsobjectYesExtra options.
params.processor_reference_numstringYesThe processor's reference number.
params.customer_idstringYesThe customer's id at the provider.
params.source_idstringNoThe card token from the provider's own SDK.
params.payment_method_idstringNo—

Returns

Resolves with an object with these fields:

NameTypeRequiredDescription
successbooleanYesTrue when the call worked.
messagestringNoA message to show the visitor.

syncPayments() ​

Re-reads the customer's data from the provider.

ts
const billingSyncResponse = await processorsAPIClient.syncPayments(params);

Parameters

NameTypeRequiredDescription
paramsobjectYesExtra options.
params.processor_reference_numstringYesThe processor's reference number.
params.customer_idstringYesThe customer's id at the provider.

Returns

Resolves with a PortalBillingSyncResponse: The answer to Portal.processors.syncPayments().

updatePaymentMethod() ​

Makes a saved card the default.

ts
const result = await processorsAPIClient.updatePaymentMethod(params);

Parameters

NameTypeRequiredDescription
paramsobjectYesExtra options.
params.processor_reference_numstringYesThe processor's reference number.
params.customer_idstringYesThe customer's id at the provider.
params.method_idstringYesThe saved payment method's id.

Returns

Resolves with an object with these fields:

NameTypeRequiredDescription
successbooleanYesTrue when the call worked.
messagestringNoA message to show the visitor.

PortalSiteUsersGateOptions ​

Options of Portal.ui.siteUsers.requireSignIn().

onGuest() ​

The visitor continues as a guest; only offered when the block allows guests.

ts
const result = siteUsersGateOptions.onGuest();

Returns

Returns void \| Promise<void>.

onSignedIn() ​

A session exists (already, or after the sign-in).

ts
const result = siteUsersGateOptions.onSignedIn(user, su);

Parameters

NameTypeRequiredDescription
userPortalSiteUserPublicYesA signed-in site user, as safe to show in the browser.
suPortalSiteUsersInstanceYesA Site Users client for one module: account sign-in, profile, saved cards, purchases.

Returns

Returns void \| Promise<void>.

purpose ​

Heading copy: "Sign in <purpose>", for example "to complete your order".

Type: string

ts
const purpose = siteUsersGateOptions.purpose;

su ​

The page's own Site Users client; leave it out on a page served by the same site as the API.

Type: PortalSiteUsersInstance

ts
const su = siteUsersGateOptions.su;

processor ​

A provider-aware payment client (new Portal.processors.Client({ processorId })). It hides the difference between Stripe, Square and PayPal. Direct Payments drives it for you; use it directly only for custom flows.

confirmStripePayment() ​

Stripe: confirms the mounted payment.

ts
const processorClientPaymentResult = await processor.confirmStripePayment(returnUrl, setupFutureUsage);

Parameters

NameTypeRequiredDescription
returnUrlstringYesWhere the buyer is sent back to after the provider's own page.
setupFutureUsagebooleanNoKeep the card for later charges.

Returns

Resolves with a PortalProcessorClientPaymentResult: The outcome of a payment or card-setup call.

confirmStripeSetup() ​

Stripe: confirms the mounted card setup.

ts
const processorClientPaymentResult = await processor.confirmStripeSetup(returnUrl);

Parameters

NameTypeRequiredDescription
returnUrlstringYesWhere the buyer is sent back to after the provider's own page.

Returns

Resolves with a PortalProcessorClientPaymentResult: The outcome of a payment or card-setup call.

createPayment() ​

Mounts a payment form (or redirects to the hosted page) for a payment.

ts
const processorClientPaymentResult = await processor.createPayment(opts);

Parameters

NameTypeRequiredDescription
optsPortalProcessorClientCheckoutOptionsYesThe options of a payment or a card setup (createPayment, setupPaymentMethod, tokenizeSquareAndCharge).

Returns

Resolves with a PortalProcessorClientPaymentResult: The outcome of a payment or card-setup call.

createSubscription() ​

Starts a subscription.

ts
const processorClientSubscriptionResult = await processor.createSubscription(opts);

Parameters

NameTypeRequiredDescription
optsPortalProcessorClientSubscriptionOptionsYesOptions of client.createSubscription().

Returns

Resolves with a PortalProcessorClientSubscriptionResult: The outcome of client.createSubscription() and the subscription:* events.

destroy() ​

Unmounts the form and releases the provider client.

ts
processor.destroy();

getConfig() ​

The public settings the client loaded in init(), or null before.

ts
const result = processor.getConfig();

Returns

Returns PortalProcessorClientConfig \| null.

init() ​

Loads the processor's settings and prepares the provider SDK. Call first.

ts
await processor.init();

Returns

Resolves when the call has completed.

onResult() ​

Registers a callback for the outcome of payments started through this client.

ts
processor.onResult(callback);

Parameters

NameTypeRequiredDescription
callback(result: PortalProcessorClientPaymentResult) => voidYesThe outcome of a payment or card-setup call.

setupPaymentMethod() ​

Sets a payment method up for later use without charging now (Stripe SetupIntent).

ts
const processorClientPaymentResult = await processor.setupPaymentMethod(opts);

Parameters

NameTypeRequiredDescription
optsPortalProcessorClientCheckoutOptionsYesThe options of a payment or a card setup (createPayment, setupPaymentMethod, tokenizeSquareAndCharge).

Returns

Resolves with a PortalProcessorClientPaymentResult: The outcome of a payment or card-setup call.

tokenizeSquare() ​

Square: tokenises the entered card without charging; resolves with the source_id.

ts
const result = await processor.tokenizeSquare();

Returns

Resolves with an object with these fields:

NameTypeRequiredDescription
successbooleanYesTrue when the call worked.
source_idstringNoThe card token from the provider's own SDK.
errorstringNoThe reason, when it failed.

tokenizeSquareAndCharge() ​

Square: tokenises the entered card and charges it.

ts
const processorClientPaymentResult = await processor.tokenizeSquareAndCharge(opts);

Parameters

NameTypeRequiredDescription
optsPortalProcessorClientCheckoutOptionsYesThe options of a payment or a card setup (createPayment, setupPaymentMethod, tokenizeSquareAndCharge).

Returns

Resolves with a PortalProcessorClientPaymentResult: The outcome of a payment or card-setup call.

updatePaymentAmount() ​

Updates the amount of a mounted form before it is confirmed (Stripe deferred intents); false when the provider cannot.

ts
const ok = await processor.updatePaymentAmount(amountCents);

Parameters

NameTypeRequiredDescription
amountCentsnumberYesAn amount in cents.

Returns

Resolves with a boolean.

window.Portal ​

The window.Portal object: one property per module.

analytics ​

Visitor analytics.

Type: PortalAnalyticsAPI

ts
const analytics = window.Portal.analytics;

appointments ​

Appointment booking.

Type: PortalAppointmentsAPI

ts
const appointments = window.Portal.appointments;

brain ​

A client of the Brain, for pages not served by a site.

Type: PortalBrainNamespace

ts
const brain = window.Portal.brain;

brain_url ​

For a page on another origin that talks to the Brain (no sites address, so no key): the Brain's https origin, for example https://www.appfactory.studio. Set it before the SDK runs; url_key wins when both are set.

Type: string

ts
const brain_url = window.Portal.brain_url;

chat ​

Live chat (visitor side).

Type: PortalChatNamespace

ts
const chat = window.Portal.chat;

commerce ​

Online store: create(storeRef) gives a client.

Type: PortalCommerceAPI

ts
const commerce = window.Portal.commerce;

directPayments ​

Payments and subscriptions: create(ref) gives a client.

Type: PortalDirectPaymentsFactory

ts
const directPayments = window.Portal.directPayments;

documents ​

File upload and management.

Type: PortalDocumentsNamespace

ts
const documents = window.Portal.documents;

events ​

Public events and ticketing.

Type: PortalEventsAPI

ts
const events = window.Portal.events;

feedback ​

Visitor feedback forms.

Type: PortalFeedbackAPI

ts
const feedback = window.Portal.feedback;

forms ​

Dashboard-built forms.

Type: PortalFormsAPI

ts
const forms = window.Portal.forms;

httpUrl ​

The origin every request goes to, built from url_key (https://<url_key>.sites.appfactory.studio); the page's own origin when there is no key. Read-only: assigning it is ignored.

Type: string (read-only)

ts
const httpUrl = window.Portal.httpUrl;

listings ​

Listings (cards, directories).

Type: PortalListingsAPI

ts
const listings = window.Portal.listings;

mailHandler ​

Send e-mail through a configured handler.

Type: PortalMailHandlerAPI

ts
const mailHandler = window.Portal.mailHandler;

notifications ​

Inbox notifications and notification rules.

Type: PortalNotificationsAPI

ts
const notifications = window.Portal.notifications;

processors ​

Payment provider clients (lower level than Direct Payments).

Type: PortalProcessorsNamespace

ts
const processors = window.Portal.processors;

siteUsers ​

Visitor accounts (sign-in, profile, saved cards, purchases).

Type: PortalSiteUsersNamespace

ts
const siteUsers = window.Portal.siteUsers;

subscribers ​

Newsletter / mailing-list sign-up.

Type: PortalSubscribersAPI

ts
const subscribers = window.Portal.subscribers;

ui ​

Reference UI blocks; present only when the separate UI bundle is loaded.

Type: PortalUiNamespace

ts
const ui = window.Portal.ui;

url_key ​

The site this page talks to: the <ref> of https://<ref>.sites.appfactory.studio (shown at the top of the dashboard's Settings). Set it once the SDK has loaded: window.Portal.url_key = '<ref>'. Empty on a site's own pages.

Type: string

ts
const url_key = window.Portal.url_key;

window.Portal.subscribers ​

Portal.subscribers — newsletter / mailing-list sign-up.

getCategories() ​

The lists a visitor can join.

ts
const subscriberCategorySummarys = await window.Portal.subscribers.getCategories();

Returns

Resolves with an array of PortalSubscriberCategorySummary.

subscribe() ​

Subscribes an address to one or more lists.

ts
const subscriberSignupResponse = await window.Portal.subscribers.subscribe(payload);

Parameters

NameTypeRequiredDescription
payloadPortalSubscriberSignupPayloadYesWhat Portal.subscribers.subscribe() sends: a newsletter sign-up.

Returns

Resolves with a PortalSubscriberSignupResponse: The answer to Portal.subscribers.subscribe().

window.Portal.ui.ecommerce ​

Reference e-commerce UI (Portal.ui.ecommerce): self-mounting storefront blocks.

applyPrices() ​

Writes the prices of a (legacy) catalogue into the page under root.

ts
window.Portal.ui.ecommerce.applyPrices(root, catalog);

Parameters

NameTypeRequiredDescription
rootHTMLElementYesWrites the prices of a (legacy) catalogue into the page under root.
catalogPortalUiPriceCatalogYesThe price list Portal.ui.ecommerce.applyPrices() paints into designed markup.

install() ​

Mounts every matching root on the page; called once on load.

ts
window.Portal.ui.ecommerce.install();

mount() ​

Mounts one root yourself (for example one inserted after load).

ts
await window.Portal.ui.ecommerce.mount(root);

Parameters

NameTypeRequiredDescription
rootHTMLElementYesThe element to search inside.

Returns

Resolves when the call has completed.

toast() ​

Shows a toast message; isError styles it as an error.

ts
window.Portal.ui.ecommerce.toast(message, isError);

Parameters

NameTypeRequiredDescription
messagestringYesA message to show the visitor.
isErrorbooleanNoShows a toast message; isError styles it as an error.

window.Portal.ui.events ​

A page-level module's reference UI — – install() self-mounts every matching root on the page (called once, on load); mount(root) is exposed for a consumer who wants to mount a root itself (e.g. one inserted after page load).

install() ​

Mounts every matching root on the page. Runs automatically on load.

ts
window.Portal.ui.events.install();

mount() ​

Mounts one root element.

ts
await window.Portal.ui.events.mount(root);

Parameters

NameTypeRequiredDescription
rootHTMLElementYesThe element to search inside.

Returns

Resolves when the call has completed.

window.Portal.ui.siteUsers ​

Exposed on Portal.ui.siteUsers so a tenant with a bespoke module can contribute a Dashboard group from their own script tag.

Extends PortalUiModuleAPI.

registerSectionProvider() ​

Adds a section (a group of views) to the Site Users dashboard from your own module.

ts
window.Portal.ui.siteUsers.registerSectionProvider(provider);

Parameters

NameTypeRequiredDescription
providerPortalDashboardSectionProviderYesA module's contribution to the account dashboard.

requireSignIn() ​

The sign-in gate. Renders the login form into host when nobody is signed in (with no "continue as guest" button when block.guest_checkout is false), or calls onSignedIn straight away when a session exists. Site Users does not know which module is asking: the module passes the site_users block from its own settings.

ts
await window.Portal.ui.siteUsers.requireSignIn(host, block, options);

Parameters

NameTypeRequiredDescription
hostHTMLElementYesRenders the login form into host when nobody is signed in (with no "continue as guest" button when block.guest_checkout is false), or calls onSignedIn straight away when a session exists.
blockPortalSiteUsersBlockYesThe site_users block every connected instance's public config (a store, an event, an appointment calendar) carries.
optionsPortalSiteUsersGateOptionsYesOptions of Portal.ui.siteUsers.requireSignIn().

Returns

Resolves when the call has completed.

Types ​

PortalApiError ​

The shape every commerce/events/appointments SDK method's rejection carries once a request fails. code ending in _E_AUTH_REQUIRED (or equal to SU_E_AUTH_REQUIRED) means the request needs a signed-in session belonging to module, when named.

Extends Error.

NameTypeRequiredDescription
statusnumberYesThe HTTP status.
codestringNoA stable machine code, for example 'DP_E_NOT_RESUMABLE'.
modulestringNoFor auth-required errors: the Site Users module to sign in to.
approvalUrlstringNoDirect Payments: with DP_E_APPROVAL_REQUIRED, where the payer approves a plan change at the provider (PayPal).
ts
try {
  await window.Portal.events.myRegistrations();
} catch (e) {
  const err = e as PortalApiError;
  if (err.code && err.code.endsWith('_E_AUTH_REQUIRED')) {
    console.log('Sign in to Site Users module', err.module);
  }
}

PortalBillingPaymentMethodRecord ​

A saved card as the billing view lists it.

NameTypeRequiredDescription
idstringYesThe method's id.
cardNumberstringYesMasked number.
expiryDatestringYesMM/YY.
cardTypestringYesBrand.
cardholderNamestringYesThe cardholder's name.
billingZipstringNoThe billing postcode.

PortalBillingPaymentRecord ​

One charge of a customer, from Portal.processors.getPayments().

NameTypeRequiredDescription
idnumberYesRecord id.
charge_idstringYesThe provider's charge id.
amount_centsnumberYesAmount in cents.
currencystringYesISO currency code.
statusstringYesPayment status.
providerstringYesThe provider's name.
descriptionstringYesWhat was paid for.
last4stringYesLast four digits of the card used.
charged_atstringYesISO date charged.

PortalBillingPaymentsResponse ​

The answer to Portal.processors.getPayments().

NameTypeRequiredDescription
successbooleanYesTrue when the call worked.
chargesPortalBillingPaymentRecord[]YesThe customer's charges.
subscriptionPortalBillingSubscriptionRecordNoThe customer's subscription, if any.
payment_methodsPortalBillingPaymentMethodRecord[]NoThe customer's saved cards.
messagestringNoA message to show.

PortalBillingSubscriptionRecord ​

A customer's subscription as the billing view lists it.

NameTypeRequiredDescription
idnumberYesRecord id.
plan_idstringYesThe plan's id.
statusstringYesSubscription status.
current_period_endstringYesISO date the current period ends.
discount_codestringNoThe discount code in use.
default_payment_method_idstringNoThe saved card charged.
planobjectNoThe plan's details.
plan.namestringYesThe name.
plan.plan_amount_centsnumberYes—
plan.plan_intervalstringYes—
plan.descriptionstringNoA description.

PortalBillingSyncResponse ​

The answer to Portal.processors.syncPayments().

NameTypeRequiredDescription
successbooleanYesTrue when the call worked.
messagestringNoA message to show.
provider_raw_dataRecord<string, unknown>NoThe provider's raw data, for debugging.

PortalDashboardView ​

One view (sidebar entry / screen) a dashboard section provides.

NameTypeRequiredDescription
keystringYesStable within a group. Becomes data-su-nav="<module_key>:<instance|*>:<key>".
labelstringYesLabel of the sidebar button.
iconstringNoIcon name.
navVisiblebooleanNofalse: reachable by row click or deep link, never its own sidebar button. Default true.

PortalProcessorClientCheckoutOptions ​

The options of a payment or a card setup (createPayment, setupPaymentMethod, tokenizeSquareAndCharge).

NameTypeRequiredDescription
amountnumberYesAmount in the smallest currency unit (cents for USD).
currencystringNoISO 4217 currency code. Default 'usd'.
descriptionstringNoShown on the provider's dashboard.
emailstringNoThe payer's e-mail.
successUrlstringNoWhere to redirect after a successful hosted payment.
cancelUrlstringNoWhere to redirect after a cancelled hosted payment.
metadataRecord<string, string>NoExtra key/value data stored with the payment.
mountTargetstring | HTMLElementNoCSS selector or element to mount the embedded payment form into.
setup_future_usagebooleanNoStripe only: set the payment intent up for later off-session use (subscriptions).
split_itemsobject[]NoStripe only: a marketplace split, one entry per seller line (the browser never needs a raw account id).
split_items[].seller_reference_numstringYesThe seller's reference.
split_items[].order_item_reference_numstringYesThe order item's reference.
split_items[].line_netnumberYesThe line's net amount.
transfer_groupstringNoRequired alongside split_items: must equal the order or invoice reference.

PortalProcessorClientConfig ​

A processor's public settings, as loaded by client.init().

NameTypeRequiredDescription
reference_numstringYesThe processor's reference.
provider'stripe' | 'square' | 'paypal'YesWhich provider the processor uses.
mode'sandbox' | 'live'Yessandbox (test money) or live.
publishable_keystringYesThe key the browser-side provider SDK uses; safe to expose.
use_hostedbooleanYesTrue when the provider's hosted page is used instead of an embedded form.
extra_configRecord<string, string>YesProvider-specific extra settings.

PortalProcessorClientOptions ​

Options of new Portal.processors.Client().

NameTypeRequiredDescription
processorIdstringYesThe processor's reference.

PortalProcessorClientSubscriptionOptions ​

Options of client.createSubscription().

NameTypeRequiredDescription
emailstringNoThe payer's e-mail.
plan_idstringYesThe plan id configured for the processor.
tier_refstringNoThe Direct Payments tier being bought; the server then starts the subscription at that tier's price.
intervalstringNoWhich of the tier's prices to start on (month, year,...). Only read with tier_ref.
discount_codestringNoA discount code (check it first with resolveDiscount()).
source_idstringNoSquare only: the nonce from the Square Web Payments SDK.
invoice_reference_numstringNoThe invoice the subscription belongs to.
metadataRecord<string, string>NoExtra key/value data.
mountTargetstring | HTMLElementNoWhere the payment form is mounted.

PortalProcessorsNamespace ​

Portal.processors: billing calls plus the Client constructor.

Extends PortalProcessorsAPIClient.

NameTypeRequiredDescription
Clientnew (opts: PortalProcessorClientOptions) => PortalProcessorClientInstanceYesConstruct a provider-aware processor client

PortalSubscriberCategorySummary ​

A subscriber list (category) a visitor can join.

NameTypeRequiredDescription
idstringYesThe category id; use it in category_ids.
namestringYesDisplay name.
descriptionstringYesWhat the list is about.
activebooleanYesFalse when the list is closed to new sign-ups.
subscribers_countnumberNoHow many people are on the list, when the server reports it.

PortalSubscriberSignupPayload ​

What Portal.subscribers.subscribe() sends: a newsletter sign-up.

NameTypeRequiredDescription
emailstringYesThe subscriber's e-mail address (required).
namestringNoThe subscriber's name.
phonestringNoThe subscriber's phone number.
category_idsstring[]NoThe lists (categories) to join, by id.
category_idstringNoA single list to join; same as a one-item category_ids.

PortalSubscriberSignupResponse ​

The answer to Portal.subscribers.subscribe().

NameTypeRequiredDescription
successbooleanYesTrue when the visitor was subscribed.
subscriberobjectNoThe stored subscriber.
subscriber.idstringYesThe record's id.
subscriber.emailstringYesAn e-mail address.
subscriber.namestringNoThe name.
subscriber.phonestringNoA phone number.
subscriber.activebooleanYesFalse until the address is confirmed, when double opt-in is on.
hubspot_syncedbooleanNoTrue when the subscriber was also pushed to the connected CRM.
messagestringNoA message to show the visitor.

PortalUiNamespace ​

Portal.ui — the reference UI layer, loaded separately from the data SDK. Each member auto-mounts elements with the matching data-* attributes.

NameTypeRequiredDescription
ecommercePortalUiEcommerceAPIYesStorefront blocks.
eventsPortalUiModuleAPIYesEvent listing and registration blocks.
appointmentsPortalUiModuleAPIYesBooking blocks.
siteUsersPortalUiSiteUsersAPIYesLogin, register and account dashboard blocks.
notificationsPortalUiModuleAPIYesBell, inbox and per-event switches: [data-notifications-kind="bell"|"inbox"|"rules"] roots.
feedbackPortalUiModuleAPIYesThe Feedback block: [data-feedback-kind="form"] roots.
ts
<div data-notifications-kind="bell"></div>
<script>if (window.Portal.ui) window.Portal.ui.notifications.install();</script>

PortalUiPriceCatalog ​

The price list Portal.ui.ecommerce.applyPrices() paints into designed markup.

NameTypeRequiredDescription
revisionnumberNoCatalogue revision number.
currencystringNoISO currency code.
pricesobject[]NoOne row per priced product.
prices[].product_refstringYes—
prices[].product_namestringYes—
prices[].slugstring | nullNoURL slug.
prices[].variant_refstring | nullNo—
prices[].price_centsnumberYesPrice in cents.