Skip to main content
DELETE
/
carts
/
{cartId}
/
points
Remove Reward Points
curl --request DELETE \
  --url https://api.marzipan.co/v1/carts/{cartId}/points \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.marzipan.co/v1/carts/{cartId}/points"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.marzipan.co/v1/carts/{cartId}/points', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.marzipan.co/v1/carts/{cartId}/points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.marzipan.co/v1/carts/{cartId}/points"

req, _ := http.NewRequest("DELETE", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://api.marzipan.co/v1/carts/{cartId}/points")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.marzipan.co/v1/carts/{cartId}/points")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "893ff86d-4453-4134-9f62-5c9b7a70d74e",
    "cartCount": 2,
    "email": "customer@example.com",
    "subTotal": 4500,
    "discount": 0,
    "pointsToRedeem": 0,
    "pointsDiscountValue": 0,
    "shipping": 0,
    "tax": 0,
    "grandTotal": 4500,
    "currency": {
      "code": "GBP",
      "symbol": "£"
    }
  }
}
{
"message": "No query results for model [Cart]."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your API token.

Path Parameters

cartId
string<uuid>
required

The unique identifier for the cart

Response

Points removed. Returns the recalculated cart.

data
object

A storefront shopping cart with its items, totals and applied discounts. Monetary amounts are expressed in the cart currency's minor units (e.g. pence/cents).