API reference

Notifications

In-app notifications and reminder settings.

More about this resource

In-app notifications for buyer and supplier events (approvals, discrepancies, payments), plus supplier-side reminder autonomy.

List notifications

Lists your most recent notifications.

GET/v1/workspaces/{regionId}/notifications

Parameters

  • audience"buyer" | "supplier"Required

    Which side's notification feed to return.

Returns

200 OK with the object shown in the response.

More details

Lists up to the 50 most recent notifications for the given audience, newest first. Notifications are kept for 90 days. Use ListNotificationsPage to page through older ones.

Response fields

  • title, bodystring

    English, as written when the notification was created. Slack, Teams and email show the same text.

  • titleMessageId, titleParams, bodyMessageId, bodyParamsstring, object

    The message each text was built from and the values it was filled with, so an app can show it in its reader's language. Absent on notifications created before they existed; show title and body then.

  • resolutionobject

    Only on an approval request (po_approval_requested, invoice_approval_requested) or a needs-an-approver notice (po_needs_approver, invoice_needs_approver) that no longer needs its reader, worked out when listed and never stored: outcome you_approved or you_rejected (with at) when the reader decided the step, otherwise no_longer_needed (someone else decided, the step was reassigned, or the document left approval). Absent while it still needs them.

Errors

  • 401 Unauthorized - No credential was presented, or the Bearer token / X-Api-Key value is missing, invalid, expired, or revoked.
  • 403 Forbidden - The caller's Bearer token or API key doesn't grant access to this workspace (regionId), or lacks the required role.
GET /v1/workspaces/{regionId}/notifications
Request
curl "$PLEAXY_API_BASE_URL/v1/workspaces/{regionId}/notifications" \
  -H "X-Api-Key: $PLEAXY_API_KEY"
Response · 200 OK
[
   {
      "id": "string",
      "audience": "buyer" | "supplier",
      "type": "report_ready" | "company_report_ready" | "po_approved" | "po_rejected" | "po_canceled" | "po_changed" | "po_approval_requested" | "request_approval_requested" | "request_approved" | "request_rejected" | "request_ordered" | "po_store_order_problem" | "po_supplier_confirmed" | "po_supplier_exception" | "po_shipped" | "po_supplier_email" | "po_changes_declined" | "po_needs_approver" | "invoice_submitted" | "invoice_ready_for_approval" | "invoice_approval_requested" | "invoice_discrepancy" | "invoice_approved" | "invoice_paid" | "invoice_payment_withdrawn" | "payments_recorded_by_key" | "accounting_sync_failed" | "invoice_remittance_sent" | "invoice_payment_failed" | "invoice_reminder" | "invoice_rejected" | "invoice_on_hold" | "invoice_hold_released" | "invoice_payment_reminder" | "invoice_entered_by_buyer" | "invoice_bank_details_to_confirm" | "invoice_bank_details_confirmed" | "invoice_bank_details_disputed" | "invoice_bank_details_changed" | "invoice_needs_approver" | "ses_approval_requested" | "ses_auto_approved" | "ses_approved" | "ses_rejected" | "receipt_return_recorded" | "po_line_due" | "po_line_due_asked" | "po_receipt_requested" | "invoice_held_due_soon" | "ses_approval_overdue" | "credit_note_received" | "credit_note_accepted" | "credit_note_rejected" | "credit_note_applied" | "invoice_comment" | "po_comment" | "contract_comment" | "invoice_feed_changed" | "supplier_connection_invited" | "supplier_connection_submitted" | "supplier_connection_approved" | "supplier_connection_rejected" | "supplier_connection_region_mismatch" | "agent_request" | "support_case_opened" | "support_case_updated" | "supplier_late_fee_terms_changed" | "contract_terms_to_acknowledge" | "contract_terms_acknowledged" | "contract_terms_disputed" | "contract_recheck_requested" | "contract_sent_to_joined_supplier" | "copilot_allowance_80" | "copilot_allowance_100" | "copilot_degraded" | "copilot_packs_low" | "copilot_packs_empty" | "copilot_payg_cap",
      "title": "string",
      "body": "string",
      "titleMessageId": "string",
      "titleParams": { },
      "bodyMessageId": "string",
      "bodyParams": { },
      "relatedId": "string",
      "createdAt": "string",
      "read": boolean,
      "resolution": { "outcome": "you_approved" | "you_rejected" | "no_longer_needed", "at": "string" }
   }
]

List notifications page

Lists notifications one page at a time.

GET/v1/workspaces/{regionId}/notifications/inbox

Parameters

  • audience"buyer" | "supplier"Required

    Which side's notification feed to return.

  • limitnumber

    Page size, 1 to 50. Defaults to 20.

  • cursorstring

    The nextCursor from the previous page. Omit it for the newest page.

