博客文章保存

Api描述:商家端,对博客文章进行保存

URL: /manager/api/apps/blog/article/save

格式:json

方式:post

数据请求部分

1.Request Header 参数:

参数名称 是否必须 类型 描述
open-access-token 必须 String 在开放api插件中,创建权限后即可获取该token

2.Request JSON Data(Body):

参数名称 是否必须 类型 描述
id 选填 int id,创建文章不填写,更新文章必须填写
author 选填 string 文章作者名字
handle 选填 string url handle
title 选填 string 标题
summary_html 选填 string 简短描述
body_html 选填 string 文章内容描述
meta_is_edit 选填 int 1代表非独立编辑,2代表独立编辑
meta_title 选填 string meta title
meta_keywords 选填 string meta keywords
meta_description 选填 string meta description
translate_type 选填 int 1.代表强制翻译,2代表只翻译多语言为空的部分,3不翻译
image 选填 string 图片
is_published 选填 int 是否发布?1已发布,2未发布
published_at 选填 string 发布时间,可自定义
collection_ids 选填 array[int] 专辑id数组,collection选择器使用此api:所有专辑-Select列表 获取

示例数据:

{
    "author":  "terry3",
    "handle":  "handle terr3y",
    "title":  "title terry3",
    "summary_html":  "summary_html terry",
    "body_html":  "body_html terry",
    "meta_is_edit":  1,
    "meta_title":  "meta_title terry",
    "meta_keywords":  "meta_keywords terry",
    "meta_description":  "meta_description terry",
    "translate_type": 1,
    "image":  "/common/15/image/2022/10/16/293e3ac3f4cc6569a1664a98dbdba38a.webp",
    "is_published":  1,
    "published_at":"2022-07-01 02:02:04",
    "collection_ids":  [7,8]

}

数据返回部分

1.Response JSON Data(Body):

格式:json

参数名称 是否必须 类型 描述
code 必须 Number 200 代表成功
message 必须 String 执行结果的文字描述信息
data 必须 Array api获取的数据保存到data中

Response JSON Data(示例数据):

{
    "code": 200,
    "data": {
        "shop_id": 15,
        "author": "terry3",
        "handle": "handle-terr3y-97zyt5",
        "title": "title terry3",
        "summary_html": "summary_html terry",
        "body_html": "body_html terry",
        "meta_title": "meta_title terry",
        "meta_keywords": "meta_keywords terry",
        "meta_description": "meta_description terry",
        "meta_is_edit": 1,
        "image": "/common/15/image/2022/10/16/293e3ac3f4cc6569a1664a98dbdba38a.webp",
        "is_published": 1,
        "published_at": "2022-07-01 02:02:04",
        "translate_type": 1,
        "user_id": 0,
        "created_at": "2023-02-08 18:14:50",
        "updated_at": "2023-02-08 18:14:50",
        "id": 20
    },
    "message": "success"
}
Copyright © fecify.com 2022 all right reserved,powered by Gitbook该文件修订时间: 2023-02-08 18:15:54

results matching ""

    No results matching ""