跳到內容
安裝應用程式
繁體中文

[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

Payload 內容

參數 類型 必填
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"
}

這個頁面有幫助嗎?

回報問題