App Logo
miro.com

Download a Miro invoice PDF

Download one Miro company billing invoice PDF, given the pdfUrl that miro.com/list_invoices returns. Saves the file to the device and returns its real filename plus the path it was saved to. Unlike the other download_invoice scripts it hands back a file on disk rather than the bytes inline, because Miro only releases these PDFs through a real browser download — so read the file from the returned path. Requires access to Miro company billing.

Input

pdfUrl required

The invoice's pdfUrl exactly as returned by miro.com/list_invoices (Miro's own billing payload supplies it). There is no way to derive this from an invoice id alone, so it is required.

id optional

The invoice id from the list row. Optional, used only to name the file when Miro's own download carries no real name.

Output

path required

Path on the device the PDF was saved to. Miro's PDFs go through the device download bridge rather than coming back as base64 — see the description.

filename required

The invoice's real filename, taken from the basename of the saved file. Neither the bridge's own filename field nor Miro's suggested name is usable: both are content-addressed hashes.

Start building not clicking