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 /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
}
يحدّث سمة مملوكة لهذا الحساب، على مضيف Management API (
يُدعَم
api.scanova.io)، مع المصادقة باستخدام مفتاح Management API الخام الخاص بك.
PATCH https://api.scanova.io/theme/{slug}/update/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
string
مطلوب
سمة (slug) الخاصة بالسمة.
string
اسم السمة الجديد.
object
رموز تصميم جديدة، وفق مخطط ThemeConfigV2.
boolean
عند ضبطها على
true، تُزال تجاوزات theme_overrides الخاصة بكل رمز QR التي تتعارض مع الحقول التي تغيّرها من كل رمز QR يستخدم هذه السمة حاليًا — بحيث لا يترك التعديل هنا تجاوزات قديمة خاصة برموز QR تحجبه.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 فقط (بدون PUT). سماتك الخاصة غير النظامية فقط قابلة للكتابة هنا — أي سمة نظامية أو سمة حساب آخر تعيد 404، تمامًا كما لو لم تكن موجودة، رغم أن الحصول على سمة يمكنه قراءتها. يُعاد 400 إذا فشل config_json في التحقق من المخطط.
ذات صلة
- الحصول على سمة — الاطلاع عليها قبل التحديث.
- الحصول على أعداد استخدام سمة — التحقق مما يستخدم هذه السمة قبل تعديلها.
- نظرة عامة على Management API — مخطط المصادقة وقواعد الحصة المطبّقة على نقطة النهاية هذه.
التفويضات
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.
معلمات المسار
الاستجابة
Theme updated.
هل كانت هذه الصفحة مفيدة؟