-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request "Invoice" PDF URL #321
Comments
I think this should be doable! I will confirm early next week and reply here. |
Well well, it's proven to be harder than I anticipated. There are some things we need to discuss before we can introduce a PDF end point:
|
For the time being I've just engineered a solution which interfaces with the front end. At a guess the request flow on your side is:
So there's no pre-generated invoice PDFs sat anywhere, they're lazily created on fetch? Hence why we can push params to the generator func? At any rate, I think an endpoint to get the exact PDF currently being created by the frontend without any modifications would be a great v1. Though I understand that might then compromise the ease of being able to add modifications later whilst maintaining backwards compat. Long story short, I've worked around it for now, so take your time and do it your way :D |
Is there any way to use API token to "auth user"? What I whant to do is just open https://trainm3.au1.cliniko.com/patients/001/treatment_notes/111.pdf in new tab but currently will receive 401 error |
@DenisBogatirov that's not supported, you are authenticated to the API and not to the web app. |
@bpinto Is there any way to get link to the file through API? I'm making mobile app and it's crucial to have ability to download files. |
@DenisBogatirov you could link to the URL cliniko uses and open the link in a browser, the user will download it if they are logged into the cliniko app. If not, they will be asked to login first. |
It will not prompt login, and this app are for patients, so they don't have cliniko credentials |
You will need to front the request for the patient by either downloading the file, serving it and deleting it, or it might be possible to use a HTTP streaming response. However not sure if either is permitted or advisable (security/GDPR). 😅 |
Hi team, it would be really helpful if you could add a URL to the
Invoice
response which whenGET
would offer up the PDF render of that invoice.This has multiple applications, from archival, to automated bill submissions to insurance providers.
If there's a workaround for now, let me know, as given a recent change in the UK insurance environment it would now be very useful.
The text was updated successfully, but these errors were encountered: