Skip to main content
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>"
}
'
{
  "success": true,
  "message": "<string>",
  "rentalId": "<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

FieldRequiredDescription
notesYesNote text (max 5000 characters)

Example Request

{
  "notes": "Customer prefers email communication only. Delivery scheduled for morning slots."
}

Response Fields

FieldDescription
successAlways true on success
messageConfirmation message
rentalIdThe 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 CodeCauseSolution
NOT_FOUNDSubscription doesn’t existVerify subscription ID
VALIDATION_ERRORNotes exceed 5000 charactersShorten the note text

Authorizations

Authorization
string
header
required

API key obtained from FlexPortal dashboard

Headers

Tenant-ID
string
required

Your tenant identifier

Path Parameters

subscriptionId
string
required

The subscription ID

Body

application/json
notes
string
required
Maximum string length: 5000

Response

Notes updated

success
enum<boolean>
required
Available options:
true,
false
message
string
required
rentalId
string
required