curl -X POST "https://api.scanova.io/page-template/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"name": "My Landing Page",
"description": "A custom page.",
"blocks_json": [{ "type": "hero" }],
"theme": 7,
"accent_color": "#0077be",
"preview_bg": "#f0f8ff"
}'
{
"id": 9,
"name": "My Landing Page",
"slug": "user-42-my-landing-page-d4e5f6",
"description": "A custom page.",
"category": null,
"theme": {
"id": 7,
"name": "Ocean Breeze",
"slug": "user-42-ocean-breeze-a1b2c3",
"description": "A cool blue palette.",
"config_json": { "color": { "accent": "#0077be", "background": "#f0f8ff" } },
"schema_version": 2,
"category_hints": ["website-url"],
"thumbnail_url": "https://cdn.scanova.io/themes/7/thumb.png",
"is_system": false,
"is_premium": false,
"order": 0
},
"blocks_json": [{ "type": "hero" }],
"filter_tags": [],
"accent_color": "#0077be",
"preview_bg": "#f0f8ff",
"thumbnail_url": null,
"is_premium": false,
"is_system": false,
"is_favourited": false,
"order": 0
}
السمات وقوالب الصفحات
إنشاء قالب صفحة
POST /page-template/
POST
/
page-template
/
curl -X POST "https://api.scanova.io/page-template/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"name": "My Landing Page",
"description": "A custom page.",
"blocks_json": [{ "type": "hero" }],
"theme": 7,
"accent_color": "#0077be",
"preview_bg": "#f0f8ff"
}'
{
"id": 9,
"name": "My Landing Page",
"slug": "user-42-my-landing-page-d4e5f6",
"description": "A custom page.",
"category": null,
"theme": {
"id": 7,
"name": "Ocean Breeze",
"slug": "user-42-ocean-breeze-a1b2c3",
"description": "A cool blue palette.",
"config_json": { "color": { "accent": "#0077be", "background": "#f0f8ff" } },
"schema_version": 2,
"category_hints": ["website-url"],
"thumbnail_url": "https://cdn.scanova.io/themes/7/thumb.png",
"is_system": false,
"is_premium": false,
"order": 0
},
"blocks_json": [{ "type": "hero" }],
"filter_tags": [],
"accent_color": "#0077be",
"preview_bg": "#f0f8ff",
"thumbnail_url": null,
"is_premium": false,
"is_system": false,
"is_favourited": false,
"order": 0
}
يحفظ قالب صفحة جديدًا، على مضيف Management API (
يُنشَأ
api.scanova.io)، مع المصادقة باستخدام مفتاح Management API الخام الخاص بك.
POST https://api.scanova.io/page-template/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
string
مطلوب
اسم القالب. تُرفَض الأسماء الفارغة أو التي تحتوي على مسافات فقط.
string
وصف القالب.
array
مطلوب
محتوى الصفحة على شكل كتل — إما قائمة من الكتل، أو قاموس يحتوي على مفتاح
pages. أي شكل آخر يُرفَض.integer
معرّف سمة لربطها بهذا القالب. إذا لم تكن السمة سمة نظامية، فيجب أن تكون مملوكة لك.
string
لون التمييز، يُستخدم كقيمة احتياطية عندما لا تحل السمة المرتبطة قيمة لحظيًا.
string
لون خلفية المعاينة، بنفس دور الاحتياط الخاص بـ
accent_color.curl -X POST "https://api.scanova.io/page-template/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a" \
-H "Content-Type: application/json" \
-d '{
"name": "My Landing Page",
"description": "A custom page.",
"blocks_json": [{ "type": "hero" }],
"theme": 7,
"accent_color": "#0077be",
"preview_bg": "#f0f8ff"
}'
{
"id": 9,
"name": "My Landing Page",
"slug": "user-42-my-landing-page-d4e5f6",
"description": "A custom page.",
"category": null,
"theme": {
"id": 7,
"name": "Ocean Breeze",
"slug": "user-42-ocean-breeze-a1b2c3",
"description": "A cool blue palette.",
"config_json": { "color": { "accent": "#0077be", "background": "#f0f8ff" } },
"schema_version": 2,
"category_hints": ["website-url"],
"thumbnail_url": "https://cdn.scanova.io/themes/7/thumb.png",
"is_system": false,
"is_premium": false,
"order": 0
},
"blocks_json": [{ "type": "hero" }],
"filter_tags": [],
"accent_color": "#0077be",
"preview_bg": "#f0f8ff",
"thumbnail_url": null,
"is_premium": false,
"is_system": false,
"is_favourited": false,
"order": 0
}
slug من قِبل الخادم. تُنشَأ صورة مصغّرة بشكل غير متزامن بعد الإنشاء — تبدأ thumbnail_url بقيمة null وتُعبَّأ بمجرد اكتمال ذلك.
يُعاد 400 إذا كانت name فارغة، أو كان blocks_json مُشوَّهًا، أو كانت theme ليست سمة نظامية ولا تنتمي إليك.
ذات صلة
- سرد قوالب الصفحات — الاطلاع على القوالب المحفوظة (
?mine=true). - تحديث قالب صفحة — تعديل قالب موجود.
- إنشاء سمة — إنشاء سمة لربطها عبر
theme. - نظرة عامة على 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.
الاستجابة
Template created.
هل كانت هذه الصفحة مفيدة؟