I am trying to use the Admin API to determine how many times an invoice has been sent to a customer. I thought that the Event API would be appropriate since, at least for Orders, I can get the kind information that would be useful. However since this is for drafts, I can't use the subject id (draft id) to get this info.
Am I missing something? Would there be an alternative to finding out for a given draft how many times an invoice has been sent to the respective customer? This is for a report to highlight non-responsive customers who've received an invoice email multiple times and still haven't paid.
Thanks! - Keith
Solved! Go to the solution
This is an accepted solution.
Hey @keithnyc ,
There's currently no exposed field in the Events API that would catalog the quantity of invoice sends on a draft order - for the moment, the best you would get is the status of the most recent invoice send.
Because of this, you would need to explore some creative workarounds for cataloging this information. One idea that came to mind with the team is applying tags to your drafts (manually or programmatically) with each invoice send that indicate the number of invoices associated with that order, eg: "8 invoices sent". You could use API to then bulk query for invoices that contain these tags, or filter using these tags for the sake of your report.