import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});
const purchaseOrder = await conductor.qbd.purchaseOrders.delete('123ABC-1234567890', {
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(purchaseOrder.id);import os
from conductor import Conductor
conductor = Conductor(
api_key=os.environ.get("CONDUCTOR_SECRET_KEY"), # This is the default and can be omitted
)
purchase_order = conductor.qbd.purchase_orders.delete(
id="123ABC-1234567890",
conductor_end_user_id="end_usr_1234567abcdefg",
)
print(purchase_order.id)curl --request DELETE \
--url https://api.conductor.is/v1/quickbooks-desktop/purchase-orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/purchase-orders/{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: Bearer <token>",
"Conductor-End-User-Id: <conductor-end-user-id>"
],
]);
$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.conductor.is/v1/quickbooks-desktop/purchase-orders/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Conductor-End-User-Id", "<conductor-end-user-id>")
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.conductor.is/v1/quickbooks-desktop/purchase-orders/{id}")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/purchase-orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Conductor-End-User-Id"] = '<conductor-end-user-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "123ABC-1234567890",
"objectType": "qbd_purchase_order",
"refNumber": "PO-1234",
"deleted": true
}Delete a purchase order
Permanently deletes a purchase order. The deletion will fail if the purchase order is currently in use or has any linked transactions that are in use.
import Conductor from 'conductor-node';
const conductor = new Conductor({
apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
});
const purchaseOrder = await conductor.qbd.purchaseOrders.delete('123ABC-1234567890', {
conductorEndUserId: 'end_usr_1234567abcdefg',
});
console.log(purchaseOrder.id);import os
from conductor import Conductor
conductor = Conductor(
api_key=os.environ.get("CONDUCTOR_SECRET_KEY"), # This is the default and can be omitted
)
purchase_order = conductor.qbd.purchase_orders.delete(
id="123ABC-1234567890",
conductor_end_user_id="end_usr_1234567abcdefg",
)
print(purchase_order.id)curl --request DELETE \
--url https://api.conductor.is/v1/quickbooks-desktop/purchase-orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Conductor-End-User-Id: <conductor-end-user-id>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.conductor.is/v1/quickbooks-desktop/purchase-orders/{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: Bearer <token>",
"Conductor-End-User-Id: <conductor-end-user-id>"
],
]);
$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.conductor.is/v1/quickbooks-desktop/purchase-orders/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Conductor-End-User-Id", "<conductor-end-user-id>")
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.conductor.is/v1/quickbooks-desktop/purchase-orders/{id}")
.header("Conductor-End-User-Id", "<conductor-end-user-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.conductor.is/v1/quickbooks-desktop/purchase-orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Conductor-End-User-Id"] = '<conductor-end-user-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "123ABC-1234567890",
"objectType": "qbd_purchase_order",
"refNumber": "PO-1234",
"deleted": true
}Authorizations
Your Conductor secret key using Bearer auth (e.g., "Authorization: Bearer {{YOUR_SECRET_KEY}}").
Headers
The ID of the End-User to receive this request.
"end_usr_1234567abcdefg"
Path Parameters
The QuickBooks-assigned unique identifier of the purchase order to delete.
36"123ABC-1234567890"
Response
Returns a confirmation of the deletion with the ID of the deleted purchase order.
The QuickBooks-assigned unique identifier of the deleted purchase order.
"123ABC-1234567890"
The type of object. This value is always "qbd_purchase_order".
"qbd_purchase_order""qbd_purchase_order"
The case-sensitive user-defined reference number of the deleted purchase order.
"PO-1234"
Indicates whether the purchase order was deleted.
true

