Update order notes
curl --request PATCH \
--url https://api-eu.flexportal.io/v1/orders/{orderId}/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Tenant-ID: <tenant-id>' \
--data '
{
"notes": "<string>"
}
'import requests
url = "https://api-eu.flexportal.io/v1/orders/{orderId}/notes"
payload = { "notes": "<string>" }
headers = {
"Tenant-ID": "<tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Tenant-ID': '<tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({notes: '<string>'})
};
fetch('https://api-eu.flexportal.io/v1/orders/{orderId}/notes', 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-eu.flexportal.io/v1/orders/{orderId}/notes",
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([
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Tenant-ID: <tenant-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://api-eu.flexportal.io/v1/orders/{orderId}/notes"
payload := strings.NewReader("{\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Tenant-ID", "<tenant-id>")
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-eu.flexportal.io/v1/orders/{orderId}/notes")
.header("Tenant-ID", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.flexportal.io/v1/orders/{orderId}/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Tenant-ID"] = '<tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"orderId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Orders
Update Order Notes
Updates the notes field on an order.
PATCH
/
v1
/
orders
/
{orderId}
/
notes
Update order notes
curl --request PATCH \
--url https://api-eu.flexportal.io/v1/orders/{orderId}/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Tenant-ID: <tenant-id>' \
--data '
{
"notes": "<string>"
}
'import requests
url = "https://api-eu.flexportal.io/v1/orders/{orderId}/notes"
payload = { "notes": "<string>" }
headers = {
"Tenant-ID": "<tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Tenant-ID': '<tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({notes: '<string>'})
};
fetch('https://api-eu.flexportal.io/v1/orders/{orderId}/notes', 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-eu.flexportal.io/v1/orders/{orderId}/notes",
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([
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Tenant-ID: <tenant-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://api-eu.flexportal.io/v1/orders/{orderId}/notes"
payload := strings.NewReader("{\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Tenant-ID", "<tenant-id>")
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-eu.flexportal.io/v1/orders/{orderId}/notes")
.header("Tenant-ID", "<tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.flexportal.io/v1/orders/{orderId}/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Tenant-ID"] = '<tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"orderId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Overview
Update the notes field on an order. Use this to add internal comments, special instructions, or any relevant information about the order.Request Fields
| Field | Required | Description |
|---|---|---|
notes | Yes | Note text (max 5000 characters) |
Example Request
{
"notes": "Customer requested delivery after 2pm. Contact before arrival."
}
Response Fields
| Field | Description |
|---|---|
success | Always true on success |
message | Confirmation message |
orderId | The updated order ID |
Common Use Cases
Delivery Instructions
Add special delivery requirements or time preferences
Customer Communication
Log phone calls or email exchanges about the order
Internal Tracking
Add reference numbers or internal tracking info
Special Handling
Note VIP customers or priority handling requirements
Example: Append to Existing Notes
Notes are replaced, not appended. To preserve existing notes:async function appendOrderNote(orderId, newNote) {
const order = await getOrder(orderId);
const timestamp = new Date().toISOString().split('T')[0];
const updatedNotes = order.notes
? `${order.notes}\n\n[${timestamp}] ${newNote}`
: `[${timestamp}] ${newNote}`;
return await updateOrderNotes(orderId, { notes: updatedNotes });
}
Example: Log Customer Interaction
async function logCustomerCall(orderId, summary, agentName) {
const order = await getOrder(orderId);
const timestamp = new Date().toISOString();
const entry = `[${timestamp}] Call with customer (${agentName}): ${summary}`;
const notes = order.notes
? `${order.notes}\n${entry}`
: entry;
await updateOrderNotes(orderId, { notes });
}
Error Handling
| Error Code | Cause | Solution |
|---|---|---|
NOT_FOUND | Order doesn’t exist | Verify order ID |
VALIDATION_ERROR | Notes exceed 5000 characters | Shorten the note text |
Related Endpoints
- Get Order - View current notes
- List Orders - Find orders
- Create Order - Create new orders
Authorizations
API key obtained from FlexPortal dashboard
Headers
Your tenant identifier
Path Parameters
The order ID
Body
application/json
Maximum string length:
5000Was this page helpful?