Returns

200 OK with the object shown in the response.

More details

Lists notifications for the given audience one page at a time, newest first. Pass a page's nextCursor back as cursor to get the next older page. A page can be shorter than limit, or even empty, and still have a nextCursor, so keep going until nextCursor is absent. Notifications are kept for 90 days.

Response fields

  • itemsNotification[]

    This page's notifications, newest first.

  • title, bodystring

    English, as written when the notification was created. Slack, Teams and email show the same text.

  • titleMessageId, titleParams, bodyMessageId, bodyParamsstring, object

    The message each text was built from and the values it was filled with, so an app can show it in its reader's language. Absent on notifications created before they existed; show title and body then.

  • resolutionobject

    Only on an approval request (po_approval_requested, invoice_approval_requested) or a needs-an-approver notice (po_needs_approver, invoice_needs_approver) that no longer needs its reader, worked out when listed and never stored: outcome you_approved or you_rejected (with at) when the reader decided the step, otherwise no_longer_needed (someone else decided, the step was reassigned, or the document left approval). Absent while it still needs them.

  • nextCursorstring

    Opaque. Absent when there are no older notifications.

  • unreadCountnumber

    Unread notifications visible to you, counted up to 10 (a value of 10 means 10 or more). Returned on the first page only (no cursor).

Errors

  • 400 Bad Request - The cursor is not one this API issued, or limit is outside 1 to 50.
  • 401 Unauthorized - No credential was presented, or the Bearer token / X-Api-Key value is missing, invalid, expired, or revoked.
  • 403 Forbidden - The caller's Bearer token or API key doesn't grant access to this workspace (regionId), or lacks the required role.
GET /v1/workspaces/{regionId}/notifications/inbox
Request
curl "$PLEAXY_API_BASE_URL/v1/workspaces/{regionId}/notifications/inbox" \
  -H "X-Api-Key: $PLEAXY_API_KEY"
Response · 200 OK
{
   "items": [
      {
         "id": "string",
         "audience": "buyer" | "supplier",
         "type": "report_ready" | "company_report_ready" | "po_approved" | "po_rejected" | "po_canceled" | "po_changed" | "po_approval_requested" | "request_approval_requested" | "request_approved" | "request_rejected" | "request_ordered" | "po_store_order_problem" | "po_supplier_confirmed" | "po_supplier_exception" | "po_shipped" | "po_supplier_email" | "po_changes_declined" | "po_needs_approver" | "invoice_submitted" | "invoice_ready_for_approval" | "invoice_approval_requested" | "invoice_discrepancy" | "invoice_approved" | "invoice_paid" | "invoice_payment_withdrawn" | "payments_recorded_by_key" | "accounting_sync_failed" | "invoice_remittance_sent" | "invoice_payment_failed" | "invoice_reminder" | "invoice_rejected" | "invoice_on_hold" | "invoice_hold_released" | "invoice_payment_reminder" | "invoice_entered_by_buyer" | "invoice_bank_details_to_confirm" | "invoice_bank_details_confirmed" | "invoice_bank_details_disputed" | "invoice_bank_details_changed" | "invoice_needs_approver" | "ses_approval_requested" | "ses_auto_approved" | "ses_approved" | "ses_rejected" | "receipt_return_recorded" | "po_line_due" | "po_line_due_asked" | "po_receipt_requested" | "invoice_held_due_soon" | "ses_approval_overdue" | "credit_note_received" | "credit_note_accepted" | "credit_note_rejected" | "credit_note_applied" | "invoice_comment" | "po_comment" | "contract_comment" | "invoice_feed_changed" | "supplier_connection_invited" | "supplier_connection_submitted" | "supplier_connection_approved" | "supplier_connection_rejected" | "supplier_connection_region_mismatch" | "agent_request" | "support_case_opened" | "support_case_updated" | "supplier_late_fee_terms_changed" | "contract_terms_to_acknowledge" | "contract_terms_acknowledged" | "contract_terms_disputed" | "contract_recheck_requested" | "contract_sent_to_joined_supplier" | "copilot_allowance_80" | "copilot_allowance_100" | "copilot_degraded" | "copilot_packs_low" | "copilot_packs_empty" | "copilot_payg_cap",
         "title": "string",
         "body": "string",
         "titleMessageId": "string",
         "titleParams": { },
         "bodyMessageId": "string",
         "bodyParams": { },
         "relatedId": "string",
         "createdAt": "string",
         "read": boolean,
         "resolution": { "outcome": "you_approved" | "you_rejected" | "no_longer_needed", "at": "string" }
      }
   ],
   "nextCursor": "string",
   "unreadCount": number
}

