为集合创建博客文章
POST https://{handle}.myshopline.com/admin/openapi/v20260301/store/blogs/:blog_collection_id/articles.json
handle :店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handle 是 open001 。指定博客集合创建博客(支持指定handle和url)
路径参数
- blog_collection_id string required博客集合id
请求头
- Content-Type string required字段值固定为
application/json; charset=utf-8。 - Authorization string required资源的访问令牌。参考 应用授权 获取访问令牌,然后将获取到的访问令牌以 Bearer 格式传入。例子:
Bearer eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiJmMjM3OWQyMTYyOGMzM2QxMWRiMWZkYjY5N2EzZjdjMjZlNGMwYTA5Iiwic2VsbGVySWQiOiIyMDAwMjM0ODgwIiwic3RvcmVJZCI6IjE2NzIzNjk3Mjk2MDYiLCJ2ZXJzaW9uIjoiVjIiLCJkb21haW4iOiJodHRwczovL3NsLW9wZW4tc2cubXlzaG9wbGluZS5jb20iLCJ0aW1lc3RhbXAiOjE2NzUzMTk0OTI0MzksImlzcyI6Inlzb3VsIiwiZXhwIjoxNzY5OTI3NDkyfQ.UwQzomM2veGCUaOZ0paUxq5dpc7DXuhHYFvsQ_uIAKduzWcb_j2E4q_36El83sp145D4cKbpcE5KCeeIz-JNQw
请求体
blogobject
博客信息handle string required博客的handle例子:"create-handle"published_at string发布时间 ISO 8601例子:"2024-06-25T11:15:47+08:00"title string required博客的标题例子:"70626title"url string自定义路由,最大512字符,eg:"/custom-url"例子:"/custom-url"author string博客的作者例子:"Alvin"imageobject
博客的封面信息src string图片链接例子:"https://img-preview-va.myshopline.com/image/store/3400001642/1624538086300/30e35c9beb4e4be5b3ef336954dcdc14.jpg?w=626&h=417"alt string图片alt例子:"21933Alt"digest string博客的摘要例子:"28086digest"published boolean是否发布,可选值:true(发布);false(不发布)例子:truetemplate_name string关联的模板名称例子:"templates/blogs/detail.a2c29192484301fa.json"content_html string博客正文的文本,带有 HTML 标记,限制5M例子:"content of the blog"
状态码
- 200
- 401
- 429
更多状态码信息,参考 HTTP 状态码。
响应头
traceId
请求的全局唯一标识符。用于追踪请求在系统中的流转,以便于问题发生时进行定位和调试。
响应体
blogobject
博客信息handle string博客的handle例子:"create-handle"author string博客的作者例子:"Alvin"id string博客的id例子:"66718d010588d64ef7d15c96"imageobject
博客的封面信息alt string图片alt例子:"21933Alt"src string图片链接例子:"https://img-preview-va.myshopline.com/image/store/3400001642/1624538086300/30e35c9beb4e4be5b3ef336954dcdc14.jpg?w=626&h=417"updated_at string更新时间 ISO 8601例子:"2024-06-19T12:42:55+00:00"blog_collection_id string博客集合的id例子:"64e313c4cd5956279e61d150"content_html string博客正文的文本,带有 HTML 标记例子:"content of the blog"published_at string发布时间 ISO 8601例子:"2024-06-25T11:15:47+08:00"title string博客标题例子:"70626title"created_at string创建时间 ISO 8601例子:"2024-06-18T13:34:57+00:00"digest string博客的摘要例子:"28086digest"
API Explorer
调试台
这篇文章对你有帮助吗?