How to get the pushId/deviceId a notification was sent to?

I want to save all responses from sending a push notification to a device, whether it was successful or if it had an error I need to save it.

To do this, I would need the pushId the notification was sent to, how can I retrieve this as when I use the ticket id to then get the receipt, if it was successful all it shows is an object with the property ‘status’ as ‘ok’.