[DELETE] Radera regel
AI-översikt
Beskriver slutpunkten som tar bort en eller flera regler för kommer snart i en förfrågan.
- Anropa
DELETE /shop-api/coming-soon/deletemed rubrikenAuthorization; gränsen ärthrottle:30,1. - Skicka en
ids-array i bodyn; den är obligatorisk och accepterar upp till 100 id:n. - Fel inkluderar "The ids field is required" och "Coming soon products not found".
Sammanfattning skapad av AI. Den kan innehålla fel, så läs hela guiden nedan.
Du kan radera en eller flera Coming Soon-regler i samma begäran.
* Autentisering
Obligatorisk Authorization
Gräns throttle:30,1
Begäran
Ändpunkt DELETE - /shop-api/coming-soon/delete
Payload body
| Parametrar | Typ | Obligatorisk |
|---|---|---|
| ids | array | yes max:100 |
DELETE /shop-api/coming-soon/delete HTTP/1.1Host: preorder.globo.ioContent-Type: application/jsonAuthorization: ************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/coming-soon/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/coming-soon/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;Lyckat svar 200
{ "success": true, "message": "Coming soon products deleted successfully"}Misslyckades
// missing ids or ids is not array{ "success": false, "message": "The ids field is required"}// not found{ "success": false, "message": "Coming soon products not found"}// catch{ "success": false, "message": "Something went wrong"}Var detta till hjälp?
Tack för din feedback! Berätta vad som saknades
Rapportera ett problem