Overview / Kiosk / Give a branch its own theme

Give a branch its own theme

post https://api.flactrum.com/v1/kiosk/themes

Starts as a copy of the brand draft. Kiosks in the branch keep the brand theme until this one is published. 409 if the branch already has one.

Required scope kiosk.write
Success status201

Request body

FieldTypeDescription
branch_id * string —

Examples

Recorded from the test suite — these are real requests and their real responses.

curl -X POST 'https://api.flactrum.com/v1/kiosk/themes' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "branch_id": "01m43myg3n59wrg6hjmcwz8sks"
}'

HTTP 201 · application/json

{
    "data": {
        "id": "01m43myg51ppsq6xk2wvpjzhg1",
        "branch_id": "01m43myg3n59wrg6hjmcwz8sks",
        "version": null,
        "published_at": null,
        "has_unpublished_changes": true,
        "draft": {
            "colors": {
                "background": "#F5F4F0",
                "surface": "#FFFFFF",
                "primary": "#6A34E0",
                "on_primary": "#FFFFFF",
                "text": "#16161E",
                "text_muted": "#5E5E68",
                "price": "#16161E",
                "accent": "#B45309",
                "splash_background": "#16161E"
            },
            "splash_logo_url": null,
            "splash_image_url": null,
            "splash_image": null,
            "splash_overlay": 45,
            "texts": []
        },
        "published": null,
        "contrast": [
            {
                "check": "button",
                "foreground": "on_primary",
                "background": "primary",
                "ratio": 6.6,
                "minimum": 4.5,
                "passes": true
            },
            {
                "check": "text_on_background",
                "foreground": "text",
                "background": "background",
                "ratio": 16.34,
                "minimum": 4.5,
                "passes": true
            },
            {
                "check": "text_on_surface",
                "foreground": "text",
                "background": "surface",
                "ratio": 17.99,
                "minimum": 4.5,
                "passes": true
            },
            {
                "check": "muted_on_surface",
                "foreground": "text_muted",
                "background": "surface",
                "ratio": 6.41,
                "minimum": 4.5,
                "passes": true
            },
            {
                "check": "price_on_surface",
                "foreground": "price",
                "background": "surface",
                "ratio": 17.99,
                "minimum": 3,
                "passes": true
            },
            {
                "check": "accent_on_background",
                "foreground": "accent",
                "background": "background",
                "ratio": 4.56,
                "minimum": 3,
                "passes": true
            }
        ]
    }
}