Appearance

These endpoints are called from a shopper's browser, so they take your publishable key rather than a secret one. Anything specific to one customer also takes a signed email and timestamp: see Identifying the customer for how to produce the signature.

GET /widgets/theme.css

Get the stylesheet that themes the widgets on one site. The embed script links this before it renders anything, so the widgets never paint with the default colors first. Cache it for as long as the URL says: the version in the URL changes whenever the appearance does.

Query Parameters

apiPublishableKeystringrequired

Your organization's publishable key, from Settings, API keys.

sitestring

The slug of the site whose appearance to serve, from data-cascade-site on your script tag. With no site named, the organization's oldest site is used, which is the right answer for the single-site majority.

vstring

The version from the stylesheet URL Cascade gives you. It only busts the cache: the current appearance is served whatever you send.

Request
curl \
  "https://api.cascade.dev/widgets/theme.css?apiPublishableKey=pk_YOUR_PUBLISHABLE_KEY"