send_notifications
Broadcasts a push notification to all mobile app users who have at least one order for a given event. Uses Firebase Cloud Messaging (FCM) multicast.
The function:
- Queries all
u_usersdocuments that have a non-emptyfcmToken - For each user, checks if they have any orders for the given
event_id - Batches FCM tokens in groups of 100 and sends
sendEachForMulticast - Records the notification and per-recipient delivery status in PostgreSQL (
notifications_sendandnotifications_send_detail)
Endpoint
Request
The Firestore event document ID. Only users with orders for this event receive the notification.
Notification title displayed on the device.
Notification body text.
URL of the notification icon image.
Response
Notifications sent:list_notifications
Queries notification delivery history from PostgreSQL, joining notifications_send_detail and notifications_send tables.
Endpoint
Request
All filters are optional. Omitting a filter returns all records.Filter by user UID to see notifications for a specific user.
Filter by event ID.
Start date filter on
date_send (ISO 8601 format).End date filter on
date_send (ISO 8601 format).