Update a purchase order
curl --request PATCH \
--url https://www.ruddr.io/api/workspace/purchase-orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>",
"name": "<string>",
"amount": 123,
"currency": "<string>",
"includeTax": true,
"isActive": true,
"start": "2023-12-25",
"end": "2023-12-25",
"notes": "<string>",
"contactId": "<string>"
}
'import requests
url = "https://www.ruddr.io/api/workspace/purchase-orders/{id}"
payload = {
"number": "<string>",
"name": "<string>",
"amount": 123,
"currency": "<string>",
"includeTax": True,
"isActive": True,
"start": "2023-12-25",
"end": "2023-12-25",
"notes": "<string>",
"contactId": "<string>"
}
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({
number: '<string>',
name: '<string>',
amount: 123,
currency: '<string>',
includeTax: true,
isActive: true,
start: '2023-12-25',
end: '2023-12-25',
notes: '<string>',
contactId: '<string>'
})
};
fetch('https://www.ruddr.io/api/workspace/purchase-orders/{id}', 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://www.ruddr.io/api/workspace/purchase-orders/{id}",
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([
'number' => '<string>',
'name' => '<string>',
'amount' => 123,
'currency' => '<string>',
'includeTax' => true,
'isActive' => true,
'start' => '2023-12-25',
'end' => '2023-12-25',
'notes' => '<string>',
'contactId' => '<string>'
]),
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://www.ruddr.io/api/workspace/purchase-orders/{id}"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"includeTax\": true,\n \"isActive\": true,\n \"start\": \"2023-12-25\",\n \"end\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"contactId\": \"<string>\"\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://www.ruddr.io/api/workspace/purchase-orders/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"includeTax\": true,\n \"isActive\": true,\n \"start\": \"2023-12-25\",\n \"end\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"contactId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ruddr.io/api/workspace/purchase-orders/{id}")
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 \"number\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"includeTax\": true,\n \"isActive\": true,\n \"start\": \"2023-12-25\",\n \"end\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"contactId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "c502eaed-0db7-4072-aa32-9c186def91e9",
"number": "PO-2026-0042",
"name": "Website Redesign 2026",
"amount": 60000,
"currency": "USD",
"includeTax": true,
"isActive": true,
"start": "2026-01-01",
"end": "2026-12-31",
"notes": "Approved by procurement on December 12.",
"createdAt": "2026-01-05T15:21:44.907Z",
"client": {
"id": "b46b9857-672a-47cd-a5ae-b1f3b6e5146e",
"name": "Paul's Boutique"
},
"contact": {
"id": "72ba6b23-d29c-4138-ba46-62e2dffbe2dd",
"name": "Dana Whitfield"
},
"amountUsed": 12500,
"amountAvailable": 47500
}Purchase Orders
Update a purchase order
PATCH
/
purchase-orders
/
{id}
Update a purchase order
curl --request PATCH \
--url https://www.ruddr.io/api/workspace/purchase-orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>",
"name": "<string>",
"amount": 123,
"currency": "<string>",
"includeTax": true,
"isActive": true,
"start": "2023-12-25",
"end": "2023-12-25",
"notes": "<string>",
"contactId": "<string>"
}
'import requests
url = "https://www.ruddr.io/api/workspace/purchase-orders/{id}"
payload = {
"number": "<string>",
"name": "<string>",
"amount": 123,
"currency": "<string>",
"includeTax": True,
"isActive": True,
"start": "2023-12-25",
"end": "2023-12-25",
"notes": "<string>",
"contactId": "<string>"
}
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({
number: '<string>',
name: '<string>',
amount: 123,
currency: '<string>',
includeTax: true,
isActive: true,
start: '2023-12-25',
end: '2023-12-25',
notes: '<string>',
contactId: '<string>'
})
};
fetch('https://www.ruddr.io/api/workspace/purchase-orders/{id}', 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://www.ruddr.io/api/workspace/purchase-orders/{id}",
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([
'number' => '<string>',
'name' => '<string>',
'amount' => 123,
'currency' => '<string>',
'includeTax' => true,
'isActive' => true,
'start' => '2023-12-25',
'end' => '2023-12-25',
'notes' => '<string>',
'contactId' => '<string>'
]),
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://www.ruddr.io/api/workspace/purchase-orders/{id}"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"includeTax\": true,\n \"isActive\": true,\n \"start\": \"2023-12-25\",\n \"end\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"contactId\": \"<string>\"\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://www.ruddr.io/api/workspace/purchase-orders/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"includeTax\": true,\n \"isActive\": true,\n \"start\": \"2023-12-25\",\n \"end\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"contactId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.ruddr.io/api/workspace/purchase-orders/{id}")
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 \"number\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"includeTax\": true,\n \"isActive\": true,\n \"start\": \"2023-12-25\",\n \"end\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"contactId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "c502eaed-0db7-4072-aa32-9c186def91e9",
"number": "PO-2026-0042",
"name": "Website Redesign 2026",
"amount": 60000,
"currency": "USD",
"includeTax": true,
"isActive": true,
"start": "2026-01-01",
"end": "2026-12-31",
"notes": "Approved by procurement on December 12.",
"createdAt": "2026-01-05T15:21:44.907Z",
"client": {
"id": "b46b9857-672a-47cd-a5ae-b1f3b6e5146e",
"name": "Paul's Boutique"
},
"contact": {
"id": "72ba6b23-d29c-4138-ba46-62e2dffbe2dd",
"name": "Dana Whitfield"
},
"amountUsed": 12500,
"amountAvailable": 47500
}A client’s authorization to bill up to a set amount. Projects, invoices, and credit notes can be tied to a purchase order to track how much of it is used.
Authorizations
Body
application/json
Response
200