Removes all the items of the cart
curl --request DELETE \
--url https://{apiBaseUrl}/v1/{sessionId}/cart \
--header 'X-API-KEY: <api-key>'const url = 'https://{apiBaseUrl}/v1/{sessionId}/cart';
const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v1/{sessionId}/cart"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v1/{sessionId}/cart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/v1/{sessionId}/cart");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.delete("https://{apiBaseUrl}/v1/{sessionId}/cart")
.header("X-API-KEY", "<api-key>")
.asString();{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Cart
Empty the cart
Removes all the items of the cart
DELETE
/
v1
/
{sessionId}
/
cart
Removes all the items of the cart
curl --request DELETE \
--url https://{apiBaseUrl}/v1/{sessionId}/cart \
--header 'X-API-KEY: <api-key>'const url = 'https://{apiBaseUrl}/v1/{sessionId}/cart';
const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/v1/{sessionId}/cart"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/v1/{sessionId}/cart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/v1/{sessionId}/cart");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-KEY", "<api-key>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.delete("https://{apiBaseUrl}/v1/{sessionId}/cart")
.header("X-API-KEY", "<api-key>")
.asString();{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Was this page helpful?