Brands
A brand decides how the Snapbooks apps look and where they are served. Snapbooks is the default brand (slug snapbooks). A partner firm can have its own brand, with its own logo, icon, support contact and web domain. A program puts its members under a brand, and a client account outside any program uses the Snapbooks brand.
A brand stores only what it changes from the Snapbooks brand. A field that is null means the apps use Snapbooks’ own logo, icon or support contact.
The two endpoints on this page need no authentication. A page on a brand’s domain calls them before anyone signs in, and an <img> tag sends no token. Brands are created and changed by Snapbooks.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /brands?domain={host} | Get the brand served on a domain |
| GET | /brands/{slug}/logo | Get a brand’s logo |
| GET | /brands/{slug}/icon | Get a brand’s icon |
Get the Brand on a Domain
GET /api/v2/brands?domain={host}
Returns the brand served on the host, as a page of at most one brand. A host with no brand returns an empty page, not an error, so the page can fall back to Snapbooks’ look.
No authentication required. A signed-in user gets the same answer.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| domain | string | Yes | The host name the page is served on, e.g. regnskap.example.no |
| with | string | No | programs adds the brand’s programs open for signup |
Example Request
GET /api/v2/brands?domain=regnskap.example.no&with=programs
Response
{
"data": [
{
"id": 4,
"slug": "example-regnskap",
"name": "Example Regnskap",
"domain": "regnskap.example.no",
"logo_url": "https://api.snapbooks.com/snapbooks/api/v2/brands/example-regnskap/logo?v=cafe1234",
"icon_url": null,
"support_email": "hjelp@example.no",
"support_phone": null,
"programs": [
{
"id": 12,
"slug": "example-lege",
"name": "Example for doctors",
"industry_codes_lv": ["86.21"],
"signup_approval": "AUTO"
}
]
}
],
"meta": {
"page": 1,
"pages": 1,
"per_page": 50,
"records": 1
}
}
The response is sent with Cache-Control: public, max-age=60 and Vary: Origin.
Brand Attributes
| Attribute | Type | Description |
|---|---|---|
| id | integer | Unique identifier |
| slug | string | The brand’s URL name, used in the image URLs |
| name | string | The brand’s name |
| domain | string | null | The web host the brand is served on |
| logo_url | string | null | URL of the brand’s logo, or null to use Snapbooks’ logo. See Get a Brand’s Logo or Icon |
| icon_url | string | null | URL of the brand’s icon, or null to use Snapbooks’ icon |
| support_email | string | null | Where the brand’s users get help, or null for Snapbooks support |
| support_phone | string | null | The brand’s support phone number, or null for Snapbooks support |
| programs | array | Only with with=programs. The brand’s programs that have started and not ended, see below |
Program Attributes
| Attribute | Type | Description |
|---|---|---|
| id | integer | Unique identifier |
| slug | string | The program’s URL name. Send it as program in the signup when several programs fit |
| name | string | The program’s name |
| industry_codes_lv | array of strings | SN2025 industry codes the program is for, e.g. ["86.21"]. A company fits when its industry code starts with one of them. An empty list fits every company |
| signup_approval | string | PROVIDER: the firm approves each signup. AUTO: the company joins at once |
A program that has ended, or has not started yet, takes no signups and is left out.
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | brand.domain_required |
domain is missing and the request has no token |
| 401 | The request sent an Authorization header with a token that is not valid |
|
| 429 | Rate limit exceeded (600 per hour) |
Without domain, the endpoint lists every brand, which only Snapbooks admins may do. Other users get 403 with brand.admin_required.
Get a Brand’s Logo or Icon
GET /api/v2/brands/{slug}/logo
GET /api/v2/brands/{slug}/icon
Redirects to the brand’s logo or icon image. Use the logo_url and icon_url from the brand rather than building the URL yourself: they carry a v parameter that changes when the image changes, so a new image shows at once even though browsers may keep the redirect for a day.
No authentication required, so the URL works in an <img> tag and in emails.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| slug | string | The brand’s slug |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| v | string | No | Version of the image. Only changes the URL, for caching |
Example Request
GET /api/v2/brands/example-regnskap/logo?v=cafe1234
Response
302 Found, with a Location header holding a signed URL to the image and Cache-Control: public, max-age=86400. Images are PNG or JPEG.
HTTP/1.1 302 Found
Location: https://<bucket>.s3.amazonaws.com/brand-images/cafe1234...png?X-Amz-Signature=...
Cache-Control: public, max-age=86400
Error Responses
| Status | Code | Description |
|---|---|---|
| 404 | brand.not_found |
No brand has this slug |
| 404 | brand.image_not_found |
The brand has no logo or icon of its own. Show Snapbooks’ instead |
| 429 | Rate limit exceeded (600 per hour) |
Related Resources
- Signup — signing up through a brand’s domain into one of its programs
- Contracts — how a client joins a program through its contract with the firm
- Client Accounts —
with=program.brandshows the brand of a client account’s program