Delete buy orders
curl --request DELETE \
--url https://thefirm.biz/api/public/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"slug": "thefirm"
}
]
}
'import requests
url = "https://thefirm.biz/api/public/v1/orders"
payload = { "items": [{ "slug": "thefirm" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{slug: 'thefirm'}]})
};
fetch('https://thefirm.biz/api/public/v1/orders', 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://thefirm.biz/api/public/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'slug' => 'thefirm'
]
]
]),
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://thefirm.biz/api/public/v1/orders"
payload := strings.NewReader("{\n \"items\": [\n {\n \"slug\": \"thefirm\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://thefirm.biz/api/public/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"slug\": \"thefirm\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thefirm.biz/api/public/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"slug\": \"thefirm\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"slug": "thefirm",
"ok": true,
"status": "created"
},
{
"slug": "charms",
"ok": true,
"status": "unchanged"
},
{
"slug": "no-such-project",
"ok": false,
"code": "unknown_project",
"message": "No project matches the slug"
}
]
}Buy Orders
Delete buy orders
Deletes one or more of the caller’s buy orders, keyed by project slug.
- Idempotent: deleting a project that has no active buy order returns
status: "already_deleted"instead of an error. - Each item is processed independently. The response is always HTTP 200 once authenticated and the body is valid — check the per-item
okflag inresults(index-aligned to your request) for each outcome.
DELETE
/
api
/
public
/
v1
/
orders
Delete buy orders
curl --request DELETE \
--url https://thefirm.biz/api/public/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"slug": "thefirm"
}
]
}
'import requests
url = "https://thefirm.biz/api/public/v1/orders"
payload = { "items": [{ "slug": "thefirm" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{slug: 'thefirm'}]})
};
fetch('https://thefirm.biz/api/public/v1/orders', 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://thefirm.biz/api/public/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'slug' => 'thefirm'
]
]
]),
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://thefirm.biz/api/public/v1/orders"
payload := strings.NewReader("{\n \"items\": [\n {\n \"slug\": \"thefirm\"\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://thefirm.biz/api/public/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"slug\": \"thefirm\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thefirm.biz/api/public/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"slug\": \"thefirm\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"slug": "thefirm",
"ok": true,
"status": "created"
},
{
"slug": "charms",
"ok": true,
"status": "unchanged"
},
{
"slug": "no-such-project",
"ok": false,
"code": "unknown_project",
"message": "No project matches the slug"
}
]
}Authorizations
API key issued via POST /api/public/v1/api-keys.
Body
application/json
The buy orders to delete, keyed by project slug.
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Response
Per-item results for the batch.
- Option 1
- Option 2
Show child attributes
Show child attributes
⌘I

