Check if the specified document has paid interface

Check if the currently logged-in user has purchased or paid for the specified document content, used to verify the user's access rights to the paid document.

Points to note

  • This interface requires the user to be logged in, otherwise it will return an unlogged error
  • Only applicable to documents that have set paid access
  • The interface returns a boolean value indicating whether the current user has paid for the document
  • An unlogged user calling this interface will return error code 1001

Request address

{域名地址}/api/archive/order/check

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

Request Syntax

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

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 boolean Did you pay?

example of data request

Parameter Value
id 1

Usage Example

Request example

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

Response Example

When the user has paid the document:

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

When the user has not paid the document:

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

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