Get product activity information interface

Get information about the current activities of a specified product, including activity SKU details.

Request address

{域名地址}/api/archive/activity

Description:{域名地址}Replace it with your domain name, such ashttps://en.anqicms.com/api/archive/activity

Request Syntax

GET {域名地址}/api/archive/activity?{参数}

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
archive_id int Is Product 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/archive/activity?archive_id=123 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