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 status | 200 |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| theme * | path | string | ULID of the record. |
Request body
| Field | Type | Description |
|---|---|---|
| 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
}
]
}
}
curl -X PATCH 'https://api.flactrum.com/v1/kiosk/themes/01m43mygcvhy8vqsqnk1v9h97g' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"colors": {
"primary": "mor",
"shadow": "#000000"
}
}'
HTTP 422 · application/json
{
"error": {
"code": "validation_failed",
"message": "The submitted data is invalid.",
"details": {
"fields": {
"colors.primary": [
"Must be a hex colour such as #6A34E0."
],
"colors.shadow": [
"Unknown colour role. Allowed: background, surface, primary, on_primary, text, text_muted, price, accent, splash_background."
]
}
}
}
}