Overview / Kiosk / Edit the draft

Edit the draft

patch https://api.flactrum.com/v1/kiosk/themes/{theme}

Changes the draft only; kiosks are unaffected until you publish.

Required scope kiosk.write
Success status200

Parameters

NameInTypeDescription
theme * path string ULID of the record.

Request body

FieldTypeDescription
palette string —
colors object Only the roles you send change.
splash_image string|null Pick a ready-made splash background, or null to remove it. Upload your own through /splash-image.
splash_overlay integer —
texts object Only the keys and languages you send change. An empty string removes that text (the app falls back to its own wording). Brand texts are listed in meta.texts of the list endpoint; every kiosk UI text (buttons, cart, payment…) can be translated too, keys and built-in wording in meta.ui_texts. UI translations must keep the placeholders of the original ({n}, {total}…).
languages array Brand theme only. Languages the kiosk offers, the first is the default; with two or more the kiosk shows a language screen. Codes from meta.language_options. An empty list falls back to the brand content languages.

Examples

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

curl -X PATCH 'https://api.flactrum.com/v1/kiosk/themes/01m43myg05p7d706k405jdxc3f' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "palette": "espresso",
    "colors": {
        "primary": "#123456"
    }
}'

HTTP 200 · application/json

{
    "data": {
        "id": "01m43myg05p7d706k405jdxc3f",
        "branch_id": null,
        "version": 0,
        "published_at": null,
        "has_unpublished_changes": true,
        "draft": {
            "colors": {
                "background": "#F6F1EA",
                "surface": "#FFFFFF",
                "primary": "#123456",
                "on_primary": "#FFFFFF",
                "text": "#2A1D15",
                "text_muted": "#6B5A4E",
                "price": "#8A4B1F",
                "accent": "#A0522D",
                "splash_background": "#2A1D15"
            },
            "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": 12.72,
                "minimum": 4.5,
                "passes": true
            },
            {
                "check": "text_on_background",
                "foreground": "text",
                "background": "background",
                "ratio": 14.54,
                "minimum": 4.5,
                "passes": true
            },
            {
                "check": "text_on_surface",
                "foreground": "text",
                "background": "surface",
                "ratio": 16.34,
                "minimum": 4.5,
                "passes": true
            },
            {
                "check": "muted_on_surface",
                "foreground": "text_muted",
                "background": "surface",
                "ratio": 6.57,
                "minimum": 4.5,
                "passes": true
            },
            {
                "check": "price_on_surface",
                "foreground": "price",
                "background": "surface",
                "ratio": 6.76,
                "minimum": 3,
                "passes": true
            },
            {
                "check": "accent_on_background",
                "foreground": "accent",
                "background": "background",
                "ratio": 5,
                "minimum": 3,
                "passes": true
            }
        ]
    }
}