00 Who this is for
This page covers the partner branding / white-label subsystem. Read the panel walkthrough whichever hat you wear; the endpoint chips and the reference at the end are there when you need to wire it up.
What a white-label partner is
A white-label partner is a Lightning Payroll account that has been granted API-admin access. That account owns an OAuth client and a single branding record, and its customers experience a branded version of Lightning Payroll. The flagship example is Farm Focus, the reseller these paths were first built for.
Provisioning the account and OAuth client is covered in the API Admin Setup guide; this page picks up at the branding record and the screen that edits it.
The golden rule. A resolved reseller must never leak Lightning Payroll’s own name, support email, or phone into its branding. Once a partner has branding set, blank fields stay blank for that partner rather than falling back to Lightning Payroll’s details. The Lightning Payroll defaults appear only when there is no branding identity at all.
01 How branding resolves
Most API-admin responses carry two branding objects. Knowing which is which saves a lot of “why isn’t my logo showing” debugging.
effective_branding.source_type tells you where the resolved branding came from:
| source_type | Meaning |
|---|---|
none | No branding identity. Falls back to Lightning Payroll defaults. |
self | Resolved from the API-admin’s own branding record. The common case once setup is done. |
oauth_client | Resolved via the customer’s live OAuth link to a partner client. |
add_on | Resolved via an add-on entitlement assignment (for example Farm Focus). |
02 The Branding panel
Everything below lives on one screen: Manage API Client → Branding. It is a single Whitelabel Branding card plus a live email preview and, once configured, a branded-login card. Here is the whole panel, then each control in turn.
Whitelabel logo & App Branding Text
The primary logo shown in the branded, authenticated app and in branded emails, alongside a read-out of the current brand text.
Upload Logo / Replace Logo takes a jpg, jpeg, png, or gif up to 1 MB. The App Branding Text tile on the left summarises the current display name, subtitle, support email & phone, homepage and support URLs, and whether dark mode is locked. Those values are edited in the Edit Branding Details modal. The right-hand preview shows the current logo, or a “No logo preview available” placeholder when none is set.
Dark mode logo
An alternate logo for dark mode. Rendered on a dark preview swatch so you can check contrast.
Same limits as the primary logo (jpg, jpeg, png, gif; 1 MB). If unset, the primary logo is used in dark mode. Match its dimensions for a consistent look.
Favicon
The small icon in the browser tab and when the app is installed as a PWA.
The favicon is the only asset that accepts .ico (also png, jpg,
gif; 1 MB). Use a square image — 32×32, 48×48, or 64×64. If unset,
the primary logo is used.
Email banner
A wide header image for branded emails. When set, it replaces the logo and brand name in the email header.
This is the single most misunderstood control, so it is worth being explicit:
- The banner is one uploaded image. There is no banner text field and no banner colour field. “Configurable” means upload, replace, or remove — nothing more.
- It is on when an image is present, off when it isn’t. There is no separate toggle.
- When on, it renders full-width at the top of the email and replaces both the logo and the brand-name heading.
- It is email-only — not used on login/auth screens, not inside the app, not on PDFs.
Accepted types: png, jpg, gif. This is the only asset with a 2 MB ceiling (all others are 1 MB). Recommended: a wide image about 600px across, for example 600×150.
Two nearby settings are often mistaken for banner config but are separate: the email accent colour (drives link/button/heading colour) and the subtitle (drives the “Powered by Lightning Payroll” attribution line). Both live in Edit Branding Details.
Email header preview
A live, approximate render of how the branded email header will look with the current assets.
The preview updates as you upload, so a designer can see the “banner replaces logo and name” effect without sending a test email. It renders the same branch logic the real email uses (see How branded email renders).
The preview is approximate: it shows the light-mode header and does not reflect the email accent colour or dark-mode logo switching. The authoritative render is always the sent email.
Custom stylesheet
Optional CSS to theme the authenticated app: colours, typography, and layout details across the admin shell.
Upload a UTF-8 .css file up to 64 KB; changes apply immediately. Include
body.lp-dark-mode rules for dark-mode support. The panel calls out the recommended
theming hooks — --lp-branding-header-text, --lp-branding-muted-text,
--lp-branding-action-text, --lp-branding-nav-text, and the
--lp-table-* family for data tables.
CSS Generator Help
The CSS Generator Help button opens a modal with a browser-console command that
generates a first-pass whitelabel CSS file from a reference app, copies it to your clipboard,
and downloads generated-whitelabel.css. It is a strong starting point, not a final
theme — expect to tweak navbar contrast, dark mode, and one-off components.
Branded login URL
A copyable link that opens the login page pre-branded for this partner.
localhost:3001) and token shown are from a local sample environment; your customers see your own production host.This card appears once a public branding token exists. The link looks like:
https://app.lightningpayroll.com.au/auth/login?branding_token=<public-branding-token>
Opening it renders the standard login page pre-branded (logo, name, colours), resolved from the public branding token. Share it as the partner’s “log in here” link.
Edit branding details
The modal behind “App Branding Text”: display name, subtitle, support contacts, links, and theme options.
The modal groups the text and link fields that make up the brand identity:
| Field | What it drives |
|---|---|
| Brand display name | The name in the admin header/sidebar and the email heading. |
| Brand subtitle | Tagline; also drives the “Powered by Lightning Payroll” attribution line. |
| Support email / phone | Shown on branded login, reset-password, and support prompts. |
| Homepage URL | Replaces Lightning Payroll links in navigation and emails. |
| Support / FAQ URL | Replaces LP support links in emails and navigation. |
| Lock to light mode | Prevents users switching to dark mode — use when your stylesheet has no dark rules. |
Brand text fields are saved through the API-admin update endpoint, not a per-asset upload:
03 Asset specifications
Every value here is enforced by the backend; an upload that violates it is rejected with a
400. Two odd-ones-out are worth remembering: only the favicon accepts .ico,
and only the email banner has a 2 MB ceiling.
| Asset | Types | Max size | Recommended | Where it appears |
|---|---|---|---|---|
| Primary logo | jpg, jpeg, png, gif | 1 MB | Native aspect, scaled to fit | App, hosted login, branded email header |
| Dark-mode logo | jpg, jpeg, png, gif | 1 MB | Match the primary logo | Same as primary, in dark mode |
| Favicon | ico, png, jpg, gif | 1 MB | Square — 32, 48, or 64px | Browser tab, installed-PWA icon |
| Email banner | jpg, jpeg, png, gif | 2 MB | Wide, ~600px (e.g. 600×150) | Branded email header only |
| Custom stylesheet | .css, UTF-8 | 64 KB | — | Authenticated app |
04 How branded email renders
The email header renders in one of three states. This is exactly what the in-panel Email Header Preview mirrors.
- Banner set → the banner image, full-width. No logo, no brand-name heading.
- No banner, logo(s) set → the logo (light + dark pair, or a single logo), then the brand name as a heading, then the optional subtitle.
- No branding identity at all → the default Lightning Payroll header.
The banner is served to the email as an <img src> from the public serve endpoint
(below). It scales down only to fit, never up, and degrades safely: if the banner
bytes or the branding token are missing, the header quietly falls back to the logo/heading branch, so
a misconfigured banner never breaks an email.
05 Endpoint reference
The management endpoints below are gated by API-admin auth — a normal Lightning Payroll bearer
token for the partner’s own account, not OAuth client credentials. The public serve/resolve
endpoints are unauthenticated and resolve by client_id or branding_token.
| Methods | Path | Purpose |
|---|---|---|
GET POST DELETE | /api/api-client/whitelabel-logo | Primary logo |
GET POST DELETE | /api/api-client/whitelabel-dark-logo | Dark-mode logo |
GET POST DELETE | /api/api-client/whitelabel-favicon | Favicon |
GET POST DELETE | /api/api-client/whitelabel-banner | Email banner |
GET POST DELETE | /api/api-client/whitelabel-style | Custom stylesheet |
POST | /api/update-api-client | Brand text, contacts, links, theme flags |
GET | /api/public-branding | Resolve branding by client_id or branding_token (public) |
GET | /api/public-branding/logo | Serve logo / dark / favicon / banner bytes (public) |
Asset upload semantics
POST handlers are multipart/form-data with a file field and an
overwrite_existing boolean (default false). Error semantics are consistent
across the asset endpoints:
| Status | Meaning |
|---|---|
400 | Empty file, wrong type, or oversized payload |
404 | Delete of an asset that doesn’t exist |
409 | Asset exists and overwrite_existing=true was not supplied — body carries requires_overwrite: true |
422 | Stylesheet upload not valid UTF-8 |
Example — email banner CRUD
# Read banner metadata curl -sS "$BASE_URL/api/api-client/whitelabel-banner" \ -H "Authorization: Bearer $ADMIN_TOKEN" # Upload (first time) curl -sS "$BASE_URL/api/api-client/whitelabel-banner" \ -H "Authorization: Bearer $ADMIN_TOKEN" \ -F "file=@partner-banner.png" # Replace an existing banner curl -sS "$BASE_URL/api/api-client/whitelabel-banner" \ -H "Authorization: Bearer $ADMIN_TOKEN" \ -F "overwrite_existing=true" \ -F "file=@partner-banner.png" # Delete curl -sS -X DELETE "$BASE_URL/api/api-client/whitelabel-banner" \ -H "Authorization: Bearer $ADMIN_TOKEN"
Serving an asset publicly
The unauthenticated serve endpoint returns image bytes; the mode query parameter selects
which asset. mode=banner is what a branded email embeds as its banner image source.
curl -sS "$BASE_URL/api/public-branding/logo?branding_token=<token>&mode=banner" \ --output banner.bin
Other modes fall back favicon → dark → primary logo.
Field-level shapes are always live: FastAPI serves interactive docs at /docs,
/redoc, and /openapi.json.
Treat the live schema as the reference.