[DELETE] Excluir regra
Visão geral com IA
Documenta o endpoint que exclui uma ou mais regras de Em breve em uma única requisição.
- Chame
DELETE /shop-api/coming-soon/deletecom o cabeçalhoAuthorization; o limite de requisições éthrottle:30,1. - Envie um array
idsno corpo; ele é obrigatório e aceita até 100 ids. - Os erros incluem "The ids field is required" e "Coming soon products not found".
Resumo gerado por IA. Pode conter erros, então confira o guia completo abaixo.
Você pode excluir uma ou várias regras de Coming Soon na mesma requisição.
* Autenticação
Obrigatório Authorization
Limite throttle:30,1
Requisição
Endpoint DELETE - /shop-api/coming-soon/delete
Corpo do payload
| Parâmetros | Tipo | Obrigatório |
|---|---|---|
| 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;Resposta de sucesso 200
{ "success": true, "message": "Coming soon products deleted successfully"}Falha
// 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"}Esta página foi útil?
Obrigado pelo feedback! Conte o que faltou
Relatar um problema