curl --request PATCH \
--url https://api.ornn.com/commerce/v2/listings/{listingId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"state": "draft"
}
'import requests
url = "https://api.ornn.com/commerce/v2/listings/{listingId}"
payload = { "state": "draft" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({state: 'draft'})
};
fetch('https://api.ornn.com/commerce/v2/listings/{listingId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'state' => 'draft'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/commerce/v2/listings/{listingId}"
payload := strings.NewReader("{\n \"state\": \"draft\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.ornn.com/commerce/v2/listings/{listingId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"state\": \"draft\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/commerce/v2/listings/{listingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"state\": \"draft\"\n}"
response = http.request(request)
puts response.read_body{
"capacityListingId": "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
"listingNumber": 1188,
"parentReservationId": "11111111-1111-4111-8111-111111111111",
"kind": "secondary",
"state": "draft",
"gpuSlug": "nvidia_h100_sxm",
"gpusPerNode": 8,
"capacityNodeCount": 2,
"facilityId": "cccccccc-cccc-4ccc-8ccc-cccccccccccc",
"provisioningType": "virtual-machine",
"availableAt": "2026-10-20T00:00:00Z",
"availableUntil": "2026-11-03T00:00:00Z",
"daysToRfs": null,
"cpu": "2x 56-core x86",
"ram": "2 TB",
"storage": "8x 3.84 TB NVMe",
"fabricType": "InfiniBand 3.2 Tbps",
"internet": "10 Gbps",
"createdAt": "2026-10-14T18:30:00Z",
"updatedAt": "2026-10-14T18:30:00Z"
}{
"detail": {
"code": "invalid_id",
"message": "That capacity or financial term ID is not valid."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "forbidden",
"message": "Your account cannot make this change."
}
}{
"detail": {
"code": "listing_has_active_reservations",
"message": "This listing cannot be withdrawn while a non-Spot reservation is active. Wait until it ends and try again."
}
}{
"detail": {
"code": "invalid_state",
"message": "Choose draft, available, or delisted."
}
}{
"code": "<string>",
"detail": "<string>"
}Pause, resume, or withdraw your listing
Changes the state of a listing your organization owns. On a relist only state can change: capacity, hardware specifications, and dates are fixed and any change to them returns 409 listing_reserved. Moving a listing to draft or delisted is refused while a non-Spot reservation on it is active. Taking a listing off sale stops new sales and ends running Spot VMs on it; windows already sold stay sold.
curl --request PATCH \
--url https://api.ornn.com/commerce/v2/listings/{listingId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"state": "draft"
}
'import requests
url = "https://api.ornn.com/commerce/v2/listings/{listingId}"
payload = { "state": "draft" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({state: 'draft'})
};
fetch('https://api.ornn.com/commerce/v2/listings/{listingId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'state' => 'draft'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/commerce/v2/listings/{listingId}"
payload := strings.NewReader("{\n \"state\": \"draft\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.ornn.com/commerce/v2/listings/{listingId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"state\": \"draft\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/commerce/v2/listings/{listingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"state\": \"draft\"\n}"
response = http.request(request)
puts response.read_body{
"capacityListingId": "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
"listingNumber": 1188,
"parentReservationId": "11111111-1111-4111-8111-111111111111",
"kind": "secondary",
"state": "draft",
"gpuSlug": "nvidia_h100_sxm",
"gpusPerNode": 8,
"capacityNodeCount": 2,
"facilityId": "cccccccc-cccc-4ccc-8ccc-cccccccccccc",
"provisioningType": "virtual-machine",
"availableAt": "2026-10-20T00:00:00Z",
"availableUntil": "2026-11-03T00:00:00Z",
"daysToRfs": null,
"cpu": "2x 56-core x86",
"ram": "2 TB",
"storage": "8x 3.84 TB NVMe",
"fabricType": "InfiniBand 3.2 Tbps",
"internet": "10 Gbps",
"createdAt": "2026-10-14T18:30:00Z",
"updatedAt": "2026-10-14T18:30:00Z"
}{
"detail": {
"code": "invalid_id",
"message": "That capacity or financial term ID is not valid."
}
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": {
"code": "forbidden",
"message": "Your account cannot make this change."
}
}{
"detail": {
"code": "listing_has_active_reservations",
"message": "This listing cannot be withdrawn while a non-Spot reservation is active. Wait until it ends and try again."
}
}{
"detail": {
"code": "invalid_state",
"message": "Choose draft, available, or delisted."
}
}{
"code": "<string>",
"detail": "<string>"
}ornn capacity-offers delist uses.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).
Body
draft takes the listing off sale without delisting it; available puts it back on sale; delisted withdraws it, like the delist operation.
draft, available, delisted Response
The updated listing.
A capacity listing's hardware, size, and availability. Read prices from its terms.
primary for Reserve listings; secondary for relisted capacity.
primary, secondary, on_demand draft, available, held, sold, or delisted. Handle unrecognized values.
A short reference number. Use capacityListingId in API paths.
Set on relisted capacity: the reservation it was relisted from.
bare-metal, virtual-machine Readiness lead time in days when the listing has no fixed dates.
GPU interconnect.
Internet bandwidth.
Was this page helpful?