Skip to main content
DELETE
/
discounts
/
{id}
Delete a discount
curl --request DELETE \
  --url https://eu.sequencehq.com/api/discounts/{id} \
  --header 'Authorization: <authorization>'
import requests

url = "https://eu.sequencehq.com/api/discounts/{id}"

headers = {"Authorization": "<authorization>"}

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

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

fetch('https://eu.sequencehq.com/api/discounts/{id}', 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://eu.sequencehq.com/api/discounts/{id}",
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: <authorization>"
],
]);

$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://eu.sequencehq.com/api/discounts/{id}"

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

req.Header.Add("Authorization", "<authorization>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://eu.sequencehq.com/api/discounts/{id}")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://eu.sequencehq.com/api/discounts/{id}")

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

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

response = http.request(request)
puts response.read_body
{
  "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
  "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096",
  "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
  "phaseId": "220e1878-b70a-4dfd-9c55-7651424b12d6",
  "priceIds": [
    "e007e884-5100-4183-8355-4771865cb4d7"
  ],
  "separateLineItem": false,
  "amount": 25,
  "discountCalculationType": "PERCENTAGE",
  "message": "Loyalty Discount",
  "validFrom": "2023-01-01",
  "validTo": "2023-01-31",
  "createdAt": "2022-06-28T16:47:00Z",
  "updatedAt": "2022-06-28T16:47:00Z",
  "seatDiscountType": "ALL_SEATS"
}
This response has no body data.
This response has no body data.
This response has no body data.

Headers

Authorization
string
required

Your API credentials. Eg. Basic {credentials}.

sequence-version
enum<string>

Use this header to select an API version

Available options:
2024-07-30

Path Parameters

id
string
required

Discount ID

Response

OK

id
string
required

Discount ID

Example:

"d58bf2e3-7a5d-4900-8457-2521c6880f7d"

sequenceAccountId
string
required

The Sequence Account to which this Discount belongs

Example:

"1986c663-9ee9-4811-bfbf-57d2ad666096"

billingScheduleId
string
required

Billing Schedule ID

Example:

"08a76ddb-230e-4700-a5e2-70f6edaf7d50"

priceIds
string[]
required

Price IDs this discount applies to. If not populated, the discount applies to all prices on the billing schedule

Example:
["e007e884-5100-4183-8355-4771865cb4d7"]
separateLineItem
boolean
required

Indicates whether the discount should appear as a separate line item in the invoice

Example:

false

amount
number
required

Amount to be reduced

Example:

25

discountCalculationType
enum<string>
required

Indicates whether the discount amount is percentage or nominal

Available options:
PERCENTAGE,
NOMINAL
Example:

"PERCENTAGE"

message
string
required

Message to appear on the Invoice

Example:

"Loyalty Discount"

createdAt
string
required

Created at

Example:

"2022-06-28T16:47:00Z"

updatedAt
string
required

Updated At

Example:

"2022-06-28T16:47:00Z"

seatDiscountType
enum<string>
required

Determines how the discount is applied to any seat-based prices

Available options:
INCLUDED_SEATS_ONLY,
OVERAGE_SEATS_ONLY,
ALL_SEATS
Example:

"ALL_SEATS"

phaseId
string

Phase ID

Example:

"220e1878-b70a-4dfd-9c55-7651424b12d6"

validFrom
string

First Day Discount is Valid

Example:

"2023-01-01"

validTo
string

Last Day Discount is Valid

Example:

"2023-01-31"