Polyv Help Center

Help Center

Delete Card Push

Updated: 2022-09-15 09:50:53

API Description

1、删除卡片推送,对应新版后台的 营销-卡片
2、接口支持https协议

API URL

http://api.polyv.net/live/v4/channel/card-push/delete

Online API Call

Request Method

POST

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended to ensure API security. API calls are subject to rate limits. See details

Request Parameter Description

Parameter Required Type Description
appId true String Account appId See details on obtaining keys
timestamp true Long Current 13-digit millisecond timestamp, valid for 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 never be used directly on the client side. All APIs must be called through your own server to relay requests to the POLYV server for response data. See signature generation rules
channelId true String Channel ID
cardPushId true Long Card push primary key ID

Example

http://api.polyv.net/live/v4/channel/card-push/delete?cardPushId=1283&appId=frlr1zazn3&sign=101A11C4332CF4AEE9B3F25802B79765&channelId=2477096&timestamp=1634268360331

Response Parameter Description

Parameter Type Description
code Integer Response status code, 200 indicates success, non-200 indicates failure
status String Response result, determined by business logic. Returns success on success, error on failure
success Boolean Response result, determined by business logic. Returns true on success, false on failure
data Object Returns null on successful response
error Object Error information when status code is non-200 See Error field description
requestId String Request ID, a unique UUID generated for each request. Only used for troubleshooting and debugging, should not be tied to business logic

Error Parameter Description

Parameter Type Description
code Integer Error code, used to identify the specific error cause
desc String Error description, corresponds to error.code

Java Request Example

For quick integration of the base code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code project. The HttpUtil.java and LiveSignUtil.java in the test cases are included 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.

/**
 * 删除卡片推送
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void testDeletePushChannelCardPush() throws IOException, NoSuchAlgorithmException {
    String appId = super.appId;
    String appSecret = super.appSecret;
    String timestamp = String.valueOf(System.currentTimeMillis());
    //业务参数
    String url = "http://api.polyv.net/live/v4/channel/card-push/delete";
    
    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("channelId", "2477096");
    requestMap.put("cardPushId", "1313");
    
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    url = HttpUtil.appendUrl(url, requestMap);
    
    String response = HttpUtil.postFormBody(url, null);
    
    log.info("测试删除频道卡片成功,返回值:{}", response);
}

Response Example

Success Example

{
    "code": 200,
    "status": "success",
    "requestId": "847f0716fa76461baf8979aaa4415dc3.69.16342683634973459",
    "data": null,
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "requestId": "d310b70bc329403f87f77f9203d50f89.127.16360830083787219",
    "error": {
        "code": 20001,
        "desc": "application not found."
    },
    "success": false
}
联系客服,在线咨询