curl -X PATCH "https://api.scanova.io/theme/user-42-ocean-breeze-a1b2c3/update/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"config_json": { "color": { "accent": "#005f99" } },
"clear_conflicting_overrides": true
}'
{
"id": 7,
"name": "Ocean Breeze",
"slug": "user-42-ocean-breeze-a1b2c3",
"description": "A cool blue palette.",
"config_json": { "color": { "accent": "#005f99", "background": "#f0f8ff" }, "font": { "heading": "Inter" } },
"schema_version": 2,
"category_hints": ["website-url", "vcard"],
"thumbnail_url": "https://cdn.scanova.io/themes/7/thumb.png",
"is_system": false,
"is_premium": false,
"order": 0
}
Thèmes et modèles de page
Mettre à jour un thème
PATCH /theme//update/
PATCH
/
theme
/
{slug}
/
update
/
curl -X PATCH "https://api.scanova.io/theme/user-42-ocean-breeze-a1b2c3/update/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"config_json": { "color": { "accent": "#005f99" } },
"clear_conflicting_overrides": true
}'
{
"id": 7,
"name": "Ocean Breeze",
"slug": "user-42-ocean-breeze-a1b2c3",
"description": "A cool blue palette.",
"config_json": { "color": { "accent": "#005f99", "background": "#f0f8ff" }, "font": { "heading": "Inter" } },
"schema_version": 2,
"category_hints": ["website-url", "vcard"],
"thumbnail_url": "https://cdn.scanova.io/themes/7/thumb.png",
"is_system": false,
"is_premium": false,
"order": 0
}
Met à jour un thème appartenant à ce compte, sur l’hôte de l’API de gestion (
Seul
api.scanova.io), authentifié avec votre clé d’API de gestion brute.
PATCH https://api.scanova.io/theme/{slug}/update/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
string
requis
Le
slug du thème.string
Nouveau nom du thème.
object
Nouveaux jetons de design, suivant le schéma ThemeConfigV2.
boolean
Si
true, retire les theme_overrides par QR qui entrent en conflit avec les champs que vous modifiez, de chaque code QR utilisant actuellement ce thème — afin qu’une modification ici ne laisse pas de substitutions par QR obsolètes le masquant.curl -X PATCH "https://api.scanova.io/theme/user-42-ocean-breeze-a1b2c3/update/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"config_json": { "color": { "accent": "#005f99" } },
"clear_conflicting_overrides": true
}'
{
"id": 7,
"name": "Ocean Breeze",
"slug": "user-42-ocean-breeze-a1b2c3",
"description": "A cool blue palette.",
"config_json": { "color": { "accent": "#005f99", "background": "#f0f8ff" }, "font": { "heading": "Inter" } },
"schema_version": 2,
"category_hints": ["website-url", "vcard"],
"thumbnail_url": "https://cdn.scanova.io/themes/7/thumb.png",
"is_system": false,
"is_premium": false,
"order": 0
}
PATCH est pris en charge (pas de PUT). Seuls vos propres thèmes non-système sont modifiables ici — un thème système ou celui d’un autre compte renvoie 404, comme s’il n’existait pas, même si Récupérer un thème peut le lire. 400 si config_json échoue à la validation du schéma.
Voir aussi
- Récupérer un thème — consulter avant de mettre à jour.
- Obtenir les statistiques d’utilisation d’un thème — vérifier ce qui utilise ce thème avant de le modifier.
- Présentation de l’API de gestion — le schéma d’authentification et les règles de quota applicables à cet endpoint.
Autorisations
Send your Management API key as the raw value of the Authorization header — no "Bearer " or "Token " prefix, and no other characters. Example: Authorization: 401f7ac837da42b97f613d789819ff93537bee6a. A header containing more than one space-separated part is rejected outright. Requests also require the request's Host header to be the management API host (e.g. api.scanova.io) — the same key sent to the regular API host will not authenticate.
Paramètres de chemin
Réponse
Theme updated.
Cette page vous a-t-elle été utile ?