Get Next Document Interface

Retrieve the next document information for a specified document, usually used for the previous and next navigation function on the document detail page. If the specified document is the last document, an empty result is returned.

Points to note

  • The interface searches for the next document in order of document ID
  • When the specified document is the last document, the returned data is null
  • Only return the basic information of the document, do not include the detailed content of the document
  • The interface will return the next document in the same category

Request address

{域名地址}/api/archive/next

Description:{域名地址}Replace it with your domain name, such ashttps://en.anqicms.com/api/archive/next

Request Syntax

GET {域名地址}/api/archive/next?{参数}

Request Headers

This interface involves only public request headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Request parameters

Field name Type Required Description
id int Is Document ID

Response header

This interface only involves common response headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Return parameters

Field name Type Description
code int Error code
msg string Error description
data object result content

data parameter

Field name Type Description
id int Document ID
Title string Document title
seo title string Document SEO Title
URL Token string Document URL Alias
keywords string Document keyword
description string Document Introduction
module_id int Document Model ID
category_id int Document Category ID
Views int Document Views
Comment Count int Document Comment Volume
Images string array document group chart
Logo string document logo
thumbnail string document thumbnail
flag string Document recommendation attribute, headline [h] recommendation [c] slide [f] featured [a] scroll [s] bold [h] image [p] jump [j]
canonical_url string canonical URL
fixed link string document fixed link
created_time int document publish timestamp
updated_time int document update timestamp
status int document display status
user_id int user ID
price int price, in cents
stock int inventory quantity
user_id int user ID

Usage Example

Request example

GET /api/archive/next?id=3 HTTP/1.1
Host: your-domain.com
Content-Type: application/json

Response Example

{
    "code": 0,
    "data": {
        "id": 3,
        "created_time": 1607308858,
        "updated_time": 1611373923,
        "title": "AnqiCMS使用帮助",
        "seo_title": "",
        "url_token": "help",
        "keywords": "",
        "description": "AnqiCMS使用帮助",
        "module_id": 1,
        "category_id": 1,
        "views": 1256,
        "comment_count": 0,
        "images": null,
        "template": "",
        "status": 1,
        "canonical_url": "",
        "fixed_link": "",
        "flag": "",
        "user_id": 0,
        "price": 0,
        "stock": 9999999,
        "logo": "https://en.anqicms.com/uploads/20225/27/5cd9e65be13cbe6b.webp",
        "thumb": "https://en.anqicms.com/uploads/20225/27/5cd9e65be13cbe6b.webp",
        "link": "https://en.anqicms.com/help"
    },
    "msg": ""
}

When the current document is the last document:

{
    "code": 0,
    "data": null,
    "msg": ""
}

error code

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