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. Identifying the customer explains how to produce the signature.

To call them from your own server instead, send a secret key as a bearer token and leave apiPublishableKey out. See Calling the widget API from a server.

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

apiPublishableKeystring

Your organization's publishable key, from Settings, API keys. Leave it out when the request carries a secret key as a bearer token instead, which is how a server calls these endpoints.

sitestring

The slug of the site whose appearance to serve, from data-meisei-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 Meisei gives you. It only busts the cache: the current appearance is served whatever you send.

Request
curl \
  "https://your-store.meisei.app/api/widgets/theme.css?apiPublishableKey=pk_YOUR_PUBLISHABLE_KEY"