AnQiCMS is an open-source content management system developed based on the Go language, providing a complete API interface for developers to call.The API uses the RESTful design style and supports data interaction in JSON format.
Get started quickly: Call the first API
For example, introduce a complete API call process to obtain the list of articles.
1. Preparation
Before starting, you need to know the following information:
- API Base Path:
/api- All API requests must be prefixed with this path - Authentication Method: Some interfaces require authentication, using JWT Token for identity verification
- Request format: All interfaces except file upload use JSON format for data transmission
- response format: Use JSON format to return data uniformly
2. Construct and send requests
GET /api/archive/list?limit=10&page=1 HTTP/1.1
Host: your-domain.com
Content-Type: application/json
3. Understand the response results
- Successful responseAfter the request is successful, the server will return a 200 status code, and the response body will be in JSON format.
{
"code": 0,
"msg": "",
"total": 100,
"data": [...]
}
- Error Handling: When the request fails, the JSON response body contains an error code and error information.
{
"code": -1,
"msg": "API 接口未开放"
}
API List
Content Management Interface
| Category | API Name | description |
|---|---|---|
| Content Management | Get document details interface | Get Detailed Information of a Single Document |
| Content Management | to get the document list interface | Get document list |
| Content Management | Get Document Parameters Interface | Get document custom parameters |
| Content Management | Get previous document interface | Get previous document |
| Content Management | Get next document interface | Get next document |
| Content Management | Check document password interface | Check if the document password is correct |
| Content Management | Publish document interface | Publish new document |
| Content Management | Get document SKU interface | Get document SKU information |
| Content Management | Get Category Detail Interface | Get category details |
| Content Management | Get Category List Interface | Get category list |
| Content Management | Get Tag Detail Interface | Get tag details |
| Content Management | Get Tag List Interface | Get tag list |
| Content Management | Get Tag Document List Interface | Get document list under tag |
| Content Management | Get page detail interface | Get single page detail |
| Content Management | Get page list interface | Get single page list |
| Content Management | Get module detail interface | Get module details |
| Content Management | Get module list interface | Get module list |
| Content Management | Get Navigation List Interface | Get navigation list |
| Content Management | Get Banner list interface | Get the home page Banner list |
| Content Management | Get friend link list interface | Get the friend link list |
User management interface
| Category | API Name | description |
|---|---|---|
| User management | User login interface | User login authentication |
| User management | User registration interface | New user registration |
| User management | User logout interface | User logout |
| User management | Get user details interface | Retrieve user details |
| User management | Update user details interface | Update user information |
| User management | Interface to Update User Avatar | Update user avatar |
| User management | Reset User Password Interface | Reset user password |
| User management | Update User Password Interface | Update User Password |
| User management | Get User Group List Interface | Get User Group List |
| User management | Get user group details interface | Get User Group Details |
| User management | Get User Favorite List Interface | Get user favorite list |
| User management | Add favorite interface | Add favorite |
| User management | Check favorite status interface | Check if favorited |
| User management | Remove favorite interface | Remove favorite |
| User management | Get User Wish List Interface | Get User Wish List |
| User management | Add Wish List Interface | Add to Wish List |
| User management | Remove Wish List Interface | Remove from Wish List |
Comment Interaction Interface
| Category | API Name | description |
|---|---|---|
| Interactive Comments | Get Comment List Interface | Get Comment List |
| Interactive Comments | Post comment interface | Post Comment |
| Interactive Comments | Comment and Like Interface | Comment Liking |
Shopping Cart and Order Interface
| Category | API Name | description |
|---|---|---|
| Shopping Cart | Add shopping cart interface | Add item to shopping cart |
| Shopping Cart | Get shopping cart list interface | Get shopping cart list |
| Shopping Cart | Update shopping cart interface | Update shopping cart item quantity |
| Shopping Cart | Remove shopping cart interface | Remove item from shopping cart |
| order | Create order interface | create order |
| order | Order Details Retrieval Interface | get order details |
| order | Order List Retrieval Interface | get order list |
| order | Cancel order interface | cancel order |
| order | Order completion interface | Complete order |
| order | Order payment interface | Order payment |
| order | Application for refund interface | Apply for order refund |
| order | Publish order evaluation interface | Publish order evaluation |
| order | Get product settlement information interface | Get product settlement information |
| order | Get Order Address Interface | Get Order Address |
| order | Save Order Address Interface | Save Order Address |
| order | Get order address list interface | Get Order Address List |
Review and Coupon Interface
| Category | API Name | description |
|---|---|---|
| Review | Get Order Review Interface | Get Order Review |
| Coupon | Get coupon code interface | Get coupon code |
| Coupon | Get coupon list interface | Get coupon list |
| Coupon | Get valid coupon list interface | Get a valid coupon list |
Distribution Interface
| Category | API Name | description |
|---|---|---|
| Distribute | Get distribution staff details interface | Get distributor details |
| Distribute | Get distribution staff earnings list interface | Get distributor earnings list |
| Distribute | Get distribution team list interface | Get distribution team list |
| Distribute | Get Distributor Order Interface | Get Distributor Order |
| Distribute | Get Distributor Statistics Interface | Get Distributor Statistical Information |
| Distribute | Update Distributor Information Interface | Update Distributor Information |
| Distribute | Apply for Distributor Withdrawal Interface | Apply for Distributor Withdrawal |
| Distribute | Get Distributor Withdrawal Record Interface | Get Distributor Withdrawal Record |
System and Configuration Interface
| Category | API Name | description |
|---|---|---|
| System Configuration | Get System Settings Interface | Get System Settings |
| System Configuration | Get Contact Information Interface | Get Contact Information |
| System Configuration | Get Home Page Settings Interface | Get Home Page Settings |
| System Configuration | Get Custom Field Interface | Get Custom Field |
| System Configuration | Get Multilingual Site Interface | Get multilingual site information |
| System Configuration | Get Google URL interface | Get Google URL |
| System Configuration | Get statistics interface | Get statistics |
Leave message and verification interface
| Category | API Name | description |
|---|---|---|
| Leave a message | Leave message interface | Submit message |
| Leave a message | Get message field interface | Configure comment field |
| Verify | Get verification code interface | Get verification code |
| Verify | Send email verification interface | Send email verification |
| Verify | Email verification interface | Verify email |
Upload interface
| Category | API Name | description |
|---|---|---|
| Upload | Upload attachment interface | Upload attachment |
Document import interface
| Category | API Name | description |
|---|---|---|
| Document import | Document Import Interface | Content generated by third-party platforms such as AI writing can be imported into AnQiCMS through this interface |
| Document import | Check if the document exists interface | Check if the document to be imported already exists in the AnQiCMS system to avoid importing the same content repeatedly |
| Document import | Get document category list interface | Get the document category list, used to select categories when importing documents |
| Document import | Add friend link interface | Add a friend link, used to add a friend link when importing documents |
| Document import | Check if the link exists interface | Check if the link already exists |
| Document import | Delete Link Interface | Delete Link |
| Document import | Generate Sitemap Interface | Generate Sitemap |
WeChat Related Interface
| Category | API Name | description |
|---|---|---|
| WeChat API | WeChat related functions | |
| WeChat authorization API | WeChat authorization | |
| Get Mini Program QR Code Interface | Get Mini Program QR Code |
Other Interfaces
| Category | API Name | description |
|---|---|---|
| other | Subscription Interface | Subscription Function |
| other | Payment Check Interface | Payment Check |