Update an invoice (partial)
curl --request PATCH \
--url https://integrations.polinate.ai/api/v1/invoices/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--header 'X-Business-Id: <x-business-id>' \
--data '
{
"status": "PAID",
"reference": "PO-123",
"notes": "Thanks!"
}
'import requests
url = "https://integrations.polinate.ai/api/v1/invoices/{id}"
payload = {
"status": "PAID",
"reference": "PO-123",
"notes": "Thanks!"
}
headers = {
"X-Business-Id": "<x-business-id>",
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Business-Id': '<x-business-id>',
'X-API-Key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({status: 'PAID', reference: 'PO-123', notes: 'Thanks!'})
};
fetch('https://integrations.polinate.ai/api/v1/invoices/{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://integrations.polinate.ai/api/v1/invoices/{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([
'status' => 'PAID',
'reference' => 'PO-123',
'notes' => 'Thanks!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>",
"X-Business-Id: <x-business-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integrations.polinate.ai/api/v1/invoices/{id}"
payload := strings.NewReader("{\n \"status\": \"PAID\",\n \"reference\": \"PO-123\",\n \"notes\": \"Thanks!\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Business-Id", "<x-business-id>")
req.Header.Add("X-API-Key", "<x-api-key>")
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://integrations.polinate.ai/api/v1/invoices/{id}")
.header("X-Business-Id", "<x-business-id>")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"PAID\",\n \"reference\": \"PO-123\",\n \"notes\": \"Thanks!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integrations.polinate.ai/api/v1/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Business-Id"] = '<x-business-id>'
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"PAID\",\n \"reference\": \"PO-123\",\n \"notes\": \"Thanks!\"\n}"
response = http.request(request)
puts response.read_body{
"id": "inv_123",
"status": "PAID"
}{
"errorCode": "<string>",
"message": "<string>",
"fieldErrors": {}
}{
"errorCode": "<string>",
"message": "<string>",
"fieldErrors": {}
}{
"errorCode": "<string>",
"message": "<string>",
"fieldErrors": {}
}{
"errorCode": "<string>",
"message": "<string>",
"fieldErrors": {}
}Invoices
Update an invoice (partial)
Partially updates invoice fields such as status, reference, notes, and provider-specific properties. Idempotent via Idempotency-Key.
PATCH
/
api
/
v1
/
invoices
/
{id}
Update an invoice (partial)
curl --request PATCH \
--url https://integrations.polinate.ai/api/v1/invoices/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--header 'X-Business-Id: <x-business-id>' \
--data '
{
"status": "PAID",
"reference": "PO-123",
"notes": "Thanks!"
}
'import requests
url = "https://integrations.polinate.ai/api/v1/invoices/{id}"
payload = {
"status": "PAID",
"reference": "PO-123",
"notes": "Thanks!"
}
headers = {
"X-Business-Id": "<x-business-id>",
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Business-Id': '<x-business-id>',
'X-API-Key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({status: 'PAID', reference: 'PO-123', notes: 'Thanks!'})
};
fetch('https://integrations.polinate.ai/api/v1/invoices/{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://integrations.polinate.ai/api/v1/invoices/{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([
'status' => 'PAID',
'reference' => 'PO-123',
'notes' => 'Thanks!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>",
"X-Business-Id: <x-business-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integrations.polinate.ai/api/v1/invoices/{id}"
payload := strings.NewReader("{\n \"status\": \"PAID\",\n \"reference\": \"PO-123\",\n \"notes\": \"Thanks!\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Business-Id", "<x-business-id>")
req.Header.Add("X-API-Key", "<x-api-key>")
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://integrations.polinate.ai/api/v1/invoices/{id}")
.header("X-Business-Id", "<x-business-id>")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"PAID\",\n \"reference\": \"PO-123\",\n \"notes\": \"Thanks!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integrations.polinate.ai/api/v1/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Business-Id"] = '<x-business-id>'
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"PAID\",\n \"reference\": \"PO-123\",\n \"notes\": \"Thanks!\"\n}"
response = http.request(request)
puts response.read_body{
"id": "inv_123",
"status": "PAID"
}{
"errorCode": "<string>",
"message": "<string>",
"fieldErrors": {}
}{
"errorCode": "<string>",
"message": "<string>",
"fieldErrors": {}
}{
"errorCode": "<string>",
"message": "<string>",
"fieldErrors": {}
}{
"errorCode": "<string>",
"message": "<string>",
"fieldErrors": {}
}Headers
Business identifier for external auth. Find in Polinate app → Business Settings → Integrations.
Example:
"{{businessId}}"
Per-business API key for external auth. Find in Polinate app → Business Settings → Integrations.
Example:
"{{apiKey}}"
Idempotency key for POST operations
Example:
"{{idempotencyKey}}"
Path Parameters
Example:
"inv_123"
Was this page helpful?

