AnQiCMS is an open-source content management system developed based on the Go programming language, providing a complete API interface for developers to call.The API uses RESTful design style and supports data interaction in JSON format.
Quick Start: Calling the First API
Take getting the article list as an example, and introduce a complete API call process.
1. Preparation
Before starting, you need to know the following information:
- API Base Path:
/api- All API requests must use this path as a prefix - Authentication MethodAuthentication is required for some interfaces, using JWT Token for identity verification
- Request formatAll interfaces use JSON format for data transmission, except for file upload
- Response format: Return data in JSON format 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 responseThe server will return a 200 status code and a JSON formatted response body after the request is successful.
{
"code": 0,
"msg": "",
"total": 100,
"data": [...]
}
- Error handlingWhen a request fails, the JSON response body contains an error code and error message.
{
"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 | Get Document List Interface | Get document list |
| Content management | Retrieve document parameters interface | Get custom parameters of the document |
| Content management | Get the previous document interface | Get the previous document |
| Content management | Get the next document interface | Get the next document |
| Content management | Check document password interface | Check if the document password is correct |
| Content management | Document release interface | Release a new document |
| Content management | Get document SKU interface | Get document SKU information |
| Content management | Get category details interface | Get category details |
| Content management | Get category list interface | Get category list |
| Content management | Get Tag Details 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 details API | Get single page details |
| Content management | Get page list interface | Get single page list |
| Content management | Get module detail interface | Get module detail |
| Content management | Get module list interface | Get module list |
| Content management | Navigation List Retrieval Interface | Retrieve navigation list |
| Content management | Get Banner list interface | Get home page Banner list |
| Content management | Get Friend Links List Interface | Get 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 | Get User Details |
| User Management | Update User Details Interface | Update User Information |
| User Management | Update User Avatar Interface | 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 Favorites List Interface | Get user's favorite list |
| User Management | Add favorite interface | Add to Favorites |
| User Management | Check Favorites 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 |
|---|---|---|
| Comment Interaction | Get Comments List Interface | Get comment list |
| Comment Interaction | Post Comment Interface | Post a comment |
| Comment Interaction | Like Comment Interface | Like a comment |
Shopping cart and order interface
| Category | API Name | Description |
|---|---|---|
| Shopping cart | Add to 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 Product Quantity |
| Shopping cart | Remove Shopping Cart Interface | Remove Product from Shopping Cart |
| Order | Create Order Interface | Create Order |
| Order | Get Order Details Interface | Get Order Details |
| Order | Get Order List Interface | Get Order List |
| Order | Cancel order interface | Cancel Order |
| Order | Complete Order Endpoint | Complete Order |
| Order | Order Payment Interface | Order Payment |
| Order | Apply Refund Interface | Apply Order Refund |
| Order | Release Order Review Interface | Release Order Review |
| 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 |
|---|---|---|
| Rating | Get order rating interface | Get order rating |
| Coupons | Get coupons code interface | Get coupon code |
| Coupons | Get coupon list interface | Get coupon list |
| Coupons | Get valid coupon list interface | Get valid coupon list |
Distributor interface
| Category | API Name | Description |
|---|---|---|
| Distributor | Interface to get distributor details | Get distributor details |
| Distributor | Interface to get distributor earnings list | Get distributor earnings list |
| Distributor | Get Distribution Team List Interface | Get distributor team list |
| Distributor | Get distributor order interface | Get Distributor Order |
| Distributor | Get Distributor Statistics Interface | Get Distributor Statistics Information |
| Distributor | Update Distributor Information Interface | Update Distributor Information |
| Distributor | Apply for Distributor Withdrawal Interface | Apply for Distributor Withdrawal |
| Distributor | 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 Message | Leave Message Interface | Submit留言 |
| Leave Message | Get留言字段interface | Get留言字段configuration |
| Verify | Get verification code interface | Get captcha |
| Verify | Send Email Verification Interface | Send email verification |
| Verify | Verify Email Interface | Verify Email |
Upload Interface
| Category | API Name | Description |
|---|---|---|
| Upload | Upload Attachment Interface | Upload Attachment |
Document Import Interface
| Category | API Name | Description |
|---|---|---|
| Document Import | Import Document Interface | Content generated through third-party platforms like AI writing can be imported into AnQiCMS via this interface |
| Document Import | Check if the document existence interface exists | Check if the document to be imported already exists in the AnQiCMS system to avoid importing the same content repeatedly |
| Document Import | Get the document classification list interface | Get the document category list, used for selecting categories when importing documents |
| Document Import | Add Friendship Link Interface | Add a friend link, used for adding friend links when importing documents |
| Document Import | Check if there is an interface for link existence | Check if the link already exists |
| Document Import | Delete Link Interface | Delete Link |
| Document Import | Generate Sitemap Interface | Generate Sitemap |
WeChat Related Interfaces
| Category | API Name | Description |
|---|---|---|
| WeChat API | WeChat related features | |
| 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 | Subscribe Feature |
| Other | Payment Check Interface | Payment Check |