跳转到内容
安装应用
简体中文

[DELETE] 删除订阅

AI 概览

介绍可在一次请求中删除一个或多个到货提醒订阅的端点。

  • 携带 Authorization 标头调用 DELETE /shop-api/back-in-stock/delete。
  • 在请求正文中发送 ids 数组;该参数为必填,最多接受 100 个 ID。
  • 速率限制为 throttle:30,1。
  • 缺少 ids 或其不是数组时,将返回“The ids field is required”。

摘要由 AI 生成,可能有误,请以下方完整指南为准。

您可以在同一个请求中删除单个或多个订阅。

* 身份验证

必需 Authorization

限制 throttle:30,1

请求

端点 DELETE - /shop-api/back-in-stock/delete

请求体负载

参数 类型 是否必需
ids array yes , max:100
DELETE /shop-api/back-in-stock/delete HTTP/1.1
Host: preorder.globo.io
Content-Type: application/json
Authorization: ************
Content-Length: 21
{
"ids": [1324]
}
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "************");
const raw = JSON.stringify({
"ids": [
1324
]
});
const requestOptions = {
method: "DELETE",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://preorder.globo.io/shop-api/back-in-stock/delete", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://preorder.globo.io/shop-api/back-in-stock/delete',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS =>'{
"ids": [1324]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: ************'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

成功响应 200

{
"success": true,
"message": "Back in stock products deleted successfully"
}

失败

// missing ids or ids is not array
{
"success": false,
"message": "The ids field is required"
}
// catch
{
"success": false,
"message": "Something went wrong"
}

此页面对您有帮助吗?

报告问题