The standard get notifications api call (https://docs.novu.co/api/get-notifications/) sends all the notifications sent to all users.
Is there a way to get notifications grouped by Transaction IDs so I can better manage notifications in bulk
1 messages · Page 1 of 1 (latest)
The standard get notifications api call (https://docs.novu.co/api/get-notifications/) sends all the notifications sent to all users.
Is there a way to get notifications grouped by Transaction IDs so I can better manage notifications in bulk
You can use transactionId filter in query params
@solar storm did you try transactionId query params?
Hey, that will only give me notifications for a single transactionId
@steel pawn what I want is a list of unique transaction IDs for a particular template.
/notifications endpoint support only one transactionId
We recently added multiple transactionId support in messages endpoint if that is helpful for you
Sample request
https://api.novu.co/v1/messages?transactionId[]=val1&transactionId[]=val2
My use-case right now is very unique which is why I think it won't make sense for Novu team to work on it 😅
So basically I want to schedule notifications, and novu allows us to assign a single transaction ID to all the messages that is to be sent which is very convenient.
For example: I want to schedule two notifications (payload: "HELLO" and payload: "WORLD") to 10 subscribers, 10 messages would have a certain transactionID and other 10 messages would have a certain transactionID
Now I want to be able to fetch a list of transaction IDs that are going to be sent or are sent (which are just 2). but instead I get all 20 individual messages.
This is useful when I want to cancel scheduled transactionIds
output would be something like this if it were an SQL query 😬
@solar storm, you just advanced to level 3!
You can give your custom transaction I'd in trigger api