pdf of bookings/reservations/tickets to Wallet Pass

My app tends to collect travel specific information from the user to help him during his trips. The user might have tickets/bookings/reservations that are not Passes in the Wallet app but just pdfs. I want that when the user shares these pdfs to my app using the share sheet, it converts them into Wallet Passes and lets the user add them to Wallet app.


My guess is my app will have to read the barcode or some booking number from the pdf and generate a PKPass from it.


Can someone point me in the right direction with regards to APIs or services I can use?


Thanks.