Delete
curl -X DELETE https://api.reveniq.com/v1/discounts/:id -H 'Authorization: YOUR_API_TOKEN_HERE' -H 'Content-Type: application/json'
require 'uri'require 'net/http'
url = URI("https://api.reveniq.com/v1/discounts/:id")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Delete.new(url)request["Content-Type"] = 'application/json'request["Authorization"] = 'YOUR_API_TOKEN_HERE'
response = http.request(request)
HttpResponse<String> response = Unirest.delete("https://api.reveniq.com/v1/discounts/:id") .header("Content-Type", "application/json") .header("Authorization", "YOUR_API_TOKEN_HERE") .asString();
import requests
url = "https://api.reveniq.com/v1/discounts/:id"
headers = { 'Content-Type': "application/json", 'Authorization': "YOUR_API_TOKEN_HERE", }
response = requests.request("DELETE", url, headers=headers)
print(response.text)
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); }});
xhr.open("DELETE", "https://api.reveniq.com/v1/discounts/:id");xhr.setRequestHeader("Content-Type", "application/json");xhr.setRequestHeader("Authorization", "YOUR_API_TOKEN_HERE");
xhr.send();