Skip to content

Removes a basket of this user with the given ID. Returns 200 if a basket of the user was found and deleted, 404 if no such basket was found, or 401 if not logged in.

DELETE
/api/baskets/{basketId}

Authorizations

Parameters

Path Parameters

basketId*
Typestring
Required

Responses

Samples

cURL
curl -X DELETE http://localhost/api/baskets/{basketId}
JavaScript
fetch("http://localhost/api/baskets/{basketId}", { method: "DELETE" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/baskets/{basketId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.delete("http://localhost/api/baskets/{basketId}")
print(response.json())