PVPipe Notifications API (1.0)

Download OpenAPI specification:

Real-time notification service with WebSocket, FCM/OneSignal push notifications, and asynchronous email processing

Devices

Get user's registered devices

Get all registered devices for the current user

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Register or update a device for push notifications

Register a device with FCM token and/or OneSignal player ID

Authorizations:
Bearer
Request Body schema: application/json
required

Device registration data

device_id
required
string
device_name
string
device_type
string
fcm_token
string
onesignal_player_id
string

Responses

Request samples

Content type
application/json
{
  • "device_id": "string",
  • "device_name": "string",
  • "device_type": "string",
  • "fcm_token": "string",
  • "onesignal_player_id": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Unregister a device

Remove a device registration for push notifications

Authorizations:
Bearer
path Parameters
device_id
required
string

Device ID

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Update device token

Update FCM token or OneSignal player ID for a specific device

Authorizations:
Bearer
path Parameters
device_id
required
string

Device ID

Request Body schema: application/json
required

Token update data

property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Notifications

Get notifications

Get paginated notifications for the current user

Authorizations:
Bearer
query Parameters
page
integer >= 1
Default: 1

Page number

limit
integer [ 1 .. 100 ]
Default: 20

Items per page

Responses

Response samples

Content type
application/json
{
  • "currentPage": 0,
  • "items": [
    ],
  • "totalItems": 0,
  • "totalPages": 0,
  • "unreadCount": 0
}

Mark all notifications as read

Mark all notifications as read for the current user

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

WebSocket endpoint for real-time notifications

Establish WebSocket connection for receiving real-time notifications

Authorizations:
Bearer

Mark notification as read

Mark a specific notification as read

Authorizations:
Bearer
path Parameters
id
required
string

Notification ID

Responses

Response samples

Content type
application/json
{
  • "createdAt": "string",
  • "id": "string",
  • "message": "string",
  • "readAt": "string",
  • "targetLink": "string",
  • "targetText": "string",
  • "unread": true
}

Internal

Process notification job

Process a notification job with multiple recipients and channels (internal use only)

Request Body schema: application/json
required

Notification job data

emailAttachments
string
emailTemplate
string
message
required
string
notifierId
integer
required
Array of objects (github_com_Tresor-Corp_ms-notifications_internal_models.NotificationJobRecipient) non-empty
scheduleAt
string
targetId
string
targetLink
string
targetText
string
targetType
string
title
string
triggerEvent
string

Responses

Request samples

Content type
application/json
{
  • "emailAttachments": "string",
  • "emailTemplate": "string",
  • "message": "string",
  • "notifierId": 0,
  • "recipients": [
    ],
  • "scheduleAt": "string",
  • "targetId": "string",
  • "targetLink": "string",
  • "targetText": "string",
  • "targetType": "string",
  • "title": "string",
  • "triggerEvent": "string"
}

Response samples

Content type
application/json
{
  • "jobId": "string",
  • "message": "string",
  • "processedRecipients": 0
}

Create a notification

Create a new notification (internal use only)

Request Body schema: application/json
required

Notification data

emailAttachments
string
object
emailTemplate
string
message
required
string
notifierId
integer
targetId
string
targetLink
string
targetText
string
targetType
string
title
string
triggerEvent
string
userId
required
integer

Responses

Request samples

Content type
application/json
{
  • "emailAttachments": "string",
  • "emailContext": { },
  • "emailTemplate": "string",
  • "message": "string",
  • "notifierId": 0,
  • "targetId": "string",
  • "targetLink": "string",
  • "targetText": "string",
  • "targetType": "string",
  • "title": "string",
  • "triggerEvent": "string",
  • "userId": 0
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Create multiple notifications

Create multiple notifications at once (internal use only)

Request Body schema: application/json
required

Array of notification data

Array
emailAttachments
string
object
emailTemplate
string
message
required
string
notifierId
integer
targetId
string
targetLink
string
targetText
string
targetType
string
title
string
triggerEvent
string
userId
required
integer

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "message": "string"
}