---
title: "查询博客文章详情"
description: "查询博客详情(返回自定义路由)"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/blog-post/query-blog-post-details'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/blog-post/query-blog-post-details.md'
---
# 查询博客文章详情

查询博客详情(返回自定义路由)

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `read_content`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /store/blogs/:blog_collection_id/articles/:blog_id.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Required Permissions

* `read_content`

## Request

### Path Parameters

* `blog_id`

  string (required)

  博客的id

* `blog_collection_id`

  string (required)

  博客集合的id

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

* `blog`

  object

  博客信息

  * `id`

    string

    博客的id

  * `published_at`

    string

    发布时间 ISO 8601

  * `updated_at`

    string

    更新时间 ISO 8601

  * `author`

    string

    博客的作者

  * `content_html`

    string

    博客正文的文本，带有 HTML 标记

  * `custom_url`

    object

    店面上产品的自定义URL

    * `is_customized`

      boolean

      是否自定义

    * `url`

      string

      店面上的产品URL,大于等于0个字符，小于等于512个字符

  * `handle`

    string

    博客的handle

  * `image`

    object

    博客的封面信息

    * `alt`

      string

      图片alt

    * `src`

      string

      图片链接

  * `template_name`

    string

    关联的模板名称

  * `title`

    string

    博客标题

  * `user_id`

    string

    操作人的id

  * `blog_collection_id`

    string

    博客集合的id

  * `created_at`

    string

    创建时间 ISO 8601

  * `digest`

    string

    博客的摘要


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "tags": [
    "查询博客文章详情"
  ],
  "description": "查询博客详情(返回自定义路由)",
  "externalDocs": {
    "description": "接口使用的权限点: `read_content` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": "| Error Code | HTTP Status Code | Error Description |\n|------------|------------------|-------------------|\n| DATA_NOT_EXIST | 404 | The requested data does not exist. |\n| INTERNAL_ERROR | 500 | An internal error occured. |\n| SUCCESS | 200 | request success |\n"
  },
  "operationId": "7DoRPDul",
  "parameters": [
    {
      "name": "blog_id",
      "in": "path",
      "description": "博客的id",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "blog_id",
        "description": "博客的id",
        "type": "string",
        "example": "\"66718d010588d64ef7d15c96\""
      },
      "example": "\"66718d010588d64ef7d15c96\""
    },
    {
      "name": "blog_collection_id",
      "in": "path",
      "description": "博客集合的id",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "blog_collection_id",
        "description": "博客集合的id",
        "type": "string",
        "example": " \"64e313c4cd5956279e61d150\""
      },
      "example": " \"64e313c4cd5956279e61d150\""
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "blog": {
                "name": "blog",
                "description": "博客信息",
                "type": "object",
                "properties": {
                  "id": {
                    "name": "id",
                    "description": "博客的id",
                    "type": "string",
                    "example": "\"66718d010588d64ef7d15c96\""
                  },
                  "published_at": {
                    "name": "published_at",
                    "description": "发布时间 ISO 8601",
                    "type": "string",
                    "example": "\"2024-06-25T11:15:47+08:00\""
                  },
                  "updated_at": {
                    "name": "updated_at",
                    "description": "更新时间 ISO 8601",
                    "type": "string",
                    "example": "\"2024-06-25T11:15:47+08:00\""
                  },
                  "author": {
                    "name": "author",
                    "description": "博客的作者",
                    "type": "string",
                    "example": "\"Alvin\""
                  },
                  "content_html": {
                    "name": "content_html",
                    "description": "博客正文的文本，带有 HTML 标记",
                    "type": "string",
                    "example": "\"content of the blog\""
                  },
                  "custom_url": {
                    "name": "custom_url",
                    "description": "店面上产品的自定义URL",
                    "type": "object",
                    "properties": {
                      "is_customized": {
                        "name": "is_customized",
                        "description": "是否自定义",
                        "type": "boolean",
                        "example": true
                      },
                      "url": {
                        "name": "url",
                        "description": "店面上的产品URL,大于等于0个字符，小于等于512个字符",
                        "type": "string",
                        "example": "\"/custom-url\""
                      }
                    },
                    "example": {
                      "url": "\"/custom-url\"",
                      "is_customized": true
                    }
                  },
                  "handle": {
                    "name": "handle",
                    "description": "博客的handle",
                    "type": "string",
                    "example": "\"update-handle\""
                  },
                  "image": {
                    "name": "image",
                    "description": "博客的封面信息",
                    "type": "object",
                    "properties": {
                      "alt": {
                        "name": "alt",
                        "description": "图片alt",
                        "type": "string",
                        "example": "\"21933Alt\""
                      },
                      "src": {
                        "name": "src",
                        "description": "图片链接",
                        "type": "string",
                        "example": "\"https://img-preview-va.myshopline.com/image/store/3400001642/1624538086300/30e35c9beb4e4be5b3ef336954dcdc14.jpg?w=626&h=417\""
                      }
                    },
                    "example": {
                      "src": "\"https://img-preview-va.myshopline.com/image/store/3400001642/1624538086300/30e35c9beb4e4be5b3ef336954dcdc14.jpg?w=626&h=417\"",
                      "alt": "\"21933Alt\""
                    }
                  },
                  "template_name": {
                    "name": "template_name",
                    "description": "关联的模板名称",
                    "type": "string",
                    "example": "\"templates/blogs/detail.a2c29192484301fa.json\""
                  },
                  "title": {
                    "name": "title",
                    "description": "博客标题",
                    "type": "string",
                    "example": "\"70626title\""
                  },
                  "user_id": {
                    "name": "user_id",
                    "description": "操作人的id",
                    "type": "string",
                    "example": "\"3400001642\""
                  },
                  "blog_collection_id": {
                    "name": "blog_collection_id",
                    "description": "博客集合的id",
                    "type": "string",
                    "example": " \"64e313c4cd5956279e61d150\""
                  },
                  "created_at": {
                    "name": "created_at",
                    "description": "创建时间 ISO 8601",
                    "type": "string",
                    "example": "\"2024-06-18T13:34:57+00:00\""
                  },
                  "digest": {
                    "name": "digest",
                    "description": "博客的摘要",
                    "type": "string",
                    "example": "\"28086digest\""
                  }
                },
                "example": {
                  "author": "\"Alvin\"",
                  "content_html": "\"content of the blog\"",
                  "created_at": "\"2024-06-18T13:34:57+00:00\"",
                  "custom_url": {
                    "url": "\"/custom-url\"",
                    "is_customized": true
                  },
                  "template_name": "\"templates/blogs/detail.a2c29192484301fa.json\"",
                  "title": "\"70626title\"",
                  "updated_at": "\"2024-06-25T11:15:47+08:00\"",
                  "user_id": "\"3400001642\"",
                  "blog_collection_id": " \"64e313c4cd5956279e61d150\"",
                  "digest": "\"28086digest\"",
                  "handle": "\"update-handle\"",
                  "id": "\"66718d010588d64ef7d15c96\"",
                  "image": {
                    "alt": "\"21933Alt\"",
                    "src": "\"https://img-preview-va.myshopline.com/image/store/3400001642/1624538086300/30e35c9beb4e4be5b3ef336954dcdc14.jpg?w=626&h=417\""
                  },
                  "published_at": "\"2024-06-25T11:15:47+08:00\""
                }
              }
            },
            "example": {
              "blog": {
                "content_html": "\"content of the blog\"",
                "digest": "\"28086digest\"",
                "id": "\"66718d010588d64ef7d15c96\"",
                "image": {
                  "alt": "\"21933Alt\"",
                  "src": "\"https://img-preview-va.myshopline.com/image/store/3400001642/1624538086300/30e35c9beb4e4be5b3ef336954dcdc14.jpg?w=626&h=417\""
                },
                "title": "\"70626title\"",
                "updated_at": "\"2024-06-25T11:15:47+08:00\"",
                "user_id": "\"3400001642\"",
                "author": "\"Alvin\"",
                "blog_collection_id": " \"64e313c4cd5956279e61d150\"",
                "created_at": "\"2024-06-18T13:34:57+00:00\"",
                "custom_url": {
                  "is_customized": true,
                  "url": "\"/custom-url\""
                },
                "handle": "\"update-handle\"",
                "published_at": "\"2024-06-25T11:15:47+08:00\"",
                "template_name": "\"templates/blogs/detail.a2c29192484301fa.json\""
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/store/blogs/:blog_collection_id/articles/:blog_id.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "查询博客文章详情",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_content"
  ]
}
```