#Any way to get notifications grouped by Transaction IDs

1 messages · Page 1 of 1 (latest)

solar storm
#

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

Novu is an open-source notification infrastructure built for the engineering teams to help them build rich product notification experiences without constantly re-inventing the wheel.

steel pawn
#

You can use transactionId filter in query params

steel pawn
#

@solar storm did you try transactionId query params?

solar storm
#

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.

steel pawn
#

/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

solar storm
#

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 😬

lethal brookBOT
#

@solar storm, you just advanced to level 3!

steel pawn
#

You can give your custom transaction I'd in trigger api