Get detailed information of a specified event, including associated SKU information.
Request address
{域名地址}/api/activity/detail
Description:{域名地址}Replace it with your domain name, such ashttps://en.anqicms.com/api/activity/detail
Request Syntax
GET {域名地址}/api/activity/detail?{参数}
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 |
Event 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 |
object |
Event Details |
data result item parameter
| Field name |
Type |
Description |
| id |
int |
Event ID |
| name |
string |
Event Name |
| Title |
string |
Event Title |
| description |
string |
Event Description |
| goods_id |
int |
Associated Product ID |
| type |
int |
Promotion Type |
| price |
int |
Promotion Price, in cents |
| original_price |
int |
Original Price, in cents |
| start_time |
int |
Event Start Timestamp |
| End Time |
int |
Event End Timestamp |
| status |
int |
Event Status |
| min_quantity |
int |
Minimum Purchase Quantity |
| max_quantity |
int |
Maximum Purchase Quantity |
| can use coupon |
bool |
Can the coupon be used |
| stock |
int |
Event inventory |
| sold_count |
int |
sold count |
| Skus |
object[] |
Event SKU list |
| created_time |
int |
Timestamp of creation |
| updated_time |
int |
update timestamp |
skus event SKU object
| Field name |
Type |
Description |
| id |
int |
SKU ID |
| activity ID |
int |
Event ID |
| sku_id |
int |
Product SKU ID |
| price |
int |
Promotion Price, in cents |
| stock |
int |
Inventory Quantity |
| created_time |
int |
Timestamp of creation |
Usage Example
Request example
GET /api/activity/detail?id=1 HTTP/1.1
Host: your-domain.com
Content-Type: application/json
Response Example
{
"code": 0,
"data": {
"id": 1,
"name": "限时特惠",
"title": "夏季大促",
"description": "全场商品8折优惠",
"goods_id": 123,
"type": 0,
"price": 2999,
"original_price": 3999,
"start_time": 1607308159,
"end_time": 1607912759,
"status": 1,
"min_quantity": 1,
"max_quantity": 10,
"can_use_coupon": true,
"stock": 100,
"sold_count": 15,
"skus": [
{
"id": 1,
"activity_id": 1,
"sku_id": 789,
"price": 3299,
"stock": 50,
"created_time": 1607308159
}
],
"created_time": 1607308159,
"updated_time": 1662717106
},
"msg": ""
}
error code
| Error code |
Description |
| 0 |
OK |
| -1 |
Activity does not exist |