Provet Cloud veterinary practice management system can be integrated with third-party applications using tools called REST API and webhooks. This article describes the usage of these integration methodologies.
Webhooks are available in Provet Cloud to send notifications to third-party systems about additions or changes in the data inside Provet Cloud. The webhooks don't transfer the actual changed data, but instead, they transfer the information about what has changed by simply notifying the third-party system about the change. The actual data can then be fetched by the third-party system by utilising the REST API of Provet Cloud.
REST API is a communication method to access, edit or add to the data residing in Provet Cloud programmatically by any third-party application. Provet Cloud's REST API offers most of the key Provet Cloud data to be read or manipulated by other systems.
The combination of Provet Cloud webhooks & REST API creates unique possibilities for building integrated solutions. Any vendor of other systems familiar with these technologies can easily integrate with the data residing in the Provet Cloud veterinary practice management system by utilising these technologies.
Nordhealth offers consultancy to assist with the usage of the REST API & webhooks. For more information, see our developer site.
Case: If a third-party system (e.g. a financial system) would like to have immediate information about a newly created consultation in the Provet Cloud, this could be archived by combining the webhooks & REST API in the following way by utilising the consultation webhook.
-
A consultation is created in Provet Cloud.
-
Provet Cloud sends a consultation HTTP hook notification to the URL defined in the settings.
-
Webhook: Consultation create/update
-
Parameter: consultation_id=123 (consultation with ID 123 has been created)
-
-
Third-party system receives the hook and knows that consultation with ID 123 has been created in the Provet Cloud.
-
Third-party system requests the consultation with ID 123 data by using the REST API call.
-
Provet Cloud returns the data for the consultation with ID 123 in the JSON format.
-
Third-party system receives the data of the consultation and processes it in the desired way (and creates further REST API calls, if necessary).
Webhooks are configured and enabled in Settings > General > Integrations > Webhooks.
-
Example: “consultation_id=123”
-
If the response is other than HTTP 200, the notification delivery will be retried
-
On the settings page, you can also see an up-to-date list of triggered webhooks and their delivery status. A log is available for the review
-
Leaving the clinic location field empty will make the webhook work across the entire organization.
-
Certain actions where clinic locations cannot be inferred, such as updating clients and patients through the REST API, do not trigger clinic location specific webhooks.
-
Webhooks are HTTP POST requests to the URL defined in the settings for each webhook
-
The POST request has data identifying what type of data was updated, and the ID of the object
-
Webhooks expect to receive an HTTP 200 response on the successful process
-
Webhooks can be set to be clinic location specific, in which case they only trigger when items on a certain clinic location are updated, or can be set to be organization-wide, in which case they always trigger.
-
Multiple webhooks can be set for the same trigger and/or clinic location, and updates will trigger all of the webhooks that apply in the situation.
-
Webhooks can be given an optional name to help identify and differentiate them.
-
No longer needed webhooks can be disabled by unchecking the Active checkbox.
The following Webhook events are currently available in the settings of the Provet Cloud. Each of the hooks can have a different (or same) URL address, to which the Provet Cloud sends the hook when triggered at the event.
-
Accounting report: parameter accountingreport_id
-
Appointment: parameter appointment_id
-
Appointment delete: parameter appointment_id
-
Appointment reminder create: parameter reminder_id
-
Appointment reminder update: parameter reminder_id
-
Appointment reminder delete: parameter reminder_id
-
Cabinet item cancel use: parameter item id
-
Cabinet item use: parameter item id
-
Client: parameter client_id
-
Client delete: parameter client_id
-
Client communication preference: parameter communication preference id
-
Consultation create/update:: parameter consultation_id
-
Consultation delete: parameter consultation_id
-
Consultation finalised: parameter consultation_id
-
Consultation item: parameter consultationitem_id
-
Consultation waiting discharge: parameter consultation_id
-
Diagnostic imaging worklist: parameter diagnosticimagingworklist_id
-
Diagnostic imaging worklist update: parameter diagnosticimagingworklist_id
-
Diagnostic imaging worklist delete: parameter diagnosticimagingworklist_id
-
Email sent log
-
Health plan status update
-
Insurance claim: parameter insuranceclaim_id
-
Invoice: parameter invoice id
-
Invoice draft (notifies when a draft invoice is updated or items added automatically): parameter invoice id
-
Invoice payment: parameter invoicepayment_id
-
Invoice row delete
-
Laboratory request (referral): parameter laboratory_referral_id
-
Notes & communication
-
Organization cabinet item: parameter item_id
-
Organization food: parameter item_id
-
Organization item: : parameter item_id
-
Organization laboratory analysisis: parameter item_id
-
Organization laboratory analysis panel: parameter item_id
-
Organization medicine: parameter item_id
-
Organization procedure: parameter item_id
-
Organization supply: parameter item_id
-
Patient: parameter patient_id
-
Patient Referral create
-
Patient referral feedback sent
-
Reminder create/modify
-
Reminder delete
-
Reminder template delete
-
SMS sent log
-
Stock item entry
-
Stock item entry delete
-
Stock order
-
Stock order delete
-
Stock order item
-
Stock order item delete
-
Treatment plan
-
Treatment plan delete
-
Treatment plan item
-
Treatment plan item delete
-
Unallocated payment: parameter unallocatedpayment_id
-
User, parameter user id
Note
This list here was updated during August 2024. Additional hooks are being constantly developed based on requests from our users.
Provet Cloud provides the REST API for enabling access to the data stored in the Provet Cloud. The API uses OAuth 2.0 authentication. The data is returned in the JSON format.
-
To access the REST API, you must ask Provet Cloud Support to generate you an integration template
-
Provet Cloud API support two grant types: Authorization Code and Client Credentials.
-
Authorization Code is used for authenticating user interfaces and cases where users access the API as themselves. PKCE is supported and highly recommended. Public clients MUST use PKCE.
-
Client Credentials is used for backend connectivity where services communicate directly with another without any user actions.
-
-
-
The REST API can be accessed by using a URL compiled as follows: https://<provet_environment>/<provet_id>/api/0.1/
-
<provet_environment> URL differs a bit for each environment. It can be, for example
-
provetcloud.com for EU environment
-
us.provetcloud.com for USA environment
-
-
In the URL <provet_id> is the unique id of the Provet Cloud instance for your company
-
The whole URL is always shown in API settings in Provet Cloud Settings > Integrations > Open API access.
-
Provet Cloud REST API is browseable , which should allow a good possibility for developers to evaluate the possibilities of data transfer.
Once the template is created, the integration can be seen in the integration catalogue in Provet Cloud: Settings > Integrations > Open API access > Add Application. The catalogue lists the available integrations and has a short description of what each integration does. If the integration has more setup instructions, that is shown in the catalogue too.
The integrations can have restricted visibility: they can be restricted to only certain Provet Cloud tenants or in certain countries. The third party providing the integration can choose how widely the integration needs to be visible on the tenants. When there are restrictions, the application is shown in Integration Catalogue only on those tenants / in those countries that it is allowed on.
Every time a new client registers to use an integration i.e. chooses it from the integration catalogue in Provet Cloud (Add Application), unique client credentials are sent to the integration provider. There are two options for notifying a registration of a new client that can be chosen when creating an integration template:
-
email
-
hookup URL
When the integration is used only on one Provet Cloud instance, email is a good choice: then the person receiving the email can configure the authentication details to the integration and start using it. On the other hand, when the integration is widely used, hookup URL and automating adding a new client is recommended.
Hookup URL is listening for any automated notifications of new clients. When a new client adds the integration in Provet Cloud, the orchestration tool sends automatically a JSON message to that given URL. There isn't a need for any human interaction, when the integration automatically parses the new client from the JSON message and adds their credentials to their client table.
JSON schema for the data sent for new integration registrations:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "required": [ "provet_id", "client_id", "client_secret", "algorithm", "authorization_grant_type", "client_type", "redirect_uris", "token_url", "authorize_url", "openid_autodiscovery_url" ], "properties": { "provet_id": { "type": "number", "description": "Provet ID of the tenant who added this integration." }, "client_id": { "type": "string" }, "client_secret": { "type": ["null", "string"] }, "algorithm": { "type": ["null", "string"], "description": "Signing algorithm used.", "examples": [null, "HS256", "RS256"] }, "authorization_grant_type": { "type": "string", "description": "Authorization flow used.", "examples": ["authorization-code", "client-credentials"] }, "client_type": { "type": "string", "description": "Client type.", "examples": ["confidential", "public"] }, "redirect_uris": { "type": "string", "description": "Space-separated list of callback URIs.", "examples": ["https://example.com/callback"] }, "token_url": { "type": "string", "description": "OAuth2.0 token endpoint URL." }, "authorize_url": { "type": "string", "description": "OAuth2.0 authorize endpoint URL." }, "openid_autodiscovery_url": { "type": ["null", "string"], "description": "OpenID autodiscovery URL. Null if integration does not use OpenID." } } }
The REST API can be used to read most of the data and create/update some selected parts of the data. The first page of the browsable API lists all of the objects that can be accessed. Here’s the list of the most common objects.
Generic |
|||||
Name |
C |
U |
D |
Description |
Endpoint |
Custom field |
Custom fields defined in settings; they can be used on patients and clients, for example |
||||
Custom field value |
If custom fields are used on a patient X, they will generate a row here |
||||
Note |
Notes residing in section “Notes & Communication” in patient’s/client’s page |
||||
Task |
Tasks for veterinarians |
||||
Reminder |
Reminders for patients |
||||
Reminder template |
Template for creating reminders |
Client & Patient |
|||||
Name |
C |
U |
D |
Description |
Endpoint |
Client |
Client for patient |
||||
Patient |
Patient |
||||
Phone number |
Phone numbers for clients |
||||
Imported history |
Allows importing patient history from old systems in specific format |
Invoicing |
|||||
Name |
C |
U |
D |
Description |
Endpoint |
Invoice |
Invoices for clients |
||||
Invoice Row |
Invoice rows of invoices |
||||
Invoice payment |
Payments on invoices |
||||
Prepayment |
Prepayment (also known as unallocated payments) on clients. Can be used to pay a future invoice |
||||
Payment method |
Available payment methods in the system |
||||
Insurance claim |
Insurance claims for patients |
||||
Insurance claim client |
Dummy client copied from client-data for insurance claim |
||||
Insurance claim patient |
Dummy patient copied from patient-data for insurance claim |
Organisation |
|||||
Name |
C |
U |
D |
Description |
Endpoint |
Clinic location |
Clinic locations |
||||
Clinic location group |
Group of clinic locations |
||||
User |
User account of provet cloud |
||||
User details |
Additional information about the user |
||||
User group |
Users work group, relates to user access |
||||
Item list |
Item list contains X number of items. Clinic locations are subscribed to one item list and they’ll use it on consultations and countersales |
||||
Item |
Items in settings. A general extendable model for all items. Contains sub types: Procedure, Medicine, Supply, Food, Laboratory analysis, Laboratory analysis panel |
||||
Item group |
Also known as invoice group. Items can be grouped by subgroup information that is filterable in some searches |
||||
VAT group |
Organization’s VAT groups |
||||
Text template |
Custom text templates to be used around ProvetCloud, for example, consultation notes and discharge instructions |
||||
Item template |
Item templates in settings.Describes a set of items |
||||
Item template item |
An item, or item template in item template of settings |
||||
Alternative pricing |
Alternative pricing options for item, for example allowing cheaper bulk sale for certain amount |
||||
Lists |
Custom lists in settings for, for example, species and breeds |
||||
List items |
A list item in custom lists in settings |
||||
Codelists |
More convenient way to view list items. Contains only active list items, but can list codes that do not come from database, like VeNom codes for example |
||||
Holding place number |
Related to production animal features; a numerical information for patient’s holding place |
Stock |
|||||
Name |
C |
U |
D |
Description |
Endpoint |
Level |
All stock items and their levels |
||||
Location |
Location where the stock is held |
||||
Batch |
Stock batches for stock items |
||||
Entry |
Stock entries (usages) for stock items |
||||
Wholesaler |
Wholesalers for making orders |
||||
Order |
Product order to wholesaler |
||||
Order item |
Item in product order |
Diagnostic imaging |
|||||
Name |
C |
U |
D |
Description |
Endpoint |
Worklist |
Worklist entries for diagnostic imaging referrals |
||||
Modality |
Modality for diagnostic imaging |
||||
Category |
Diagnostic imaging category |
||||
Sub-category |
Sub-category for diagnostic imaging categories |
||||
Target area |
Target area for modality |
||||
Resource |
Resource for diagnostic imaging |
Consultation |
|||||
Name |
C |
U |
D |
Description |
Endpoint |
Consultation |
Consultation for client and patient(s) |
||||
Item |
Base Item for items added to consultation. Contains subtypes: Procedure, Medicine, Supply, Food, Laboratory analysis |
||||
Treatment plan |
Treatment plan that contains information about items to be used in future |
||||
Treatment plan item |
Plan item of treatment plan. |
||||
Estimate |
Estimation for consultation |
||||
Estimate item |
Item added for consultation estimate |
||||
Item template |
Item templates (also known as consultation bundles) that have been added to a consultation |
||||
Laboratory referral |
Referral (also known as request) for consultation |
||||
Laboratory sample |
A sample containing consultation analyses and panels for consultation |
||||
Diagnostic imaging referral |
Referral (also known as request) for consultation |
||||
Diagnostic imaging target area |
Target area used during consultation |
Scheduling |
|||||
Name |
C |
U |
D |
Description |
Endpoint |
Appointment |
Appointments for patients. Also known as Scheduling event |
||||
Shift |
Shifts for users |
||||
Shift type |
Types for shifts defined in settings |
||||
Reason |
Reason for appointment |
||||
Reason group |
Reason groups can be clinic location specific. Used to group reasons in searches |
||||
Cancellation reason |
|||||
Triage |
An instance holding information about triage events |
||||
Triage category |
Categories for triage in settings |
||||
Triage entry |
One event in triage |
||||
Veterinarians availability |
Returns available shifts for veterinarians on the given time period |
||||
On-line booking client |
Dummy client created for online booking appointment |
||||
On-line booking patient |
Dummy patient created for online booking appointment |
When a new integration application is added to Provet Cloud, a virtual user is automatically created for that integration. The virtual user is called Integration <Integration name> and can be found in Provet Cloud user settings under the Virtual tab. The virtual user is by default assigned to permission group Users.
If the integration needs different permissions (some endpoints are denied or you want to restrict the permissions), we recommend to create a new permission group just for that one virtual user:
-
Either copy an existing permission group or create a new one and rename it with a descriptive name, for example same name as the integration.
-
Grant the group the needed permissions. Check from Provet Cloud API schema, which permissions does each endpoint need. Check also Managing user permissions and groups.
-
Edit the virtual user and add the user to the new permission group (field Default Permission Group). The user doesn't have a Work role either so you have to choose that as well. Technical is the role meant for virtual users like the integration's user.
To get information about a consultation with ID number 338, an HTTP GET request with the authentication parameters would be sent to the following URL: https://provetcloud.com/<provet_id>/api/0.1/consultation/338/
Response example:
{ "url": "https://provetcloud.com/<provet_id>/api/0.1/consultation/338/", "client": "https://provetcloud.com/<provet_id>/api/0.1/client/1/", "patients": [ "https://provetcloud.com/<provet_id>/api/0.1/patient/1/" ], "complaint": "Test consultation", "admitted_time": "2017-05-18T10:35:00Z", "first_entry": null, "started": "2017-05-18T10:35:00Z", "finished": null, "ended": null, "status": 8, "type": 0, "invoice": "https://provetcloud.com/api/<provet_id>/0.1/invoice/609/", "supervising_veterinarian": "https://provetcloud.com/api/<provet_id>/0.1/user/1/", "clinic location": "https://provetcloud.com/<provet_id>/api/0.1/clinic location/1/", "consultation_items": [ "https://provetcloud.com/<provet_id>/api/0.1/consultationitem/4558/", "https://provetcloud.com/<provet_id>/api/0.1/consultationitem/4559/", "https://provetcloud.com/<provet_id>/api/0.1/consultationitem/4560/" ], "reporting_dimension_1": null, "reporting_dimension_2": null }
From the response it is possible to further find the ID of the invoice, that is related to this consultation, as well as all other entities that are related to this consultation. Those can be then acquired by further REST API calls.
Some endpoints have fields that can be used to filter the results. The filterable fields can be seen at the top of your Provet Cloud REST API endpoint page (eg. https://provetcloud.com/<provet_id>/api/0.1/consultation/) if the endpoint has filterable fields.
The following methods are available for filtering (synonyms are comma-separated):
-
is, eq (equal)
-
is_not, not_eq, neq (not equal)
-
lt (less than)
-
lte (less than or equal)
-
gt (greater than)
-
gte (greater than or equal)
-
range (values between, needs two values in order [from,to])
-
not_in_range (above inversed)
-
contains (text contains the searched text, case-sensitive)
-
contains_not (above inversed)
-
icontains (text contains the searched text, case-insensitive)
-
icontains_not (above inversed)
-
in (item is found in the given list [value1,value2,value3])
-
not_in (above inversed)
-
is_null (true or false)
The filtering methods can be used with query parameters using the following syntaxes:
[field]__[method]=value (eg. client__is=10 which uses the id of the client for the search)
[field].[property]__[method]=value (eg. client.id__is=10)
Note that dates should be given for the query parameters in the format YYYY-MM-DD hh:mm+[TimeZone]hh:mm (eg. 2017-12-24 15:30+00:00) .
If we need to find all consultations with the conditions
-
complaint contains the word “vacc” (case-insensitive)
-
the admitted_time is between 2017-12-01 00:00+00:00 (greater than or equal) and 2018-01-01 00:00+00:00 (less than)
-
clinic location id is 1
-
client id is 10
-
one of the patients’ id in the consultation is 20
we would use the following url:
https://provetcloud.com/<provet_id>/api/0.1/consultation/?complaint__icontains=vacc&admitted_time__gte=2017-12-01 00:00%2B00:00&admitted_time__lt=2018-01-01 00:00%2B00:00&clinic location__is=1&client__is=10&patients__is=20
Note that "+" signs are URL encoded (%2B) in the above example for the URL to work.
If we need to find all consultations where
-
the client’s first name is John and
-
the client’s last name is Doe
we would use the following URL:
https://provetcloud.com/ <provet_id>/api/0.1/consultation/?client.firstname__is=John&client.lastname__is=Doe
Some endpoints have fields that can be exposed, which will then show some of the inner fields of the exposed object. The exposable fields can be seen at the top of your Provet Cloud REST API endpoint page (eg. https://provetcloud.com/<provet_id>/api/0.1/invoicerow/) if the endpoint has exposable fields. To expose a field, you can add ?expose_<field_name> into the URL, much like filters are used.
When you have developed and tested your integration and want to release it to public use, contact Provet Cloud support to get your Integration Template visible to all Provet Cloud instances. If your integration is not customer specific and it is meant to be used in many Provet Cloud instances by many users, there are some requirements to be met before going live. These requirements are meant to make the integration onboarding easier and provide needed information for Provet Cloud support.
-
Create a short video about your integration: how to use it and what it does.
-
Create an onboarding instruction that contains all the manual steps needed from the Provet Cloud user to take your integration into use. The steps can include the actions needed in your system as well.
-
See this example onboarding guide. The example integration uses one webhook, but your integration might need some other configuration like a custom field etc.
-
-
Provide us both the video and the onboarding guide and let us know on which markets / in which countries should your integration be visible in.
Updated
Comments
1 comment
Broken link removed.
Please sign in to leave a comment.