Prelude:
From what I learned about DroneDeploy API here:
http://developer.dronedeploy.com/applications, there is no possibility to get
Flight ID from dronedeployApi.Plans.getCurrentlyViewed() object. Though, I see
that it is the only unique value which goes with Export-ready emails and could
be perfect foreign key.
Question: how to get value of the Flight ID associated with particular plan programmatically?
My recommendation would be to not utilize the flight id. As far as the email is concerned, the user should already know what plan they have based on their own context. As far as your system is concerned, it is really recommended that you utilize webhooks, and embed relevant data in the webhook url. i.e.
`https://myddapp.heroku.com/exports/{plan.id}/{some_other_identifiable information}`You should also get an export.id in the body of the POST request, this should aid in further uniqueness.