Delete a term from your listing
curl --request DELETE \
--url https://api.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}', 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.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}",
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.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}"
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.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}")
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{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "forbidden",
"message": "Your account cannot make this change."
}
}{
"detail": {
"code": "term_not_found",
"message": "This listing term is not available."
}
}{
"detail": {
"code": "term_in_use",
"message": "This term is still in use and cannot be deleted."
}
}{
"code": "<string>",
"detail": "<string>"
}Delete a term from your listing
Deletes an unused term from a listing your organization owns. A term used by a reservation or another retained record cannot be deleted.
DELETE
/
commerce
/
v2
/
listings
/
{listingId}
/
terms
/
{listingTermsId}
Delete a term from your listing
curl --request DELETE \
--url https://api.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}', 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.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}",
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.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}"
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.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/commerce/v2/listings/{listingId}/terms/{listingTermsId}")
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{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "forbidden",
"message": "Your account cannot make this change."
}
}{
"detail": {
"code": "term_not_found",
"message": "This listing term is not available."
}
}{
"detail": {
"code": "term_in_use",
"message": "This term is still in use and cannot be deleted."
}
}{
"code": "<string>",
"detail": "<string>"
}The console and CLI do not provide this operation.
Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
Listing ID (capacityListingId or listingId).
The term's listingTermsId.
Response
Term deleted.
Was this page helpful?