Get Category Details Interface

API Call Address

{域名地址}/api/category/detail

Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/category/detail

Calling method

GET

Request parameters

Field name Type Required Description
id int Yes Category ID, if filename is passed, ID is not required
filename string No Category URL alias, either category ID or filename
catname string No Category URL alias, same as filename

Return parameters

Field name Type Description
code int error code
msg string error reason description
data object result content
data parameter
Field name Type Description
id int Category ID
parent_id int Category parent ID
title string Category name
seo_title string Category SEO title
url_token string Category URL alias
Keywords string Category Keywords
Description string Category description
module_id int Model ID
content string Category content details
type int Category Attributes, 1 Category, 3 Single Page
Sort int Category Sorting Value
images string[] Category Banner Image
Logo string Category Thumbnail
Thumb string Category Thumbnail
Created Time int Category Publish Timestamp
updated_time int Category update timestamp
status int Category display status

request data example

Parameter Value
id 1

Return Data Example

{
  "code": 0,
  "data": {
    "id": 1,
    "created_time": 1607308159,
    "updated_time": 1657761249,
    "title": "AnqiCMS使用帮助",
    "seo_title": "",
    "keywords": "",
    "url_token": "help",
    "description": "",
    "content": "<p><br/></p>",
    "module_id": 1,
    "parent_id": 0,
    "type": 1,
    "sort": 1,
    "images": [],
    "logo": "",
    "status": 1,
    "thumb": "https://en.anqicms.com/uploads/202012/7/bd36c37ef742c7be.webp"
  },
  "msg": ""
}

Error Code

error code Description
0 OK
-1 Error, the reason is indicated in the msg
1001 Not logged in
1002 Unauthorized
200 API request OK