Retrieve the contact information of the website, including contact person, phone number, address, email, etc., as well as custom contact parameters.
Points to note
- This interface uses the GET method
- Access this interface without logging in.
- Return the contact information set by the website administrator in the backend
- Includes basic contact information and custom contact information fields
- Parameters are customized according to backend settings and may include other contact methods such as WhatsApp
Request address
{域名地址}/api/setting/contact
Description:{域名地址}Replace it with your domain name, such ashttps://en.anqicms.com/api/setting/contact
Request Syntax
GET {域名地址}/api/setting/contact
Request Headers
This interface also involves common request headers. For more information, please refer toCommon Request Headers (Common Request Headers).
Request parameters
None
Response header
This interface only involves public 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 | Contact information data |
data parameter
| Field name | Type | Description |
|---|---|---|
| UserName | string | Contact Name |
| Cellphone | string | Contact phone number |
| Address | string | Contact address |
| string | Contact email | |
| string | WeChat contact information | |
| Qrcode | string | WeChat QR code image address |
| string | WhatsApp contact information (example: custom parameters) |
Usage Example
Request example
GET /api/setting/contact HTTP/1.1
Host: www.anqicms.com
Response Example
{
"code": 0,
"msg": "",
"data": {
"UserName": "张大仙",
"Cellphone": "13888888888",
"Address": "广东省深圳市南山区深南大道xxx号",
"Email": "[email protected]",
"Wechat": "13888888888",
"Qrcode": "https://en.anqicms.com/uploads/202209/06/64d0c4ee3e877dd6.webp",
"WhatsApp": "+8613888888888"
}
}
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 |