Provide proper invoice link via API
Provide proper invoice links via the API.
We are writing a script to send automatic reminders to people with open invoices. However, there seems to be no way to acquire a link to the invoice that the customer can use to pay. The API simply returns URLs that connect to the API. The "Email" link on invoice screens does produce a usable link (with a "seckey"), but must be clicked manually.
Is there any way for us to discover or generate a usable invoice link (like the "seckey" link in the emails you produce) via the WA API? Is there any way for us to force an email of an invoice via the API?
Would you consider adding such a "seckey" URL to the API response when invoices are requested?
-
Matthew Thomure commented
Hello dom,
I know this thread is very old but I just wanted to mention that it appears you should in fact be able do what you were asking. This is based on the new exposed URL structure for admins in the latest release.
Using the API, you can retrieve the Document Id for an invoice (not the same as the invoice number), then generate a link that looks like this, allowing you to go directly to a particular invoice as an administrator:
https://yourdomain.com/admin/invoices/details/?documentId=12345789&persistHeader=1
-
dom commented
Linking to /Sys/Profile/Finances would work for the user, but I don't want to send a user to the invoice page, I actually want to pull it up myself.
-
Matthew Thomure commented
Why don't you just send them a link to the Finances page in their user Profile?
http://yourdomain.com/Sys/Profile/Finances
Then they can pay any (or all) of their open invoices.