How to link to a stored invoice pdf with civicrm api
Invoices can be send via email or can be downloaded. Both create an activity (of type "Emailed Invoice" or "Downloaded Invoice"). The invoice pdfs are attached to that activity.

When you first get the activity via the API and collect the Activity ID, you can get information about the attachment via the "Attachment-Get" API function, where "entity_table" then should be "civicrm_activity" and "entity_id" should be the activity id.

For example in php:

$result = civicrm_api3('Attachment', 'get', array(
  'sequential' =&gt; 1,
  'entity_table' =&gt; "civicrm_activity",
  'entity_id' =&gt; #activity_id#,
));