For all invoices, we need to fetch “DirectPreviewUri”. But it seems like only those invoices with "Status": "SENT" has this parameter. For invoices with different status, this “DirectPreviewUri” param isn’t returned by API.
Is it possible to get “DirectPreviewUri” for all other status eg. "Status": "PAIDFULL"?
If 1 is not supported, should we update invoice status to “SENT” to get “DirectPreviewUri”? Does updating invoice status have any impact like charging the customer again?
The DirectPreviewUri is only available for invoices that are “SENT”. I will need to double check if this is the intended case for paid invoices.
Was there something you were looking to do in particular? If you could share some details of your use case, maybe there’s another way of working it.
Changing the status to sent (from draft) would have the invoice visible to the client, in the same way, “flag invoice as sent” would do in the web interface
@QFMathew Thanks for your reply, we have a page showing a list of invoices return from invoice search API, We want to link to the invoice detail page when user clicks on the inovice from the list, therefore, we want to know which API can return a URL of a invoice (regardless of the status).
Would this be a page in their QuickFile account? As in, they would have access to the data directly in QuickFile and you just want to link through to it?
You could generate a URL using the ID, something like - https://account.quickfile.co.uk/sales/preview?invoiceID={{invoiceId}}
This would direct the user to the preview of the invoice. The same URL can also be used for estimates.
For the editing page, you just change preview to create: https://account.quickfile.co.uk/sales/create?invoiceID={{invoiceId}}
For both, you would need to change account to the account subdomain, which if you don’t know already, can be retrieved from the System_GetAccountDetails endpoint