Skip to content

Brand rules

GET
/api/v1/brand/rules
curl --request GET \
--url http://localhost:3000/api/v1/brand/rules \
--header 'Authorization: Bearer <token>'

The canon, as structured records: color.primary, logo.neverDo, type.scale. Without context, every rule and its context variants. With one, one rule per key: the context’s own where it has one, the default otherwise.

Scope: read.

brand
string

A brand’s slug; the default brand when left out

context
string

A slug, e.g. instagram-story or dark-background

asset
string format: uuid

Only the rules that point at this asset

version
string

Live: the release readers see, with only the files that may leave the team; a number: that release. The draft without it

Rules, and the contexts in use

Media typeapplication/json
object
data
required
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

Every context some rule is scoped to

Array<string>
release
Any of:
object
number
required
integer
>= -9007199254740991 <= 9007199254740991
publishedAt
required
string
Example
{
"data": [
{
"type": "color"
}
]
}

An error

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