The WordPress plugin exposes a WP REST proxy at /wp-json/brandfine/v1/*. Reference for plugin developers and integrators.
For most customers, the shortcode and Gutenberg block are all you
ever need. This page is for plugin developers or integrators
who want to call Brandfine from frontend JavaScript on a
WordPress page.
Brandfine's /external/* API expects an X-Api-Key header. The
plugin sends the workspace's publishable key there, and signs the
logged-in WordPress user's identity server-side with the identity
secret Connect gave it, so the browser never handles either. The
thin WP REST proxy:
Verifies a WordPress nonce (wp_rest action)
Per-IP rate-limits requests
Forwards to Brandfine with the X-Api-Key header (and, for a
logged-in user, the signed identity) attached
Returns Brandfine's response verbatim (preserving status codes
and body)
If you're integrating from outside the plugin's own widgets,
this is your interface.
visitorName, visitorEmail, preferences — required.
preferences holds 1–3 options, each { "time" } (an exact UTC
slot start), { "date", "part" } (a YYYY-MM-DD day and morning,
midday or afternoon) or { "date" } (a whole day); anything
else is dropped before forwarding
If you're building a custom shortcode that needs to hit a
different Brandfine endpoint, the proxy is extensible from
includes/class-brandfine-rest.php.
Pattern: add a route in register_routes(), use
$this->forward($this->api->get('/external/...')) to relay
upstream. The permission callback (nonce + rate limit + connection
check) is shared across all routes.