Mark notification read

Marks a notification as read.

POST/v1/workspaces/{regionId}/notifications/{notificationId}/read

Parameters

  • notificationIdstringRequired

    The notification identifier.

Returns

201 Created with the object shown in the response.

More details

Marks a single notification as read. Silently succeeds if the notification doesn't exist.

Errors

  • 401 Unauthorized - No credential was presented, or the Bearer token / X-Api-Key value is missing, invalid, expired, or revoked.
  • 403 Forbidden - The caller's Bearer token or API key doesn't grant access to this workspace (regionId), or lacks the required role.
POST /v1/workspaces/{regionId}/notifications/{notificationId}/read
Request
curl -X POST "$PLEAXY_API_BASE_URL/v1/workspaces/{regionId}/notifications/{notificationId}/read" \
  -H "X-Api-Key: $PLEAXY_API_KEY"
Response · 201 Created
(no content)

Mark all notifications read

Marks all your notifications as read.

POST/v1/workspaces/{regionId}/notifications/read-all

Parameters

  • audience"buyer" | "supplier"Required

    Which side's notifications to mark read.

  • cursorstring

    The nextCursor from the previous call, to continue where it stopped. Omit it to start from the newest.

Returns

201 Created with the object shown in the response.

More details

Marks the unread notifications visible to you for the given audience as read. Read state is shared: a notification sent to the whole workspace is marked read for everyone who can see it. One call marks up to 200; when remaining is true, call again with nextCursor to mark the rest.

Response fields

  • updatednumber

    How many notifications this call marked read.

  • remainingboolean

    True when this call stopped at its limit and unread notifications may remain.

  • nextCursorstring

    Opaque. Present when remaining is true; pass it back as cursor on the next call.

Errors

  • 400 Bad Request - The cursor is not one this API issued.
  • 401 Unauthorized - No credential was presented, or the Bearer token / X-Api-Key value is missing, invalid, expired, or revoked.
  • 403 Forbidden - The caller's Bearer token or API key doesn't grant access to this workspace (regionId), or lacks the required role.
POST /v1/workspaces/{regionId}/notifications/read-all
Request
curl -X POST "$PLEAXY_API_BASE_URL/v1/workspaces/{regionId}/notifications/read-all" \
  -H "X-Api-Key: $PLEAXY_API_KEY"
Response · 201 Created
{
   "updated": number,
   "remaining": boolean,
   "nextCursor": "string"
}

Get reminder settings

Returns the automatic reminder settings.

GET/v1/workspaces/{regionId}/notifications/reminder-settings

Returns

200 OK with the object shown in the response.

More details

Returns the workspace's reminder-autonomy settings, defaulting to { enabled: false, idleDays: 3 } if never configured.

Response fields

  • idleDaysnumber

    Days an invoice can sit idle in the same approval stage before an automatic reminder fires.

Errors

  • 401 Unauthorized - No credential was presented, or the Bearer token / X-Api-Key value is missing, invalid, expired, or revoked.
  • 403 Forbidden - The caller's Bearer token or API key doesn't grant access to this workspace (regionId), or lacks the required role.
GET /v1/workspaces/{regionId}/notifications/reminder-settings
Request
curl "$PLEAXY_API_BASE_URL/v1/workspaces/{regionId}/notifications/reminder-settings" \
  -H "X-Api-Key: $PLEAXY_API_KEY"
Response · 200 OK
{
   "enabled": boolean,
   "idleDays": number
}

Update reminder settings

Updates the automatic reminder settings.

PATCH/v1/workspaces/{regionId}/notifications/reminder-settings

Body

  • enabledboolean

    Turn automatic reminders on or off.

  • idleDaysnumber

    New idle threshold in days.

Returns

200 OK with the object shown in the response.

More details

Updates one or more reminder-autonomy settings.

Errors

  • 401 Unauthorized - No credential was presented, or the Bearer token / X-Api-Key value is missing, invalid, expired, or revoked.
  • 403 Forbidden - The caller's Bearer token or API key doesn't grant access to this workspace (regionId), or lacks the required role.
PATCH /v1/workspaces/{regionId}/notifications/reminder-settings
Request
curl -X PATCH "$PLEAXY_API_BASE_URL/v1/workspaces/{regionId}/notifications/reminder-settings" \
  -H "X-Api-Key: $PLEAXY_API_KEY" \
  -H "Content-Type: application/json" \
  -d @body.json
body.json
{
   "enabled": boolean,
   "idleDays": number
}
Response · 200 OK
{
   "enabled": boolean,
   "idleDays": number
}
Talk to us