Document Interface
The AnqiCMS document API supports the following interfaces: import document interface, get document list interface, get document details interface, get previous document interface, get next document interface, get document parameter filtering conditions interface, get document parameters interface
-
to get the document list interface
Retrieve the document list with specified conditions in the system, supporting various filtering and sorting methods, and can obtain the document list under specified models, categories, recommended attributes, and other conditions.This interface is applicable to the content of documents and product types. Notes The interface supports various types of data retrieval (page, list, related), and the effect of different parameters may vary when type=“When using "page"}, it supports pagination and search functions, supports custom filtering parameters, and can be filtered according to the fields configured in the model. Some fields such as price -
Interface to Get Product/Document Details
Retrieve detailed information of a single document in the AnQiCMS system, including basic document information, classification information, content details, and other custom field information.This interface is applicable to content of document and product types. Notes The interface supports retrieval of document details through document ID or URL alias (filename). You can get the previous and next documents through this interface. Some fields such as price, inventory, and SKU are only valid in product type documents. The response includes SEO-related fields for SEO optimization. If the document does not exist -
Get Previous Document Interface
Retrieve information about the previous document of a specified document, usually used for the previous and next navigation function on the document detail page.If the specified document is the first document, an empty result is returned.Note: The interface searches for the previous document in the order of document ID. When the specified document is the first document, the returned data is null. Only the basic information of the document is returned, not the detailed content of the document. The interface will return the previous document in the same category. Request address {domain address}/api/archive/prev Note: {domain address} needs to be replaced with your domain address, such as -
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.Attention事项 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 the basic information of the document is returned, not the detailed content of the document The interface will return the next document in the same category Request address {domain address}/api/archive/next Note: {domain address} needs to be replaced with your domain address -
Get document parameter filtering conditions interface
Retrieve the document parameter filtering conditions for a specified model, return the fields and options available for filtering in the model, suitable for building the front-end interface of the document filtering function. Notes The interface requires specifying the model ID to retrieve the filtering conditions for the corresponding model The returned filtering conditions are based on the field types set in the model The filter options include total counts to help users understand the number of documents under each option The request address {domain address}/api/archive/filters Instructions: {domain address} needs to be replaced with your domain address, such as https://www -
Get Document Parameters Interface
Retrieve custom parameter information for a specified document, supporting return in two formats: sorted array or unordered map object, used to obtain additional field information set in the document model. Notes: The interface supports obtaining parameters for a specific document through document ID. The return format is controlled by the sorted parameter: array format or object format. Parameter values separated by newline characters indicate that the field is of multi-select type. Request address {domain address}/api/archive/params Description: {domain address} needs to be replaced with your domain address, such as -
Document publication interface
API call address {domain address}/api/archive/publish Note: {domain address} needs to be replaced with your domain address, such as /api/archive/publish Call method POST application/ Request parameters Field name Type Required Description title string Yes Document title cont -
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 permission for paid documents. Notes: This interface requires the user to be logged in; otherwise, it will return an unlogged error. It is 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. If a non-logged-in user calls this interface, it will return error code 1001. Request address {domain address}/api/archive/order/check Note: {domain address} needs to be replaced with your domain address, such as https -
Verify document password interface
Verify if the password to access the password-protected document is correct, used to protect the document content that requires password access.After verification, return the document content, or return an error message if verification fails.Attention: This interface uses the POST method to submit a verification request. The interface requires the document ID and password to be provided for verification. If the verification is successful, the document content will be returned, and if the verification fails, an error message will be returned. It is only applicable to documents that have password protection. Request address {domain address}/api/archive/password/check Note: {domain address} -
Get favorite list interface
Retrieve the current user's favorite list, supporting pagination queries, and returning all products or document information favorited by the user. Notes: This interface uses the GET method, and parameters are passed through the URL query string. Supports pagination queries, allowing specification of the current page number and the number of items per page. Only returns the current user's favorite records. Returns complete document information, including title, description, images, and other detailed content. Supports retrieving the price and inventory information of favorited products. Request address {domain address}/api/favorite/list Note: {domain address} needs to be replaced with your domain address -
Add favorite interface
Add the specified product to the user's favorite list, supporting the specification of product SKU, suitable for the collection operation in e-commerce functions. Notes This interface uses the POST method, requires data to be submitted in application/ format, requires user login to operate, must specify product ID, can specify specific product specifications through SKU ID, if the product has already been collected, it will return the corresponding prompt information, request address {domain address}/api/favorite/add Description: {domain address} -
Remove favorite interface
Remove the favorite record of a specified product or document, supporting the deletion of specific items from the user's favorite list. Notes: This interface uses the POST method and requires data to be submitted in application/ format. The document ID must be provided to specify the favorite item to be removed. Only logged-in users can remove their own favorite records. If the specified document is not favorited, a successful status is returned. After successful removal, it will no longer appear in the user's favorite list. Request URL {domain address}/api/favorite/delete Description: {domain address} -
Check if Favorited Interface
Check if a specified product or document has been favorited by the current user, supporting single or batch query of favorite status. Notes The interface uses the POST method, requires data to be submitted in application/ format, and needs to provide document ID or an array of document IDs. Only logged-in users can query their own favorite status. Supports single document query and batch query. The returned favorite records include detailed information such as favorite time. Request address {domain address}/api/favorite/check Notes: {domain address} -
Product SKU Retrieval Interface
Get the product SKU (stock keeping unit) information for the specified product, including product specifications, price, inventory, wholesale rules, and other detailed information.This API is suitable for scenarios that require displaying product specifications and purchase options.