Blog Collection Create API 文档

博客专辑-创建

接口信息

  • 接口地址: {your-site-url}/api/skill/blog-collection/create
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: POST
  • Content-Type: application/json
  • 说明: 此接口用于创建博客专辑

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数 (Body - JSON)

字段 类型 必填 说明
title string ✅ 必填 专辑标题
body_html string 选填 专辑描述(HTML)
handle string 选填 专辑 URL handle。如果与已有 handle 冲突,会自动追加随机后缀
meta_title string 选填 SEO 标题。非独立编辑模式下从 title 取值即可
meta_keywords string 选填 SEO 关键字
meta_description string 选填 SEO 描述。非独立编辑模式下从 body_html 取值即可
meta_is_edit int 选填 SEO 是否独立编辑。1 非独立编辑,2 独立编辑
translate_type int 选填 翻译方式。1 强制翻译,2 只翻译多语言为空的部分,3 不翻译
template_type string 选填 Mirox 模板布局样式(通过 get-template-types 接口获取,page_type=blog_collection
remote_id string 选填 远程 ID,一般用于数据同步

请求示例

cURL

curl --location --request POST '{your-site-url}/api/skill/blog-collection/create' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "title": "blog article title",
    "handle": "blog-article-title",
    "body_html": "blog article description",
    "meta_is_edit": "2",
    "meta_title": "blog article title",
    "meta_keywords": "blog article",
    "meta_description": "blog article description",
    "translate_type": 3,
    "template_type": "blog_collection"
}'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": {
        "id": 127,
        "shop_id": 15,
        "handle": "blog-article-title-h16h98yz",
        "title": "blog article title",
        "body_html": "blog article description",
        "meta_is_edit": "2",
        "meta_title": "blog article title",
        "meta_keywords": "blog article",
        "meta_description": "blog article description",
        "translate_type": 3,
        "template_type": "blog_collection",
        "created_at": "2026-05-11 21:30:33",
        "updated_at": "2026-05-11 21:30:33"
    },
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data.id int 创建的专辑 ID
data.shop_id int 店铺 ID
data.handle string 专辑 URL handle(若冲突自动追加随机后缀)
data.title string 专辑标题
data.body_html string 专辑描述
data.meta_title string SEO 标题
data.meta_keywords string SEO 关键字
data.meta_description string SEO 描述
data.meta_is_edit int/string SEO 是否独立编辑
data.translate_type int 翻译方式
data.template_type string Mirox 模板布局样式
data.created_at string 创建时间
data.updated_at string 更新时间

注意事项

  1. title 为必填
  2. handle 如果不传系统自动生成;冲突时追加随机后缀
  3. template_type 的可选值可通过 get-template-types 接口获取(page_type=blog_collection
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-05-11 21:33:07

results matching ""

    No results matching ""