Skip to content

A brand's guidelines, in a portal

GET
/api/v1/portal/{slug}/brands/{brand}
curl --request GET \
--url http://localhost:3000/api/v1/portal/example/brands/example

The rules of one of the portal’s brands as its latest publish has them, read-only, behind the same door as the portal (see GET /api/v1/portal/{slug}); a brand never published is a 404. A rule’s assets are listed only when they may be used, and load from /a/{id} with the signature in signed; images in a rule’s text come signed. updatedAt is when it was published.

No key needed.

slug
required
string

The portal’s address

brand
required
string

One of its brands, by slug

context
string

Resolve for one context, e.g. dark-background

The guidelines

Media typeapplication/json
object
brand
required
object
slug
required
string
name
required
string
version
required
Any of:
object
number
required
integer
>= -9007199254740991 <= 9007199254740991
publishedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
data
required

Its rules in page order; a rule’s assets only when they may be used

Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
brand
required

The brand’s slug

string
key
required

Dotted, e.g. color.primary

string
label
required

The heading readers see; null: the key, in words

string | null
context
required

Null: the default

string | null
type
required
string
Allowed values: color text number list font
value
required
Any of:
string
spec
required
Any of:
object
key
additional properties
usage
required
string | null
assets
required

Assets it points at, in order: /a/{id}, or /a/{id}/{rendition} when it names one

Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
rendition
required
string | null
title
required
string | null
filename
required
string
mime
required
string
width
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
height
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
contexts
required

Contexts some rule is scoped to, for ?context=

Array<string>
signed
required

Each listed asset’s signature: /a/{id}/{rendition}?s={it} loads it for the visitor

object
key
additional properties
string
Example
{
"data": [
{
"type": "color"
}
]
}

Not in yet: how to get in

Media typeapplication/json
object
error
required
object
code
required
string
Allowed value: password
message
required
string
detail
required
object
name
required
string
access
required
string
Allowed values: password members
theme
required
object
logo
required

A URL on this host: the portal’s, else its first brand’s mark, else its organization’s

string | null
accent
required

The portal’s, else its first brand’s color, else its organization’s

string | null
background
required
string | null
icon
required

The organization’s, for the browser tab

string | null
product
required

What the organization calls the product

string
Example
{
"error": {
"code": "password",
"detail": {
"access": "password"
}
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}