Query Channel Product Configuration
Updated: 2025-04-10 11:28:24
API Description
1、查询频道商品配置
2、接口支持https协议
API URL
https://api.polyv.net/live/v4/channel/product/push/rule
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. API calls have frequency limits. See details
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId [See Get Secret Key] |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid within 3 minutes |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be stored or used directly on the client. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. [See Signature Generation Rules] |
| channelId | true | String | Channel ID |
Example
https://api.polyv.net/live/v4/channel/product/push/rule?appId=frlr1zazn3&sign=4049473DAEBBEFF778DABD1A25E3409B&channelId=2779045×tamp=1642732753732
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code, 200 for success, non-200 for failure [See Global Error Description] |
| status | String | Response status text |
| message | String | Response description, provides auxiliary error reason when code is 400 or 500 |
| data | Object | Empty on failure, product configuration information on success [See data field description] |
data Field Description
| Parameter | Type | Description |
|---|---|---|
| productExplainEnabled | String | Product explanation toggle (Y-Enabled, N-Disabled) |
| productExplainingAutoPushAndSticky | String | Auto-push and pin during product explanation toggle (Y-Enabled, N-Disabled) |
| productPushRule | String | Push rule (smallCard, bigCard, chooseCard) |
| productListSortType | String | Channel product library list sort (ASC-Ascending, DESC-Descending [default]) |
| productTagSortType | String | Product tag sort method (DEFAULT-Default sort, CUSTOM-Custom sort) |
| productHotEffectEnabled | String | Product hot effect toggle (Y-Enabled, N-Disabled) |
| normalProductHotEffectTips | String | Normal product hot effect tip |
| jobProductHotEffectTips | String | Job product hot effect tip |
| financeProductHotEffectTips | String | Finance product hot effect tip |
| pushingProduct | Object | Currently pushing product [See ChannelProductPushingStatusVO] |
| productTagSortOrderIds | Array | Product associated tag list |
| productTagSortOrderIdNames | Array | Product associated tag name list |
ChannelProductPushingStatusVO
| Parameter | Type | Description |
|---|---|---|
| productId | Integer | Product ID |
| pushRule | String | Push rule |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click to download source code. After downloading, add it to your own source project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded file.
It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.
private static final Logger log = LoggerFactory.getLogger(ChannelOperateTest.class);
/**
* 查询频道商品设置
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void testGetProductSetting() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String userId = super.userId;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "https://api.polyv.net/live/v4/channel/product/push/rule";
String channelId = "2779045";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("channelId", channelId);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("测试查询频道商品配置,返回值:{}", response);
//do somethings
}
Response Example
For system global error descriptions, see Global Error Description
Success Example
{
"code": 200,
"status": "success",
"requestId": "9bedc2b44dcc4fdb8db8352905a17993.71.17270604205500043",
"data": {
"productPushRule": "smallCard",
"productHotEffectEnabled": "Y",
"normalProductHotEffectTips": "热卖中",
"jobProductHotEffectTips": "投送中",
"financeProductHotEffectTips": "选购中"
},
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"message": "invalid signature.",
"data": ""
}
