Update subscription notes
curl --request PATCH \
--url https://api-eu.flexportal.io/v1/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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>",
"rentalId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Subscriptions
Update Subscription Notes
Updates the notes field on a subscription.
PATCH
/
v1
/
subscriptions
/
{subscriptionId}
/
notes
Update subscription notes
curl --request PATCH \
--url https://api-eu.flexportal.io/v1/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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/subscriptions/{subscriptionId}/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>",
"rentalId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Overview
Update the notes field on a subscription. Use this to add internal comments, support ticket references, or any relevant information about the subscription.Request Fields
| Field | Required | Description |
|---|---|---|
notes | Yes | Note text (max 5000 characters) |
Example Request
{
"notes": "Customer prefers email communication only. Delivery scheduled for morning slots."
}
Response Fields
| Field | Description |
|---|---|
success | Always true on success |
message | Confirmation message |
rentalId | The updated subscription ID |
Common Use Cases
Support Tickets
Reference support interactions and resolutions
Customer Preferences
Record delivery, communication, or service preferences
Internal Notes
Add context for team members handling the account
Issue Tracking
Document known issues or special handling requirements
Example: Append to Existing Notes
Notes are replaced, not appended. To preserve existing notes:async function appendNote(subscriptionId, newNote) {
const subscription = await getSubscription(subscriptionId);
const timestamp = new Date().toISOString().split('T')[0];
const updatedNotes = subscription.notes
? `${subscription.notes}\n\n[${timestamp}] ${newNote}`
: `[${timestamp}] ${newNote}`;
return await updateSubscriptionNotes(subscriptionId, {
notes: updatedNotes
});
}
Example: Log Support Interaction
async function logSupportInteraction(subscriptionId, ticketId, summary) {
const subscription = await getSubscription(subscriptionId);
const entry = `Support ticket #${ticketId}: ${summary}`;
const notes = subscription.notes
? `${subscription.notes}\n${entry}`
: entry;
await updateSubscriptionNotes(subscriptionId, { notes });
}
Example: Bulk Update Notes
async function addNoteToActiveSubscriptions(customerId, note) {
const { subscriptions } = await listSubscriptions({
customerId,
status: 'active'
});
for (const sub of subscriptions) {
const updatedNotes = sub.notes
? `${sub.notes}\n${note}`
: note;
await updateSubscriptionNotes(sub.subscriptionId, {
notes: updatedNotes
});
}
return { updated: subscriptions.length };
}
Notes Best Practices
- Be concise but include relevant details
- Use timestamps when logging events
- Include references (ticket IDs, order numbers)
- Avoid sensitive data (use separate secure storage for PII)
Error Handling
| Error Code | Cause | Solution |
|---|---|---|
NOT_FOUND | Subscription doesn’t exist | Verify subscription ID |
VALIDATION_ERROR | Notes exceed 5000 characters | Shorten the note text |
Related Endpoints
- Get Subscription - View current notes
- List Subscriptions - Find subscriptions
Authorizations
API key obtained from FlexPortal dashboard
Headers
Your tenant identifier
Path Parameters
The subscription ID
Body
application/json
Maximum string length:
5000Was this page helpful?