Introduction
Welcome to the ezyVet API Documentation Page!
The ezyVet API (API
moving forward) is designed around a RESTful interface and utilizes OAuth 2.0 Client Credentials grant. The API accepts URL params and JSON-formatted requests, and returns JSON-formatted responses.
Use the API
Issues
HTTP Errors
ezyVet's API may return a variety of error codes. Each error code depicts the type of error it is. Common error
codes can be found under Errors
.
Issue Reporting
It is quite possible that due to human error, there are discrepancies in our API documentation. If you find any areas
of the documentation that do not quite add up or are incorrect, please do let us know at apisupport@ezyvet.com
. We will
be most delighted to hear from you as you will be helping us improve our documentation, which means a lot to us.
The time when we really
need to know is when you receive an HTTP error code in the 5xx
range. This means we have made
a mistake somewhere that is halting you from using our API.
Regardless of the issue type or code, if it is stopping you from using our API and you have tried everything you can
to try and solve the problem, then please provide us with the following information at apisupport@ezyvet.com
so that we can try fix it as quick
as possible.
Information | Description |
---|---|
Timestamp | If you are able to provide us with a timestamp or range of times within which the error presented itself, it will greatly help in tracking down the issue. |
Request | The request that you sent to our RESTful API that triggered the error is very valuable to us as it allows our developers to reproduce the error. Ensure the request details provided to us is exactly what you sent to our API endpoint. This includes the URL and all its query parameters along with the body , if any. The more exact the information, the better. |
Response | The response is also very helpful. If you are able to provide the response you received from our API endpoint exactly as it presented itself, we can further examine it to find the root cause of the issue. A very important piece of information is the transaction_id value in the meta section of a response. If this value is present in the response, ensure to send it through to us. |
Additional Logs | If you have any additional logging you wish to share with us, please send it through as well as it can often prove very helpful for our developers. |
Code Snippets | We do not require code snippets, however, if you feel that you must provide us with code snippets in order for us to understand the issue at hand, then please feel free to send through code snippets. Please keep in mind that sharing any code snippets exposes that code to the public domain. If you wish to avoid this, do not send any code snippets through. |
Use Case | A description of what you were trying to achieve when this issue presented itself. This information is very important as often, we can provide workarounds while we resolve the issue at hand. |
Release Notes
ezyVet version v39.6
- Exposed GET endpoint for
Resource V2
endpoint. - Exposed GET endpoint for
Separation V2
endpoint.
ezyVet version v39.0
V1 API
- Added
date_of_birth
field to theContact V1
endpoint. - Added
driver_license_number
field to theContact V1
endpoint. - Added
driver_license_
field to theContact V1
endpoint. - Added
driver_license_
field to theContact V1
endpoint. - Added
serial_number
field to thePrescriptionItem V1
endpoint.
ezyVet version v38.6
V2 API
- Exposed GET endpoint for
Prescription V2
. - Exposed GET and POST endpoint for
Contactdetail V2
. - Updated GET for GET endpoint for
Contact V2
.
ezyVet version v38.1
V2 API
- Exposed GET endpoint for
Contact V2
.
ezyVet version 37.9
V2 API
- Exposed GET endpoint for
Appointment Type V2
- Universal identifiers have been added to
Appointment Type V2
ezyVet version 37.5
V1 API
- Exposed POST and PATCH for the
vaccination
endpoint, partners will now be able to use these operations. - Added
value_cleaned
field to thecontactdetail
endpoint.- Use the
value_cleaned
field to find the value of aContactDetail
where prefixes are added and special characters are stripped from phone numbers. - Use the
value_cleaned
query parameter to queryContactDetail
records by phone numbers without any special characters or formatting.
- Use the
ezyVet version 36.8
V1 API
- Exposed POST, PATCH and DELETE for the
address
endpoint, partners will now be able to use these operations.
V2 API
- Added validation to
appointment V2
endpoint to check that the query has thesales_resource
present in the list ofresources
when attempting to POST or PATCH.
ezyVet version 36.7
V1 and V2 API
- Added the
barcode
endpoint- Use the
for_type
to find the type of record that the Barcode is for. EG: "product". - Use the
for_id
to find the ID of the record that the Barcode is for.
- Use the
- Added the
website
field to thecontact
endpoint
ezyVet version 36.6
V1 API
- Added
contact_id
to theseparation
endpoint.
ezyVet version 36.4
V1 and V2 API
- Added a
date
field to theinvoiceline
andinvoicelineV2
endpoints.- Use the
date
field to know the date the the product on theinvoiceline
was administered on the related clinical record.
- Use the
- Added
preferred
andsubscription_groups
fields to thecontactdetail
endpoint.- Use the
preferred
field to find whichContactDetail
is a preferred contact method for the relatedContact
- Use the
subscription_groups
field to find a list of subscription groups that theContactDetail
is subscribed
- Use the
ezyVet version 36.2
V2 API
- When you change an ezyVet Go calendar, the applicable changes sync to ezyVet
- Added the
expected_price
field to theproductsupplier
endpoint - You can update product prices that have a maximum of four digits after the decimal point.
- Added a
date
field to thestocktransaction
endpoint.- Use the
date
field to know the date of an inventory transaction.
- Use the
ezyVet version 36.1
V2 API
- Increased the possible inventory locations that you can use with the
invoiceline
endpoint.
ezyVet version 35.9
V2 API
- Fixed an issue where Email/SMS communications created by the API wouldn't send
ezyVet version 35.4
V1 API
- Fixed an issue where the
invoice
was not showing credit invoices as linked records.- The
linked_payments
field now also shows credit invoices with a new parametertype
specifying invoice or payment.
- The
V2 API
- Added the
linked_payments
field to theinvoiceV2
endpoint
ezyVet version 40
V2 API
- Exposed GET endpoint for
Estimate V2
ezyVet version 40.2
V1 API
- Added
External Prescription
POST and PATCH endpoint.
ezyVet version 40.3
V1 API
- Added
External Prescription
DELETE endpoint.
ezyVet version 41.7
V2 API
- Added
type
query parameter to theSeparation V2
endpoint.- Use the
type
query parameter to querySeparation V2
records by type.
- Use the
ezyVet version 42
V2 API
- Added
ownership_id
andownership_uid
fields to theProduct Supplier
endpoint.
Features
Field Comparators
Sample #1: Fetch
Product
(s) whoseid
is exclusively between 5 and 10.
"/product?id=" + encodeURIComponent(JSON.stringify({">": 5, "<": 10}));
"/product?id=" + encodeURIComponent(JSON.stringify({"gt": 5, "gt": 10}));
"/product?id=%7B%22%3E%22%3A%205%2C%20%22%3C%22%3A%2010%7D";
Sample #2: Fetch
Product
(s) whoseid
is either 5, 8, or 11.
"/product?id=" + encodeURIComponent(JSON.stringify({"in": [5, 8, 11]}));
"/product?id=%7B%22in%22%3A%5B5%2C8%2C11%5D%7D";
Sample #3: Fetch
Product
(s) whosename
contains "250ml".
"/product?name=" + encodeURIComponent(JSON.stringify({"like": "250ml"}));
"/product?name=%7B%22like%22%3A%22250ml%22%7D";
Unless otherwise specified, each field from the params of GET requests will accept multiple comparators in URL-encoded JSON. The following comparators are supported:
Comparator | Arithmetic | String | Remarks |
---|---|---|---|
Less than | < | lt | - |
Less than or equal | <= | lte | - |
Equal | = | eq | - |
Greater than or equal | >= | gte | - |
Greater than | > | gt | - |
Not equal | - | neq | - |
Like | - | like | String fields only |
In | - | in | Similar Equal , except that it tries to find at least one match against many. |
Questions
Some API GET endpoints support Questions.
Questions return results from complex queries about a resource. For example, the Product
question stocklevel
will return various Product
stock level numbers, such as total stock, stock allocated to invoices and so on.
Limiting Results
Sometimes, you just want one result from your GET request, or maybe have DELETE and PATCH process only one record.
In order to do this, you just need to add limit
to the parameters (Range: 1 - 200, Default: 10)
Request Throttling
All endpoints are throttled at a certain number of requests per minute. This is to minimize the impact that API calls have on the performance of the system for users.
The throttle limits vary, depending on the endpoint and the data it provides, but most commonly is set to 60
calls per minute.
In addition to an end point specific rate limit there is also a global rate limit, which is by default set to 180
calls per clinic per Partner.
This allows multiple end points to be called within the same rate limit period (minute), collectively up to the global limit.
If the number of calls made exceeds the rate limit for the endpoint in any rate limit period, the API will restrict further calls and return a 429
error message.
One endpoint limit being reached will not restrict you from making calls to another that has not reached its own limit, while you remain within the global limit for that rate limit period.
Header | Description |
---|---|
x-ratelimit-limit | The maximum number of requests that can be made within the current throttling period. |
x-ratelimit-remaining | The number of requests remaining within the current throttling period. If this value is 30, then you have 30 requests remaining within the current throttling period. |
x-ratelimit-reset | The cooldown or reset/throttling period. After x-ratelimit-reset seconds have passed, the x-ratelimit-remaining quantity will be reset to the x-ratelimit-limit amount. |
x-item-limit-per-page | The maximum amount of records that can be requested per page, using the limit query parameter. |
Paging
On various results (mainly GET), you will notice the following under the meta[]
property. These are used for item page navigation of the request.
meta | Description |
---|---|
items_page |
Current page of the result. On requests, you can pass page to specify the page to be returned. (Default: 1) |
items_page_total |
Total number of pages that the same request will return. |
items_page_size |
Number of items per page. |
items_total |
Total number of items |
Errors
Code | Name | Description |
---|---|---|
400 | Bad Request | You have submitted an erroneous request. Check the URL, as well as all the input fields. |
401 | Unauthorized | Your request is not allowed. Check if your access token or client credential is valid. |
403 | Forbidden | The endpoint requested is either not allowed for you, or does not exist at all. |
405 | Method Not Allowed | The endpoint exists, but the HTTP method is not supported for it. |
422 | Unprocessable Entity | Your request itself is correct, but it fails one or more of our validation checks. Please see the error message in the response for details. |
500 | Internal Server Error | Oops, something's wrong on our end. :( Please check back later. |
Endpoints
Authentication
Fetch Access Token (Production)
Sample Request: Fetches an access token with permission to
GET
animals.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/oauth/access_token",
"method": "POST",
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"data": {
"partner_id": "partner12345",
"client_id": "id12345",
"client_secret": "secret12345",
"grant_type": "client_credentials",
"scope": "read-animal"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"access_token": "token12345",
"token_type": "Bearer",
"expires_in": 1209600
}
Fetches a valid access token, given client credentials. Access tokens have a 14-day TTL. You are allowed to have multiple tokens per credential set.
HTTP Request
POST https://api.ezyvet.com/v1/oauth/access_token
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
partner_id | string | - | Unique Partner ID, provided by ezyVet. |
client_id | string | - | Unique Client ID, provided by a clinic. |
client_secret | string | - | Client secret key, provided by a clinic. |
grant_type | string | client_credentials | OAuth2 grant type. |
scope | string | - | Access scope for the access token requested. Note that your client_id may not have permission to all scopes. |
Fetch Access Token (Sandbox)
Sample Request: Fetches an access token with permission to
GET
animals.
var settings = {
"crossDomain": true,
"url": "https://api.trial.ezyvet.com/v1/oauth/access_token",
"method": "POST",
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"data": {
"partner_id": "partner12345",
"client_id": "id12345",
"client_secret": "secret12345",
"grant_type": "client_credentials",
"scope": "read-animal"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"access_token": "token12345",
"token_type": "Bearer",
"expires_in": 1209600
}
Fetches a valid access token, given client credentials. Access tokens have a 14-day TTL.
HTTP Request
POST https://api.trial.ezyvet.com/v1/oauth/access_token
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
partner_id | string | - | Unique Partner ID, provided by ezyVet. |
client_id | string | - | Unique Client ID, provided by a clinic. |
client_secret | string | - | Client secret key, provided by a clinic. |
grant_type | string | client_credentials | OAuth2 grant type. |
scope | string | - | Access scope for the access token requested. Note that your client_id may not have permission to all scopes. |
Address
Represents typical address data such as street, city and country.
Each Address
must point to another resource through the resource's name and ID.
Fetch an Address list
Fetches a list containing Address
(es).
Sample Request: Fetch all
Address
set to New Zealand (ID:153). (up to 10)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/address?country_id=153",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479935858",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "2"
},
"items": [
{
"address": {
"id": "9",
"active": "1",
"created_at": "1307487862",
"modified_at": "1363044343",
"name": "Main Address",
"street_1": "13 Ophir Street",
"street_2": "",
"suburb": "Newton",
"city": "",
"region": "Auckland",
"post_code": "",
"country_id": "153",
"state": "",
"longitude": "",
"latitude": "",
"for_resource": {
"Contact": {
"id": "5"
}
}
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/address
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Address . |
active | num, string | - | If true, the Address is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Address was created. |
modified_at | num, string | - | The epoch time when the Address was last modified. |
name | string | - | The Address 's name. |
street_1 | string | - | The Address 's first street line. |
street_2 | string | - | The Address 's second street line. |
suburb | string | - | The Address 's suburb. |
city | string | - | The Address 's city. |
region | string | - | The Address 's region. |
post_code | string | - | The Address 's post code. |
state | string | - | The Address 's state, where applicable. |
country_id | string | - | The Address 's Country ID. |
longitude | string | - | The Address 's longitudinal geographic coordinate (-180 to 180). |
latitude | string | - | The Address 's latitudinal geographic coordinate (-90 to 90). |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
for_resource | resource | - | Contains the resource for which this Address belongs, as well as its ID. |
Create an Address
Creates a single Address
.
Sample Request: Create an
Address
that links to aContact
of ID 13.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/address",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"name": "Physical",
"street_1": "123 Magic Street",
"street_2": "",
"suburb": "Yorkshire",
"city": "Farringdon",
"region": "London",
"post_code": "AB12CD",
"country_id": "225",
"state": "",
"longitude": "32.58357114",
"latitude": "18.90456617",
"for_resource": {
"Contact": {
"id": "13"
}
}
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "ab6a349dac96ca4ffe061efd58bbf87c4c7d746ea02050ae4359d3ee11491534",
"timestamp": "1677090828"
},
"items": [
{
"address": {
"id": "2116",
"active": "1",
"created_at": "1677090828",
"modified_at": "1677090828",
"name": "Physical",
"street_1": "123 Magic Street",
"street_2": "",
"suburb": "Yorkshire",
"city": "Farringdon",
"region": "London",
"post_code": "AB12CD",
"country_id": "225",
"state": "",
"longitude": "32.58357114",
"latitude": "18.90456617",
"for_resource": {
"Contact": {
"id": "13"
}
},
"distance": "0"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/address
POST Parameters
Parameter | Type | Default | Description |
---|---|---|---|
name | string | - | The Address 's name. |
street_1 | string | - | The Address 's first street line. |
street_2 | string | - | The Address 's second street line. |
suburb | string | - | The Address 's suburb. |
city | string | - | The Address 's city. |
region | string | - | The Address 's region. |
post_code | string | - | The Address 's post code. |
country_id | string | - | The Address 's Country ID. |
state | string | - | The Address 's state, where applicable. |
longitude | string | - | The Address 's longitudinal geographic coordinate (-180 to 180). |
latitude | string | - | The Address 's latitudinal geographic coordinate (-90 to 90). |
for_resource | resource | - | Contains the resource for which this Address belongs, as well as its ID. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Address . |
active | num, string | - | If true, the Address is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Address was created. |
modified_at | num, string | - | The epoch time when the Address was last modified. |
distance | string | - | The distance from the clinic to the contact Address . |
Update an Address
Update a single Address
.
Sample Request: Updates an
Address
with the ID of 1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/address/1",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"name": "Physical",
"street_1": "123 Magic Street",
"street_2": "",
"suburb": "Yorkshire",
"city": "Farringdon",
"region": "London",
"post_code": "AB12CD",
"country_id": "225",
"state": "",
"longitude": "32.58357114",
"latitude": "18.90456617"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "bf88ab8833711e32091ddd4308b0c990ac5d25e9676d96bda07c2f9b0b98c377",
"timestamp": "1677090964",
"items_matched": 1,
"items_processed": 1
},
"items": [
{
"address": {
"id": "1",
"active": "1",
"created_at": "1333502603",
"modified_at": "1677090964",
"name": "Physical",
"street_1": "123 Magic Street",
"street_2": "",
"suburb": "Yorkshire",
"city": "Farringdon",
"region": "London",
"post_code": "AB12CD",
"country_id": "225",
"state": "",
"longitude": "32.58357114",
"latitude": "18.90456617",
"for_resource": {
"Contact": {
"id": "1"
}
},
"distance": "0"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/address/{id}
PATCH Parameters
Parameter | Type | Default | Description |
---|---|---|---|
name | string | - | The Address 's name. |
street_1 | string | - | The Address 's first street line. |
street_2 | string | - | The Address 's second street line. |
suburb | string | - | The Address 's suburb. |
city | string | - | The Address 's city. |
region | string | - | The Address 's region. |
post_code | string | - | The Address 's post code. |
country_id | string | - | The Address 's Country ID. |
state | string | - | The Address 's state, where applicable. |
longitude | string | - | The Address 's longitudinal geographic coordinate (-180 to 180). |
latitude | string | - | The Address 's latitudinal geographic coordinate (-90 to 90). |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Address . |
active | num, string | - | If true, the Address is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Address was created. |
modified_at | num, string | - | The epoch time when the Address was last modified. |
distance | string | - | The distance from the clinic to the contact Address . |
Delete an Address
Delete an Address
.
Sample Request: Delete an
Address
with ID of10
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/address/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/address/{id}
Response Fields
There are no response fields for a DELETE
operation.
Animal
Represents basic animal data such as name, breed, birthday and so on. Each Animal
must have an owner (Contact
).
Fetch an Animal list
Fetches a list containing Animal
(s). (up to 10)
Sample Request: Get a list of
Animal
(s).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/animal",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"animal": {
"id": "5",
"active": "0",
"created_at": "1307495735",
"modified_at": "1477887395",
"name": "Doggo",
"code": "100005",
"sex_id": "1",
"is_dead": "1",
"is_hostile": "0",
"animalcolour_id": "37",
"species_id": "1",
"breed_id": "708",
"rabies_number": "",
"date_of_rabies_vaccination": "",
"microchip_number": "9009009009",
"contact_id": "12",
"date_of_birth": "1054987200",
"is_estimated_date_of_birth": "1",
"date_of_death": "1436875200",
"death_reason": "",
"date_of_desex": "-43200",
"referring_clinic_id": "1",
"referring_vet_id": "1",
"residence_contact_id": "2",
"weight": "123.0000",
"weight_unit": "lb",
"resuscitate": "1",
"notes": "Demo notes for Doggo",
"notes_important": "1",
"guid": "0cc4faba-1921-535d-97e6-0025563ed1c8"
}
},
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/animal
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Animal . |
active | num, string | - | If true, the Animal is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Animal was created. |
modified_at | num, string | - | The epoch time when the Animal was last modified. |
name | string | - | The name of the Animal . |
code | string | - | The custom code override for the Animal . |
sex_id | string | - | The ID of the Sex of the Animal . |
is_dead | bool | - | If true, the Animal is dead. |
is_hostile | bool | - | If true, the Animal is not friendly. This is marked by the "FRIENDLY" or "CARE" image on ezyVet's Animal screen. |
animalcolour_id | num, string | - | The ID of the AnimalColour . |
species_id | num, string | - | The ID of the Species of the Animal . |
breed_id | num, string | - | The ID of the Breed of the Animal . |
rabies_number | string | - | The rabies registration number of the Animal . This field is not necessarily used by clinics throughout the world. |
date_of_rabies_vaccination | num, string | - | The epoch time that the Animal was vaccinated against rabies. This field is not necessarily used by clinics throughout the world. |
microchip_number | string | - | The microchip number of the Animal |
contact_id | num, string | - | The ID of the owner of the Animal . |
date_of_birth | num, string | - | The epoch time the Animal was born. |
is_estimated_date_of_birth | bool | - | If true, the date of birth is considered to be an estimate only. |
date_of_death | num, string | - | The epoch time the Animal died. |
death_reason | string | - | The reason of the Animal death. |
date_of_desex | num, string | - | The epoch time the Animal was spayed/neutered. |
referring_clinic_id | num, string | - | The Contact ID of the clinic that referred the Animal . |
referring_vet_id | num, string | - | The Contact ID of the vet that referred the Animal . |
residence_contact_id | num, string | - | The Contact ID for the caretaker of the Animal . Populated if and only if the animal does not stay at the same residence as the owner. |
weight_unit | string, enum | - | The unit of weight that the Animal was measured with. This can be either Kilogram (kg), Pounds (lb) or Grams (g). |
weight | num, string | - | The weight of the Animal . |
resuscitate | string, enum | 0 | Whether the Animal s owner would like it to be resuscitated or not. This can be either No (0), Yes (1) or Advanced Life Support (3) |
notes | string | - | Notes that are displayed within ezyVet on the animal page. |
notes_important | bool | - | If true, the Animal 's notes are marked as important. |
Response Parameters
Includes all query parameters plus the following.
Parameter | Type | Default | Description |
---|---|---|---|
guid | string | - | The global unique identifier of the Animal . |
Create an Animal
Creates a single Animal
.
Sample Request: Creates a
Animal
that links to aContact
with an ID of1
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/animal",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"contact_id" : 1,
"name" : "Doggo",
"sex_id" : 1,
"animalcolour_id" : 1,
"species_id" : 1,
"breed_id" : 20,
"weight" : 10,
"weight_unit" :"lb",
"resuscitate" : "3",
"notes" : "Demo notes",
"notes_important": "1",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1529446051"
},
"items": [
{
"animal": {
"id": "495",
"active": "1",
"created_at": "1529446049",
"modified_at": "1529446049",
"name": "Doggo",
"code": "100495",
"sex_id": "1",
"is_dead": "0",
"is_hostile": "0",
"animalcolour_id": "1",
"species_id": "1",
"breed_id": "20",
"rabies_number": "",
"date_of_rabies_vaccination": "",
"microchip_number": "",
"contact_id": "1",
"date_of_birth": "0",
"is_estimated_date_of_birth": "0",
"date_of_death": "",
"death_reason": "",
"date_of_desex": "",
"referring_clinic_id": "",
"referring_vet_id": "",
"residence_contact_id": "",
"weight": "10.0000",
"weight_unit": "lb",
"resuscitate": "3",
"notes": "Demo notes",
"notes_important": "1",
"guid": "0cc4faba-1921-535d-97e6-0025563ed1c8"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/animal
POST Parameters
Parameter | Type | Default | Description |
---|---|---|---|
name | string | - | The name of the Animal . |
code | string | - | The custom code override for the Animal . |
sex_id | string | - | The ID of the Sex of the Animal . |
is_dead | bool | - | If true, the Animal is dead. |
is_hostile | bool | - | If true, the Animal is not friendly. This is marked by the "FRIENDLY" or "CARE" image on ezyVet's Animal screen. |
animalcolour_id | num, string | - | The ID of the AnimalColour . |
species_id | num, string | - | The ID of the Species of the Animal . |
breed_id | num, string | - | The ID of the Breed of the Animal . |
rabies_number | string | - | The rabies registration number of the Animal . This field is not necessarily used by clinics throughout the world. |
date_of_rabies_vaccination | num, string | - | The epoch time that the Animal was vaccinated against rabies. This field is not necessarily used by clinics throughout the world. |
microchip_number | string | - | The microchip number of the Animal |
contact_id | num, string | - | The ID of the owner of the Animal . |
date_of_birth | num, string | - | The epoch time the Animal was born. |
is_estimated_date_of_birth | bool | - | If true, the date of birth is considered to be an estimate only. |
date_of_death | num, string | - | The epoch time the Animal died. |
death_reason | string | - | The reason of the Animal death. |
date_of_desex | num, string | - | The epoch time the Animal was spayed/neutered. |
referring_clinic_id | num, string | - | The Contact ID of the clinic that referred the Animal . |
referring_vet_id | num, string | - | The Contact ID of the vet that referred the Animal . |
residence_contact_id | num, string | - | The Contact ID for the caretaker of the Animal . Populated if and only if the animal does not stay at the same residence as the owner. |
weight_unit | string, enum | - | The unit of weight that the Animal was measured with. This can be either Kilogram (kg), Pounds (lb) or Grams (g). |
weight | num, string | - | The weight of the Animal . |
resuscitate | string, enum | 0 | Whether the Animal s owner would like it to be resuscitated or not. This can be either No (0), Yes (1) or Advanced Life Support (3) |
notes | string | - | Notes that are displayed within ezyVet on the animal page. |
notes_important | bool | - | If true, the Animal 's notes are marked as important. |
Response fields
Includes most post parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Animal . |
active | num, string | - | If true, the Animal is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Animal was created. |
modified_at | num, string | - | The epoch time when the Animal was last modified. |
guid | string | - | The global unique identifier of the Animal . |
Update an Animal
Updates a single Animal
.
Sample Request: Updates an
Animal
with the ID of1
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/animal/495",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json"
},
"data": {
"contact": "3",
"weight": "123.8080",
"notes": "heavy doggo"
}
}
Response
{
"meta": {
"timestamp": "1529449897",
"items_matched": 1,
"items_processed": 1
},
"items": [
{
"animal": {
"id": "495",
"active": "1",
"created_at": "1529446049",
"modified_at": "1529446049",
"name": "Doggo",
"code": "100495",
"sex_id": "1",
"is_dead": "0",
"is_hostile": "0",
"animalcolour_id": "1",
"species_id": "1",
"breed_id": "20",
"rabies_number": "",
"date_of_rabies_vaccination": "",
"microchip_number": "",
"contact_id": "3",
"date_of_birth": "0",
"is_estimated_date_of_birth": "0",
"date_of_death": "",
"death_reason": "",
"date_of_desex": "",
"referring_clinic_id": "",
"referring_vet_id": "",
"residence_contact_id": "",
"weight": "123.8080",
"weight_unit": "lb",
"resuscitate": "3",
"notes": "Heavy Doggo",
"notes_important": "1",
"guid": "0cc4fabb-1991-535d-97e6-0025563ed1c8"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/animal
PATCH Parameters
Parameter | Type | Default | Description |
---|---|---|---|
name | string | - | The name of the Animal . |
code | string | - | The custom code override for the Animal . |
sex_id | string | - | The ID of the Sex of the Animal . |
is_dead | bool | - | If true, the Animal is dead. |
is_hostile | bool | - | If true, the Animal is not friendly. This is marked by the "FRIENDLY" or "CARE" image on ezyVet's Animal screen. |
animalcolour_id | num, string | - | The ID of the AnimalColour . |
species_id | num, string | - | The ID of the Species of the Animal . |
breed_id | num, string | - | The ID of the Breed of the Animal . |
rabies_number | string | - | The rabies registration number of the Animal . This field is not necessarily used by clinics throughout the world. |
date_of_rabies_vaccination | num, string | - | The epoch time that the Animal was vaccinated against rabies. This field is not necessarily used by clinics throughout the world. |
microchip_number | string | - | The microchip number of the Animal |
contact_id | num, string | - | The ID of the owner of the Animal . |
date_of_birth | num, string | - | The epoch time the Animal was born. |
is_estimated_date_of_birth | bool | - | If true, the date of birth is considered to be an estimate only. |
date_of_death | num, string | - | The epoch time the Animal died. |
death_reason | string | - | The reason of the Animal death. |
date_of_desex | num, string | - | The epoch time the Animal was spayed/neutered. |
referring_clinic_id | num, string | - | The Contact ID of the clinic that referred the Animal . |
referring_vet_id | num, string | - | The Contact ID of the vet that referred the Animal . |
residence_contact_id | num, string | - | The Contact ID for the caretaker of the Animal . Populated if and only if the animal does not stay at the same residence as the owner. |
weight_unit | string, enum | - | The unit of weight that the Animal was measured with. This can be either Kilogram (kg), Pounds (lb) or Grams (g). |
weight | num, string | - | The weight of the Animal . |
resuscitate | string, enum | 0 | Whether the Animal s owner would like it to be resuscitated or not. This can be either No (0), Yes (1) or Advanced Life Support (3) |
notes | string | - | Notes that are displayed within ezyVet on the animal page. |
notes_important | bool | - | If true, the Animal 's notes are marked as important. |
Response fields
Includes most post parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Animal . |
active | num, string | - | If true, the Animal is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Animal was created. |
modified_at | num, string | - | The epoch time when the Animal was last modified. |
guid | string | - | The global unique identifier of the Animal . |
Delete an Animal
Delete an Animal
.
Sample Request: Delete an
Animal
with ID of10
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/animal/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/animal
Response Fields
There are no response fields for a DELETE
operation.
AnimalColour
Represents an animal colour.
Fetch an AnimalColour list
Fetches a list containing AnimalColour
(s). (up to 10)
Sample Request: Get a list of
AnimalColour
(s).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/animalcolour",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"procedure": {
"id": "2",
"active": "1",
"created_at": "",
"modified_at": "",
"name": "Black & White"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/animalcolour
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an AnimalColour . |
active | num, string | - | If true, the AnimalColour is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the AnimalColour was created. |
modified_at | num, string | - | The epoch time when the AnimalColour was last modified. |
name | string | - | The name of the AnimalColour . |
Appointment
Represents an appointment with the clinic.
Appointments are recurring if they have a recurrence_interval greater than 0.
Appointments must have at least one Resource
allocated to it. Appointments may require a Contact
, Animal
, or both, depending on its AppointmentType
.
Fetch an Appointment list
Fetch a list of Appointment
(s). (up to 10)
Sample Request: Get
Appointment
s between 1512270662 and 1512290993. (up to 10)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/appointment?time_range_start=1498690800&time_range_end=1501714800&limit=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1512281320",
"items_page": "1",
"items_page_total": "2",
"items_page_size": "1",
"items_total": "2"
},
"items": [
{
"appointment": {
"id": "2",
"recurrence_number": "5",
"active": "1",
"created_at": "1494469531",
"modified_at": "1494469546",
"recurrence_interval": "1",
"recurrence_end_time": "0",
"start_time": "1498690800",
"duration": "1800",
"details": {
"appointment_type_id": "2",
"appointment_status_id": "1",
"description": "Recurring Appointment Reason",
"animal_id": "2",
"consult_id": "4",
"contact_id": "4",
"resource_list": [
"7"
]
}
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/appointment
Query Parameters
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
id | num, string | - | - | The ID number used by the system to uniquely identify an Appointment . |
recurrence_number | num, string | - | - | The number of the recurring appointment (if the appointment is recurring). E.g. 0 is the original, 1 is the first recurring appointment. |
active | bool | - | - | If true, the Appointment is active and usable in ezyVet. |
created_at | num, string | - | - | The epoch time when the Appointment was created. |
modified_at | num, string | - | - | The epoch time when the Appointment was last modified. |
recurrence_interval | num, string | - | 0 | The interval between recurring appointments (in weeks). |
recurrence_end_time | num, string | - | - | The epoch time for when the recurrence ends (if the appointment is recurring). |
start_time | num, string | - | - | The epoch time for when the Appointment starts. |
duration | num, string | - | - | The duration of the Appointment in seconds. |
details | json | - | - | JSON object containing appointment details. |
appointment_type_id | num, string | details | - | Refers to the ID of the AppointmentType of the Appointment . |
appointment_status_id | num, string | details | - | Refers to the ID of the AppointmentStatus of the Appointment . |
description | num, string | details | - | The Appointment description. This serves as the reason for appointment. |
animal_id | num, string | details | - | Refers to the ID of the Animal . |
consult_id | num, string | details | - | Refers to the ID of the Consult . |
contact_id | num, string | details | - | Refers to the ID of the Contact . |
limit | num, string | - | 10 | Limits the number of results returned. |
page | num, string | - | 1 | Specifies the page number of the result. |
Response Fields
Includes most query parameters.
Appointment V2
Represents an appointment with the clinic.
Recurring appointments are not supported by this endpoint.
An appointment must have at least one Resource
and a SalesResource
allocated to it.
Appointments may require a Contact
, Animal
, or both, depending on its AppointmentType
.
Fetch an Appointment list (V2)
Fetch a list of Appointment
(s). (up to 200)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/appointment?limit=2",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
Sample Request: Get
Appointment
with ID 4732
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/appointment/4732",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "f5ad1cedee61b29c12725b536efbff0ef1f82b6f538c4ee0e9e3c2f449eb28cb",
"timestamp": 1565476644
},
"items": [
{
"appointment": {
"id": 4732,
"created_at": 1565476272,
"modified_at": 1565476272,
"active": true,
"start_at": 1565562600,
"duration": 1800,
"type_id": 1,
"status_id": 2,
"description": "This is a test appointment",
"animal_id": 272,
"consult_id": null,
"contact_id": 8,
"sales_resource": 305,
"resources": [
{
"id": 305
},
{
"id": 1797
}
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/appointment
Query Parameters
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
id | num, string | - | - | The ID number used by the system to uniquely identify an Appointment . |
created_at | num, string | - | - | The epoch time when the Appointment was created. |
modified_at | num, string | - | - | The epoch time when the Appointment was last modified. |
active | bool | - | - | If true, the Appointment is active and usable in ezyVet. |
start_at | num, string | - | - | The epoch time for when the Appointment starts. |
duration | num, string | - | - | The duration of the Appointment in seconds. |
type_id | num, string | - | - | Refers to the ID of the AppointmentType of the Appointment . |
status_id | num, string | - | - | Refers to the ID of the AppointmentStatus of the Appointment . |
animal_id | num, string | - | - | Refers to the ID of the Animal . |
consult_id | num, string | - | - | Refers to the ID of the Consult . |
contact_id | num, string | - | - | Refers to the ID of the Contact . |
sales_resource | Resource |
- | - | ID of the SalesResource allocated to the Appointment . |
Response Fields
Includes most query parameters.
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
id | num, string | - | - | The ID number used by the system to uniquely identify an Appointment . |
created_at | num, string | - | - | The epoch time when the Appointment was created. |
modified_at | num, string | - | - | The epoch time when the Appointment was last modified. |
active | bool | - | - | If true, the Appointment is active and usable in ezyVet. |
start_at | num, string | - | - | The epoch time for when the Appointment starts. |
duration | num, string | - | - | The duration of the Appointment in seconds. |
type_id | num, string | - | - | Refers to the ID of the AppointmentType of the Appointment . |
status_id | num, string | - | - | Refers to the ID of the AppointmentStatus of the Appointment . |
description | num, string | - | - | The Appointment description. This serves as the reason for appointment. |
animal_id | num, string | - | - | Refers to the ID of the Animal . |
consult_id | num, string | - | - | Refers to the ID of the Consult . |
contact_id | num, string | - | - | Refers to the ID of the Contact . |
sales_resource | Resource |
- | - | ID of the SalesResource allocated to the Appointment . |
resources | ResourceList |
- | - | A list of Resources allocated to the Appointment . |
Create an Appointment (V2)
Creates a single Appointment
.
Sample Request: Create a
Appointment
for the animal 9 andResources
1932
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/appointment",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
{
"start_at": 1565584420,
"duration": 2400,
"type_id": 51,
"status_id": 1,
"description": "12312312",
"animal_id": 9,
"consult_id": 2326,
"resources" : [1932, 1152],
"sales_resource": 1797,
"contact_id": 14,
}
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "a991e07af6fca11a97dfd5295f92e2d78429eaaa2b2c714733f80611c978db3a",
"timestamp": 1565586733
},
"items": [
{
"appointment": {
"id": 4747,
"created_at": 1565586733,
"modified_at": 1565586733,
"active": true,
"start_at": 1565584440,
"duration": 2400,
"type_id": 51,
"status_id": 1,
"description": "12312312",
"animal_id": 9,
"consult_id": 2326,
"contact_id": 14,
"sales_resource": 1797,
"resources": [
{
"id": 1797
},
{
"id": 1932
},
{
"id": 1152
}
]
}
}
],
"messages": []
}
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
start_at* | num, string | - | - | The epoch time for when the Appointment starts. |
duration* | num, string | - | - | The duration of the Appointment in seconds. |
type_id* | num, string | - | - | Refers to the ID of the AppointmentType of the Appointment . |
status_id* | num, string | - | - | Refers to the ID of the AppointmentStatus of the Appointment . |
description | num, string | - | - | The Appointment description. This serves as the reason for appointment. |
animal_id | num, string | - | - | Refers to the ID of the Animal . |
consult_id | num, string | - | - | Refers to the ID of the Consult . |
contact_id | num, string | - | - | Refers to the ID of the Contact . |
sales_resource* | Resource |
- | - | ID of the SalesResource allocated to the Appointment . |
resources | ResourceList |
- | - | A list of Resources allocated to the Appointment . |
Response Fields
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
id | num, string | - | - | The ID number used by the system to uniquely identify an Appointment . |
created_at | num, string | - | - | The epoch time when the Appointment was created. |
modified_at | num, string | - | - | The epoch time when the Appointment was last modified. |
active | bool | - | - | If true, the Appointment is active and usable in ezyVet. |
start_at | num, string | - | - | The epoch time for when the Appointment starts. |
duration | num, string | - | - | The duration of the Appointment in seconds. |
type_id | num, string | - | - | Refers to the ID of the AppointmentType of the Appointment . |
status_id | num, string | - | - | Refers to the ID of the AppointmentStatus of the Appointment . |
description | num, string | - | - | The Appointment description. This serves as the reason for appointment. |
animal_id | num, string | - | - | Refers to the ID of the Animal . |
consult_id | num, string | - | - | Refers to the ID of the Consult . |
contact_id | num, string | - | - | Refers to the ID of the Contact . |
sales_resource | Resource |
- | - | ID of the SalesResource allocated to the Appointment . |
resources | ResourceList |
- | - | A list of Resources allocated to the Appointment . |
Update an appointment (V2)
Updates an existing Appointment
.
Sample Request: Update an existing
Appointment
status from 2 to 4 with ID 4923.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/appointment/4923",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
{
"status_id": 2,
"cancel": true,
"cancellation_reason_text": "Test cancellation",
"cancellation_reason": 0
}
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "631323c7f50c51352fac4f741830f92de849975571c8b3ed323dc068b69afc30",
"timestamp": 1587439122
},
"items": [
{
"appointment": {
"id": 4923,
"created_at": 1587351002,
"modified_at": 1587439098,
"active": true,
"start_at": 1587411600,
"duration": 900,
"type_id": 48,
"status_id": 4,
"description": "",
"animal_id": 27,
"consult_id": 3375,
"contact_id": 33,
"sales_resource": 305,
"resources": [
{
"id": 305
}
],
"cancellation_reason": null,
"cancellation_reason_text": "Test cancellation"
}
}
],
"messages": []
}
PATCH Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
status_id* | num, string | - | - | Refers to the ID of the AppointmentStatus of the Appointment . |
description | num, string | - | - | The Appointment description. This serves as the reason for appointment. |
animal_id | num, string | - | - | Refers to the ID of the Animal . |
consult_id | num, string | - | - | Refers to the ID of the Consult . |
cancel* | bool | - | - | If true, the Appointment will be cancelled. |
cancellation_reason* | num | - | - | Refers to the appointment cancellation reason record for which the Appointment is cancelled for. |
cancellation_reason_text | string | - | - | A custom reason for the appointment being cancelled. Appointment . |
Response Fields
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
id | num, string | - | - | The ID number used by the system to uniquely identify an Appointment . |
created_at | num, string | - | - | The epoch time when the Appointment was created. |
modified_at | num, string | - | - | The epoch time when the Appointment was last modified. |
active | bool | - | - | If true, the Appointment is active and usable in ezyVet. |
start_at | num, string | - | - | The epoch time for when the Appointment starts. |
duration | num, string | - | - | The duration of the Appointment in seconds. |
type_id | num, string | - | - | Refers to the ID of the AppointmentType of the Appointment . |
status_id | num, string | - | - | Refers to the ID of the AppointmentStatus of the Appointment . |
description | num, string | - | - | The Appointment description. This serves as the reason for appointment. |
animal_id | num, string | - | - | Refers to the ID of the Animal . |
consult_id | num, string | - | - | Refers to the ID of the Consult . |
contact_id | num, string | - | - | Refers to the ID of the Contact . |
sales_resource | Resource |
- | - | ID of the SalesResource allocated to the Appointment . |
resources | ResourceList |
- | - | A list of Resources allocated to the Appointment . |
cancellation_reason | num | - | - | Refers to the appointment cancellation reason record for which the Appointment is cancelled for. |
cancellation_reason_text | string | - | - | A custom reason for the appointment being cancelled. Appointment . |
AppointmentStatus
Represents an appointment status at the clinic.
Fetch a Appointment Status list
Fetches a list containing AppointmentStatus
(s). (up to 10)
Sample Request: Get a list of
AppointmentStatus
es recognized by the clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/appointmentstatus",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"appointmentstatus": {
"id": "3",
"active": "1",
"created_at": "",
"modified_at": "",
"name": "In Waiting Room"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/appointmentstatus
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a AppointmentStatus . |
active | num, string | - | If true, the AppointmentStatus is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the AppointmentStatus was created. |
modified_at | num, string | - | The epoch time when the AppointmentStatus was last modified. |
name | string | - | The name of the AppointmentStatus . |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
AppointmentType
Represents a type of appointment.
Each Appointment
must have an AppointmentType
.
Fetch an AppointmentType list
Fetches a list containing AppointmentType
(s). (up to 10)
Sample Request: Get a list of
AppointmentType
(s).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/appointmenttype",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"appointmenttype": {
"id": "1",
"active": "1",
"created_at": "",
"modified_at": "1479683606",
"name": "Consultation",
"default_duration": "30"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/appointmenttype
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an AppointmentType . |
active | bool | - | If true, the AppointmentType is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the AppointmentType was created. |
modified_at | num, string | - | The epoch time when the AppointmentType was last modified. |
name | string | - | The name of the AppointmentType . |
default_duration | num, string | 30 | The default duration of the Appointment (in minutes). |
limit | num, string | 10 | Limits the number of results returned. |
page | num, string | 1 | Specifies the page number of the result. |
AppointmentType V2
Represents a type of appointment.
Each Appointment
must have an AppointmentType
.
Fetch an AppointmentType list (V2)
Fetches a list containing AppointmentType
(s). (up to 200)
Sample Request: Get a list of
AppointmentType
(s).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/appointmenttype",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "ea3c8f71185df509c531592ed42eb05439a5ac5cb9986676bd326822c2e18f78",
"timestamp": 1685661774
},
"items": [
{
"appointmenttype": {
"id": 1,
"uid": "appointmentType_A4bv8PQvFCshtF5EedpeE",
"active": true,
"name": "Consult - Specialty",
"default_duration": 60
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/appointmenttype
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an AppointmentType . |
uid | num | - | The ID number used by the system to uniquely identify an AppointmentType across all ezyVet sites. |
active | bool | - | If true, the AppointmentType is active and usable in ezyVet. |
limit | num, string | 10 | Limits the number of results returned. |
page | num, string | 1 | Specifies the page number of the result. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an AppointmentType . |
uid | num | - | The ID number used by the system to uniquely identify an AppointmentType across all ezyVet sites. |
active | bool | - | If true, the AppointmentType is active and usable in ezyVet. |
name | string | - | The name of the AppointmentType . |
default_duration | num | 30 | The default duration of the Appointment (in minutes). |
Assessment
An assessment represents all related information recorded at an assessment for a consult.
Fetch an Assessment
Each Assessment
must be linked to a Consult
.
Sample Request: Get
Assessment
(s) forAnimal
"Doggo" (ID:5).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/assessment?animal_id=5",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"Assessment": {
"id": "1",
"active": "1",
"created_at": "1307497412",
"modified_at": "1307497412",
"consult_id": "4",
"animal_id": "5",
"vet_id": "24",
"timestamp": "1307497412",
"notes": "Bright and Alert",
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/assessment
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Assessment . |
active | num, string | - | If true, the Assessment is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Assessment was created. |
modified_at | num, string | - | The epoch time when the Assessment was last modified. |
consult_id | num, string | - | Refers to the ID of the Consult where the Assessment is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
vet_id | num, string | - | Refers to the ID of the User who is a Vet and is linked to the Assessment . |
timestamp | num, string | - | The date when the clinic did a performed the examination for the health status of the Animal . Note that this doesn't necessarily refer to when the Assessment record was created. |
notes | num, string | - | Notes about the Assessment record. |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Attachment
An attachment record represents a piece of information which is linked to some entity.
Fetch an Attachment
An Attachment
can be linked to a Consult
, Animal
,
Contact
and a few other types of records.
Sample Request: Get
Attachment
with ID = 1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/attachment?id=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"attachment": {
"id": "1",
"active": "1",
"created_at": "1307497412",
"modified_at": "1307497412",
"file_id": "4",
"file_download_url": "https://api.ezyvet.com/api/v1/attachment/download/139970",
"record_type": "FeatureRequest",
"record_id": "2",
"mime_type": "image\/png",
"name": "monkey.png",
"primary_image": "0",
"notes": "This is a demo note"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/attachment
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Attachment . |
active | boolean | - | If true, the Attachment is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Attachment was created. |
modified_at | num, string | - | The epoch time when the Attachment was last modified. |
file_id | num, string | - | The ID number of the File linked to the Attachment . |
file_download_url | string | - | The URL of the file that if you get request will download the file. |
record_type | string | - | The record type the Attachment is for. E.g. Animal , Contact , Consult . |
record_id | num, string | - | The ID number of the record the Attachment is linked to. |
mime_type | string | - | Multipurpose Internet Mail Extension type. Identifies the format of the Attachment . |
name | string | - | The Attachment filename. |
primary_image | boolean | - | If true, the Attachment is the primary image for the linked record. |
notes | string | - | Notes that are related to the Attachment . |
Create an Attachment
Creates a single Attachment
.
Sample Request: Creating
Attachment
that links to aConsult
with an ID of1
.
data = new FormData();
data.append('file_data', $('#file')[0].files[0]);
data.append('record_type', 'consult');
data.append('record_id', '1');
data.append('notes', 'Demo note');
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/attachment",
"data": data,
"method": "POST",
contentType: 'multipart/form-data',
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
POST https://api.ezyvet.com/v1/attachment
Response (JSON)
{
"meta": {
"timestamp": "1527215479"
},
"items": [
{
"attachment": {
"id": "12312331",
"active": "1",
"created_at": "1527215471",
"modified_at": "1527215471",
"file_id": "60039",
"file_download_url": "https://api.ezyvet.com/api/v1/attachment/download/1200779970",
"record_type": "FeatureRequest",
"record_id": "1",
"mime_type": "image/png",
"name": "7_ezyvet_small.png",
"primary_image": "0",
"notes": "Demo note"
}
}
],
"messages": []
}
HTTP Post
POST https://api.ezyvet.com/v1/attachment
POST Parameters
Mandatory fields are marked with a *
. Either file_data or file_id can be supplied.
Parameter | Type | Default | Description |
---|---|---|---|
record_type* | string | - | The record type the Attachment is for. E.g. Animal , Contact , Consult . |
record_id* | num | - | The ID number of the record the Attachment is linked to. |
notes | string | - | Notes that are related to the Attachment |
file_data* | file | - | The data of the file. |
file_id* | string | - | Create an Attachment using an existing file in ezyVet. |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Attachment |
active | boolean | - | If true, the Attachment is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Attachment was created. |
modified_at | num, string | - | The epoch time when the Attachment was last modified. |
file_id | num, string | - | The ID number of the File linked to the Attachment . |
file_download_url | string | - | The URL of the file that if you get request will download the file. |
mime_type | string | - | Multipurpose Internet Mail Extension type. Identifies the format of the Attachment . |
name | string | - | The Attachment filename |
primary_image | boolean | - | If true, the Attachment is the primary image for the linked record. |
notes | string | - | Notes that are related to the Attachment . |
Update an Attachment
Updates an Attachment
.
Sample Request: Update the
Attachment
with ID of7
to be linked to aConsult
with an ID of12
while also changing thenotes
to be 'Demo edit'
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/attachment/7",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data": {
"notes" : "Demo edit",
"record_type" : "consult",
"record_id" : 12,
"active": 0
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
PATCH https://api.ezyvet.com/v1/attachment
Patch Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
record_type | string | - | The record type the Attachment is for. E.g. Animal , Contact , Consult . |
record_id | num | - | The ID number of the record the Attachment is linked to. |
notes | string | - | Notes that are related to the Attachment |
active | boolean | - | If true, the Attachment is active and usable in ezyVet. |
Response Fields
Includes all PATCH parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Attachment |
active | boolean | - | If true, the Attachment is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Attachment was created. |
modified_at | num, string | - | The epoch time when the Attachment was last modified. |
file_id | num, string | - | The ID number of the File linked to the Attachment . |
file_download_url | string | - | The URL of the file that if you get request will download the file. |
mime_type | string | - | Multipurpose Internet Mail Extension type. Identifies the format of the Attachment . |
name | string | - | The Attachment filename |
primary_image | boolean | - | If true, the Attachment is the primary image for the linked record. |
notes | string | - | Notes that are related to the Attachment . |
Response (JSON)
Delete an Attachment
Delete an Attachment
.
Sample Request: Delete the
Attachment
with ID of10
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/attachment/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/attachment
Response Fields
There are no response fields for a DELETE
operation.
Download an Attachment
Downloads the file from the attachment
GET https://api.ezyvet.com/v1/attachment/download/1200679970
Sample Request: get the
Attachment
file.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/attachment/download/1200679970",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response Fields
There are no response fields for a Download
operation.
Barcode
A Barcode
represents the machine-readable code that can be used to represent a Product
.
Fetch a list of Barcodes
Fetches a list containing Barcodes
. (up to 10)
Sample Request: Get a list of
Barcodes
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/barcode",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1559164200",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"barcode": {
"id": "1",
"active": "1",
"created_at": "1597775081",
"modified_at": "1597775081",
"for_type": "product",
"for_id": "1234",
"format": "CODE128",
"barcode": "AB234623461235"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/barcode
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Barcode . |
created_at | num | - | The epoch time when the Barcode was created. |
modified_at | num | - | The epoch time when the Barcode was last modified. |
for_type | string | - | The type of record that the Barcode is for. EG: "product". |
for_id | num | - | The ID of the record that the Barcode is for. |
active | boolean | true | If true, the Barcode is active and usable in ezyVet. |
format | string | - | The format or standard of the system used Barcode . EG: "EAN-13", or "CODE128". |
barcode | string | - | The text content for the Barcode . |
Response Fields
Parameter | Type | Description |
---|---|---|
id | num | The ID number used by the system to uniquely identify a Barcode . |
created_at | num | The epoch time when the Barcode was created. |
modified_at | num | The epoch time when the Barcode was last modified. |
for_type | string | The type of record that the Barcode is for. EG: "product". |
for_id | num | The ID of the record that the Barcode is for. |
active | boolean | If true, the Barcode is active and usable in ezyVet. |
format | string | The format or standard of the system used Barcode . EG: "EAN-13", or "CODE128". |
barcode | string | The text that the Barcode represents when read. |
Batch V2
A Batch
is a unique identifier for Product
batches.
Fetch a list of Batches
Fetches a list containing Batches
. (up to 10)
Sample Request: Get a list of
Batches
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/batch",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1559164200",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"batch": {
"id": 42,
"uid": "batch_P6SCNsoJmSv6ELWHneIbl",
"created_at": 1559164275,
"modified_at": 1559164275,
"active": true,
"name": "Product 001 Batch",
"type": "Product",
"parent": 41,
"expiry": 1560718800
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/batch
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Batch . |
uid | string | - | The ID number used by the system to uniquely identify an Batch across all ezyVet sites, |
created_at | num | - | The epoch time when the Batch was created. |
modified_at | num | - | The epoch time when the Batch was last modified. |
active | boolean | true | If true, the Batch is active and usable in ezyVet. |
name | string | - | The name given for a Batch . |
type | string | - | The type of Batch . |
Response Fields
Includes all query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
parent | num | - | The ID of the parent Batch . |
expiry | num | - | The epoch time of the Batch expiry. |
Create a Batch
Creates a Batch
. A Batch
is used to track a batch of products.
Sample Request: Create a
Batch
with the name "New Batch"
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/batch",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/x-www-form-urlencoded",
},
"data": {
"name": "New Batch",
"type": "Batch",
"product_id": 20
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1560722305
},
"items": [
{
"batch": {
"id": 55,
"uid": "batch_d6yVASvChrYsFhwnzC851",
"created_at": 1560722305,
"modified_at": 1560722305,
"active": true,
"name": "New Batch",
"type": "Batch",
"parent": 24,
"expiry": null
}
}
],
"messages": []
}
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
name* | string | - | The name provided for a Batch . |
type | string, enum | Batch | The type of Batch . |
product_id* | num | - | The ID of the Product that the Batch is for. |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Batch . |
uid | string | - | The ID number used by the system to uniquely identify an Batch across all ezyVet sites, |
created_at | num | - | The epoch time when the Batch was created. |
modified_at | num | - | The epoch time when the Batch was last modified. |
active | boolean | true | If true, the Batch is active and usable in ezyVet. |
parent | num | - | The ID of the parent Batch for the Product . |
expiry | num | - | The expiry date for the Batch . |
Sample Request: Create three
Batches
using theReceiveInvoiceItem
endpoint.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/receiveinvoiceitem",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/x-www-form-urlencoded",
},
"data": {
"quantity": 15,
"price": 5,
"tax": 0.5,
"supplier_code": "EZY_001",
"location_id": 3,
"receive_invoice_id": 30,
"batch": [
{
"name": "Batch One",
"expiry": 1560718800,
"quantity": 7
},
{
"name": "Batch Two",
"expiry": 1560718800,
"quantity": 3
},
{
"name": "Batch Three",
"expiry": 1560718800,
"quantity": 5
}
]
}
}
Response (JSON)
{
"meta": {
"timestamp": 1560733860
},
"items": [
{
"receiveinvoiceitem": {
"id": 50,
"created_at": 1560733860,
"modified_at": 1560733860,
"active": true,
"receive_invoice_id": 25,
"name": "Batch-Tracked Product",
"quantity": 60,
"price": 1.25,
"tax": 0.13,
"total": 75,
"total_tax": 7.5,
"tax_rate": 10,
"tax_code": "S",
"product_id": 150,
"product_supplier_id": 95,
"supplier_code": "EZY_001",
"location_id": 3,
"batch": [
{
"id": 100,
"uid": "batch_Q0csPc0E75QGvo9usV2aV",
"created_at": 1560733459,
"modified_at": 1560733459,
"active": true,
"name": "Batch One",
"type": "Batch",
"expiry": 1560719283
},
{
"id": 101,
"uid": "batch_fjicr9Y2ounW6opJtz1fb",
"created_at": 1560733459,
"modified_at": 1560733459,
"active": true,
"name": "Batch Two",
"type": "Batch",
"expiry": 1560719283
},
{
"id": 102,
"uid": "batch_bOQ8aMj8hZxIra8mUFQMk",
"created_at": 1560733697,
"modified_at": 1560733697,
"active": true,
"name": "Batch Three",
"type": "Batch",
"expiry": 1560719283
}
]
}
}
],
"messages": []
}
POST Parameters (on ReceiveInvoiceItem
s)
Includes all POST parameters for ReceiveInvoiceItem
plus the additional parameter for
Batch
:
Parameter | Type | Default | Description |
---|---|---|---|
quantity* | num | 0 | The quantity for the Batch . |
BillingCredit
Represents the usage of a benefit that an animal has as part of a wellness plan membership.
Each BillingCredit
will have an available_associated_type
and
available_associated_id
that will define what record the BillingCredit
is
associated to.
Fetch a BillingCredit
Sample Request: Get a
BillingCredit
(ID:1).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/billingcredit/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "531efb6bf247692b3ef9f7edcd87a83c8b92b9c7f10ff9ea5208a0924fee83a2",
"timestamp": 1547598521
},
"items": [
{
"billingcredit": {
"id": 1,
"created_at": 1538697804,
"modified_at": 1538697835,
"active": true,
"available_associated_type": "animal",
"available_associated_id": 442,
"wellness_plan_id": 1,
"wellness_plan_benefit_id": 4,
"wellness_plan_membership_id": 1,
"wellness_plan_membership_status_period_id": 1,
"associated_type": "wellnessplanbenefit",
"associated_id": 4,
"type": "quantity",
"amount": 1,
"wasted": 0,
"used": 1,
"start_date": 1538650800,
"expires_in_unit": "month",
"expires_in_qty": 12,
"end_date": 1570186799,
"single_use": false,
"wellness_plan_membership_cycle_id": 1
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/billingcredit
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a BillingCredit . |
active | bool | - | If true, the BillingCredit is active and visible in ezyVet. |
created_at | num | - | The epoch time when the BillingCredit was created. |
modified_at | num | - | The epoch time when the BillingCredit was last modified. |
wellness_plan_id | num | - | The ID of the Wellness Plan the `BillingCredit is associated with. |
wellness_plan_benefit_id | num | - | The ID of the Wellness Plan Benefit the BillingCredit is associated with. |
wellness_plan_membership_id | num | - | The ID of the Wellness Plan Membership the BillingCredit is associated with. |
wellness_plan_membership_status_period_id | num | - | The ID of the Wellness Plan Membership Status Period the BillingCredit is associated with. |
associated_type | string | - | The name of the record type the BillingCredit is associated with. |
associated_id | num | - | The ID of the record the BillingCredit is associated with. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a BillingCredit . |
active | bool | - | If true, the BillingCredit is active and visible in ezyVet. |
created_at | num | - | The epoch time when the BillingCredit was created. |
modified_at | num | - | The epoch time when the BillingCredit was last modified. |
available_associated_type | string, enum | - | The name of the record type the BillingCredit is available for. This will be one of the following: animal , contact . |
available_associated_id | num | - | The ID of the record the BillingCredit is available for. |
wellness_plan_id | num | - | The ID of the Wellness Plan the `BillingCredit is associated with. |
wellness_plan_benefit_id | num | - | The ID of the Wellness Plan Benefit the BillingCredit is associated with. |
wellness_plan_membership_id | num | - | The ID of the Wellness Plan Membership the BillingCredit is associated with. |
wellness_plan_membership_status_period_id | num | - | The ID of the Wellness Plan Membership Status Period the BillingCredit is associated with. |
associated_type | string | - | The name of the record type the BillingCredit is associated with. |
associated_id | num | - | The ID of the record the BillingCredit is associated with. |
type | string, enum | - | The type of the BillingCredit . This will be one of the following: Value , Quantity . |
amount | float | - | The amount of the BillingCredit . |
wasted | float | - | The amount of the BillingCredit that has been wasted. |
used | float | - | The amount of the BillingCredit that has been used. |
start_date | int | - | The epoch time when the BillingCredit started. |
expires_in_unit | string, enum | - | Specifies the unit expiry is measured in. This will be one of the following: year , month , week , day . |
expires_in_qty | num | - | Specifies the quantity remaining before expiry. |
end_date | num | - | The epoch time when the BillingCredit ends. |
wellness_plan_membership_cycle_id | num | - | The ID of the a Wellness Plan Membership Cycle the BillingCredit is associated with. |
allocation_method | string, enum | - | Specifies the allocation method. This will be one of the following: Unit , Line Total . |
Breed
Represents a breed recognized by the clinic.
Each Breed
must belong to a Species
.
Fetch a Breed list
Fetches a list containing Breed
(s). (up to 10)
Sample Request: Get a list of canine (ID:1)
Breed
s recognized by the clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/breed?species_id=2",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"breed": {
"id": "12",
"active": "1",
"created_at": 1480035980,
"modified_at": 1480035980,
"name": "Alaskan Malamute",
"species_id": "1"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/breed
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Breed . |
active | num, string | - | If true, the Breed is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Breed was created. |
modified_at | num, string | - | The epoch time when the Breed was last modified. |
name | string | - | The name of the Breed . |
species_id | num, string | - | The ID of the Species where the Breed belongs. |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Communication
Represents messages sent or received by the clinic.
Each Communication
will have a communicating_type and communicating_id that will define what record the Communication
is for.
Fetch a Communication
Sample Request: Get a
Communication
(ID:1).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/communication/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"communication": {
"id": 1,
"created_at": 1534795162,
"modified_at": 1534795289,
"active": true,
"associated_type": "animal",
"associated_id": 2,
"contact_detail_type_id": 4,
"destination": "123123123",
"origin":"user2email@demo.com",
"direction": "Outgoing",
"sent_as_user": {
"id": 161,
"created_at": 1384851685,
"modified_at": 1436228173,
"active": false,
"is_vet": true,
"is_salesperson": true,
"name": "Demo User",
"code": "488714797351"
},
"content": "Puppy is OVERDUE for a checkup and vax.\r\n\r\nPlease call Demo Vet on (12) 3456 7890 or email demo@demo.com to book.",
"content_format": "SMS",
"status": "Done",
"subject": "",
"communicating_type": "animal",
"communicating_id": 2,
"template": {
"id": 53,
"created_at": 1542922914,
"modified_at": 1543203202,
"active": true,
"name": "Sympathy Postcard",
"type": "POSTCARD",
"subtype": null,
"additional_information": {
"key": "value",
"custom": "variable"
}
},
"read_at": 1543203200
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/communication
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
associated_type | string | - | The name of the record type the Communication is directed at. Examples are "Contact" , "Animal", "Consult". |
associated_id | num | - | The ID of the record the Communication is directed at. |
content_format | string, enum | - | The format of the content. This will be one of the following: SMS , PlainText , HTML . |
status | string, enum | - | The status of the Communication . This will be one of the following: Pending , Done , Sending , Failed . Pending status means the communication will wait till a user actions it. Done status means the communication was sent successfully. Sending status means the communication will send once it is generated. Failed status means the communication encountered a error. |
communicating_type | string | - | The name of the record type the Communication is communicating. Examples are "Contact" , "Animal", "Consult". |
communicating_id | num | - | The ID of the record the Communication is communicating. Examples are "Contact" , "Animal", "Consult". |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Communication . |
active | bool | - | If true, the Communication is active and visible in ezyVet. |
created_at | num | - | The epoch time when the Communication was created. |
modified_at | num | - | The epoch time when the Communication was last modified. |
associated_type | string | - | The name of the record type the Communication is directed at. Examples are "Contact" , "Animal", "Consult". |
associated_id | num | - | The ID of the record the Communication is directed at. |
contact_detail_type_id | num | - | The ID of ContactDetailType that was used to send the Communication . This will also help define what the format destination should be. |
destination | string | - | The destination of the Communication in the format defined by the contact_detail_type_id . |
origin | string | - | The origin of the Communication in the format defined by the contact_detail_type_id . |
direction | enum | - | The direction of the Communication that was sent this will be either Outgoing or Incoming . |
sent_as_user | User |
- | The Communication sent on behalf of this User . |
content | string | - | The message of the Communication . |
content_format | string, enum | - | The format of the content. This will be one of the following: SMS , PlainText , HTML . |
status | string, enum | - | The status of the Communication . This will be one of the following: Pending , Done , Sending , Failed . Pending status means the communication will wait till a user actions it. Done status means the communication was sent successfully. Sending status means the communication will send once it is generated. Failed status means the communication encountered a error. |
subject | string | "" | The subject of the Communication . |
communicating_type | string | - | The name of the record type the Communication is communicating. Examples are "Contact" , "Animal", "Consult". |
communicating_id | num | - | The ID of the record the Communication is communicating. |
template | Object | null | The template used to generate this Communication 's content. |
read_at | num | null | The epoch time when the Communication is read. Please note that this will only apply to email and SMS Communication records. |
Create a Communication
Creates a single Communication
.
Sample request: Creates a
Communication
that will be attached to aContact
with an ID of1
and will be communicating aboutConsult
2
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/communication",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"active": true,
"associated_type": "Contact",
"associated_id": 1,
"contact_detail_type_id": 1,
"destination": "demo@demo.com",
"direction": "Outgoing",
"content": "example content",
"content_format": "PlainText",
"status": "Done",
"subject": "example subject",
"user_resource": 123
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta":{
"transaction_id":"6ffa4d0c9293168f9bfdc7941891fd758ee12482bf73ab3bd1f861966b2a348e",
"timestamp":1542329829
},
"items":[
{
"communication":{
"id":32880,
"created_at":1542329829,
"modified_at":1542329829,
"active":true,
"associated_type":"contact",
"associated_id":88,
"contact_detail_type_id":1,
"destination":"demo@demo.com",
"origin":"user2email@demo.com",
"direction":"Outgoing",
"sent_as_user":{
"id":2,
"created_at":1465354142,
"modified_at":1475200128,
"active":true,
"is_vet":true,
"is_salesperson":true,
"name":"Demo user",
"code":"123123"
},
"content": "example content",
"content_format":"PlainText",
"status":"Done",
"subject":"example subject",
"communicating_type":"contact",
"communicating_id":88,
"template": {
"id": 53,
"created_at": 1542922914,
"modified_at": 1543203202,
"active": true,
"name": "Sympathy Postcard",
"type": "POSTCARD",
"subtype": null,
"additional_information": {
"key": "value",
"custom": "variable"
}
},
"read_at": 1543203200
}
}
],
"messages":[]
}
POST https://api.ezyvet.com/v1/communication
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
associated_type* | string | - | The name of the record type the Communication is directed at. Examples are "Contact" , "Animal", "Consult". |
associated_id* | num | - | The ID of the record the Communication is directed at. |
contact_detail_type_id* | num | - | The ID of ContactDetailType that was used to send the Communication . This will also help define what the format destination should be. |
destination* | string | - | The destination of the Communication in the format defined by the contact_detail_type_id . |
origin | string | - | The origin of the Communication in the format defined by the contact_detail_type_id . |
direction* | enum | - | The direction of the Communication that was sent this will be either Outgoing or Incoming . |
user_resource* | Resource |
- | The Resource of the User that will attached to the Communication . |
content* | string | - | The message of the Communication . |
content_format* | string, enum | - | The format of the content. This will be one of the following: SMS , PlainText , HTML . |
status* | string, enum | - | The status of the Communication . This will be one of the following: Pending , Done , Sending , Failed . Pending status means the communication will wait till a user actions it. Done status means the communication was sent successfully. Sending status means the communication will send once it is generated. Failed status means the communication encountered a error. |
subject | string | "" | The subject of the Communication . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Communication . |
active | bool | - | If true, the Communication is active and visible in ezyVet. |
created_at | num | - | The epoch time when the Communication was created. |
modified_at | num | - | The epoch time when the Communication was last modified. |
associated_type | string | - | The name of the record type the Communication is directed at. Examples are "Contact" , "Animal", "Consult". |
associated_id | num | - | The ID of the record the Communication is directed at. |
contact_detail_type_id | num | - | The ID of ContactDetailType that was used to send the Communication . This will also help define what the format destination should be. |
destination | string | - | The destination of the Communication in the format defined by the contact_detail_type_id . |
origin | string | - | The origin of the Communication in the format defined by the contact_detail_type_id . |
direction | enum | - | The direction of the Communication that was sent this will be either Outgoing or Incoming . |
sent_as_user | User |
- | The Communication sent on behalf of this User . |
content | string | - | The message of the Communication . |
content_format | string, enum | - | The format of the content. This will be one of the following: SMS , PlainText , HTML . |
status | string, enum | - | The status of the Communication . This will be one of the following: Pending , Done , Sending , Failed . Pending status means the communication will wait till a user actions it. Done status means the communication was sent successfully. Sending status means the communication will send once it is generated. Failed status means the communication encountered a error. |
subject | string | "" | The subject of the Communication . |
communicating_type | string | - | The name of the record type the Communication is communicating. Examples are "Contact" , "Animal", "Consult". |
communicating_id | num | - | The ID of the record the Communication is communicating. |
template | Object | null | The template used to generate this Communication 's content. |
read_at | num | null | The epoch time when the Communication is read. Please note that this will only apply to email and SMS Communication records. |
Update a Communication
Updates a Communication
.
Sample Request: Update the
Communication
with ID of 32880.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/communication/32880",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"content": "New example content",
"user_resource": 456
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta":{
"transaction_id":"6ffa4d0c9293168f9bfdc7941891fd758ee12482bf73ab3bd1f861966b2a348e",
"timestamp":1542329829
},
"items":[
{
"communication":{
"id":32880,
"created_at":1542329829,
"modified_at":1542329829,
"active":true,
"associated_type":"contact",
"associated_id":88,
"contact_detail_type_id":1,
"destination":"demo@demo.com",
"origin":"user2email@demo.com",
"direction":"Outgoing",
"sent_as_user":{
"id":3,
"created_at":1465354142,
"modified_at":1475200128,
"active":true,
"is_vet":true,
"is_salesperson":true,
"name":"Demo user 2",
"code":"456456"
},
"content": "New example content",
"content_format":"PlainText",
"status":"Done",
"subject":"example subject",
"communicating_type":"contact",
"communicating_id":88,
"template": {
"id": 53,
"created_at": 1542922914,
"modified_at": 1543203202,
"active": true,
"name": "Sympathy Postcard",
"type": "POSTCARD",
"subtype": null,
"additional_information": {
"key": "value",
"custom": "variable"
}
},
"read_at": 1543203200
}
}
],
"messages":[]
}
HTTP Request
PATCH https://api.ezyvet.com/v1/communication
PATCH Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
associated_type | string | - | The name of the record type the Communication is directed at. Examples are "Contact" , "Animal", "Consult". |
associated_id | num | - | The ID of the record the Communication is directed at. |
contact_detail_type_id | num | - | The ID of ContactDetailType that was used to send the Communication . This will also help define what the format destination should be. |
destination | string | - | The destination of the Communication in the format defined by the contact_detail_type_id . |
origin | string | - | The origin of the Communication in the format defined by the contact_detail_type_id . |
direction | enum | - | The direction of the Communication that was sent this will be either Outgoing or Incoming . |
user_resource | Resource |
- | The Resource of the User that will attached to the Communication . |
content | string | - | The message of the Communication . |
content_format | string, enum | - | The format of the content. This will be one of the following: SMS , PlainText , HTML . |
status | string, enum | - | The status of the Communication . This will be one of the following: Pending , Done , Sending , Failed . Pending status means the communication will wait till a user actions it. Done status means the communication was sent successfully. Sending status means the communication will send once it is generated. Failed status means the communication encountered a error. |
subject | string | "" | The subject of the Communication . |
template | Object | null | The template used to generate this Communication 's content. |
read_at | num | null | The epoch time when the Communication is read. Please note that this will only apply to email and SMS Communication records. |
Delete a communication
Deletes a Communication
.
Sample Request: Delete a
Communication
with an ID of 2
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/communication/32880",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta":{
"items_processed": 1,
"transaction_id":"6ffa4d0c9293168f9bfdc7941891fd758ee12482bf73ab3bd1f861966b2a348e",
"timestamp":1542329829
},
"items":[
{
"communication":{
"id":32880,
"created_at":1542329829,
"modified_at":1542329829,
"active":false,
"associated_type":"contact",
"associated_id":88,
"contact_detail_type_id":1,
"destination":"demo@demo.com",
"origin":"user2email@demo.com",
"direction":"Outgoing",
"sent_as_user":{
"id":2,
"created_at":1465354142,
"modified_at":1475200128,
"active":true,
"is_vet":true,
"is_salesperson":true,
"name":"Demo user",
"code":"123123"
},
"content": "example content",
"content_format":"PlainText",
"status":"Done",
"subject":"example subject",
"communicating_type":"consult",
"communicating_id":1,
"template": {
"id": 53,
"created_at": 1542922914,
"modified_at": 1543203202,
"active": true,
"name": "Sympathy Postcard",
"type": "POSTCARD",
"subtype": null,
"additional_information": {
"key": "value",
"custom": "variable"
}
},
"read_at": 1543203200
}
}
],
"messages":[]
}
HTTP Request
DELETE https://api.ezyvet.com/v1/communication
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Communication . |
active | bool | - | If true, the Communication is active and visible in ezyVet. |
created_at | num | - | The epoch time when the Communication was created. |
modified_at | num | - | The epoch time when the Communication was last modified. |
associated_type | string | - | The name of the record type the Communication is directed at. Examples are "Contact" , "Animal", "Consult". |
associated_id | num | - | The ID of the record the Communication is directed at. |
contact_detail_type_id | num | - | The ID of ContactDetailType that was used to send the Communication . This will also help define what the format destination should be. |
destination | string | - | The destination of the Communication in the format defined by the contact_detail_type_id . |
origin | string | - | The origin of the Communication in the format defined by the contact_detail_type_id . |
direction | enum | - | The direction of the Communication that was sent this will be either Outgoing or Incoming . |
sent_as_user | User |
- | The Communication sent on behalf of this User . |
content | string | - | The message of the Communication . |
content_format | string, enum | - | The format of the content. This will be one of the following: SMS , PlainText , HTML . |
status | string, enum | - | The status of the Communication . This will be one of the following: Pending , Done , Sending , Failed . Pending status means the communication will wait till a user actions it. Done status means the communication was sent successfully. Sending status means the communication will send once it is generated. Failed status means the communication encountered a error. |
subject | string | "" | The subject of the Communication . |
communicating_type | string | - | The name of the record type the Communication is communicating. Examples are "Contact" , "Animal", "Consult". |
communicating_id | num | - | The ID of the record the Communication is communicating. |
template | Object | null | The template used to generate this Communication 's content. |
read_at | num | null | The epoch time when the Communication is read. Please note that this will only apply to email and SMS Communication records. |
Consult
Represents a clinical record for an animal.
Clinical data such as vaccinations, diagnostic results and medications are all linked to a Consult
.
Fetch a Consult
Fetches a list containing Consult
(s). (up to 10)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/consult?animal_id=5",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479935858",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "2"
},
"items": [
{
"consult": {
"id": "233",
"active": "1",
"created_at": "1365021684",
"modified_at": "1365021684",
"ownership_id": "1",
"code": "300233",
"date": "1362772200",
"animal_id": "5",
"vet_id": "24",
"description": "",
"presenting_problem_link_list": [
"113"
],
"referring_vet_contact_id": "2",
"referring_clinic_id": "2"
}
},
{
"consult": {
"id": "243",
"active": "1",
"created_at": "1365041525",
"modified_at": "1365041525",
"ownership_id": "1",
"code": "300243",
"date": "1364865000",
"animal_id": "5",
"vet_id": "86",
"description": "",
"presenting_problem_link_list": [],
"referring_vet_contact_id": "1",
"referring_clinic_id": "1"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/consult
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Consult . |
active | num, string | - | If true, the Consult is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Consult was created. |
modified_at | num, string | - | The epoch time when the Consult was last modified. |
ownership_id | num, string | - | The ID of the ownership Separation to which this Consult belongs. |
code | string | - | The custom code override for the Consult . |
date | string | - | The Consult date of consultation. |
animal_id | string | - | The Consult 's associated Animal ID. |
vet_id | string | - | The Consult 's associated User ID, also known as the case owner. |
referring_vet_contact_id | string | - | The referring vet for the Consult , represented as a Contact marked as a vet (is_vet=1 ). |
referring_clinic_id | num, string | - | The referring clinic ID for the Consult |
description | string | - | The Consult 's general description. |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
presenting_problem_link_list | PresentingProblemLink[] |
- | The Consult 's list of IDs of links. Each link connects the Consult to a PresentingProblem . |
Create a Consult
Creates a single Consult
.
Sample Request: Creating
Consult
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/consult",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"date": 1588205101,
"vet_id": 335,
"animal_id": 556,
"active": true,
"ownership_id": "1",
"referring_vet_contact_id": 373,
"referring_clinic_id": 373,
"description": "Description for this consult.",
"presenting_problem_link_list": [
{"presenting_problem_id":"63"},
{"presenting_problem_id":"64"}
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "1c7295026bd0aba5d2c7905af7d40f65e63f9673d535be73799ded8df2a8f847",
"timestamp": "1588220241"
},
"items": [
{
"consult": {
"id": "3392",
"active": "1",
"created_at": "1588220240",
"modified_at": "1588220241",
"code": "303392",
"date": "1588205101",
"animal_id": "556",
"vet_id": "335",
"referring_vet_contact_id": "373",
"referring_clinic_id": "373",
"description": "Description for this consult.",
"presenting_problem_link_list": [
1282,
1283
],
"ownership_id": "1"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/consult
POST Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
date* | string | - | The Consult date of consultation. |
animal_id* | string | - | The Consult 's associated Animal ID. |
vet_id | string | - | The Consult 's associated User ID, also known as the case owner. |
active | num, string | true | If true or 1, the Consult is active and usable in ezyVet. |
ownership_id | num, string | - | The ID of the ownership Separation to which this Consult belongs. |
referring_vet_contact_id | string | - | The referring vet for the Consult , represented as a Contact marked as a vet (is_vet=1 ). |
referring_clinic_id | num, string | - | The referring clinic ID for the Consult |
description | string | - | The Consult 's general description. |
presenting_problem_link_list | PresentingProblemLink[] |
- | The Consult 's list of IDs of links, each of which bridges the Consult to a PresentingProblem . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Consult . |
active | num, string | - | If true, the Consult is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Consult was created. |
modified_at | num, string | - | The epoch time when the Consult was last modified. |
code | string | - | The custom code override for the Consult . |
date | string | - | The Consult date of consultation. |
animal_id | string | - | The Consult 's associated Animal ID. |
vet_id | string | - | The Consult 's associated User ID, also known as the case owner. |
referring_vet_contact_id | string | - | The referring vet for the Consult , represented as a Contact marked as a vet (is_vet=1 ). |
referring_clinic_id | num, string | - | The referring clinic ID for the Consult |
description | string | - | The Consult 's general description. |
presenting_problem_link_list | PresentingProblemLink[] |
- | The Consult 's list of IDs of links, each of which bridges the Consult to a PresentingProblem . |
ownership_id | num, string | - | The ID of the ownership Separation to which this Consult belongs. |
Update a Consult
Update a single Consult
.
Sample Request: Updating a consult with the ID of 3392. Change the vet from "Dr. Valeth" (ID:335) to "Dr. Rufus" (ID:338). Add a presenting problem with the ID of 65.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/consult/3392",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data":
{
"vet_id": 338,
"presenting_problem_link_list": [
{"presenting_problem_id":"65"},
{"id": 1282},
{"id": 1283}
]
}
}
Response (JSON)
{
"meta": {
"transaction_id": "69d2a1f9dbec2d669573d9b21c9aca7c80b712b3629593e49f80103c18cc4666",
"timestamp": "1588239608",
"items_matched": 1,
"items_processed": 1
},
"items": [
{
"consult": {
"id": "3392",
"active": "1",
"created_at": "1588220240",
"modified_at": "1588239608",
"code": "303392",
"date": "1588205101",
"animal_id": "556",
"vet_id": "338",
"referring_vet_contact_id": "373",
"referring_clinic_id": "373",
"description": "Description for this consult.",
"presenting_problem_link_list": [
"1282",
"1283",
"1284"
],
"ownership_id": "1"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/consult/{id}
PATCH Parameters
Parameter | Type | Default | Description |
---|---|---|---|
date | string | - | The Consult date of consultation. |
animal_id | string | - | The Consult 's associated Animal ID. |
vet_id | string | - | The Consult 's associated User ID, also known as the case owner. |
active | num, string | true | If true or 1, the Consult is active and usable in ezyVet. |
ownership_id | num, string | - | The ID of the ownership Separation to which this Consult belongs. |
referring_vet_contact_id | string | - | The referring vet for the Consult , represented as a Contact marked as a vet (is_vet=1 ). |
referring_clinic_id | num, string | - | The referring clinic ID for the Consult |
description | string | - | The Consult 's general description. |
presenting_problem_link_list | PresentingProblemLink[] |
- | The Consult 's list of IDs of links, each of which bridges the Consult to a PresentingProblem . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Consult . |
active | num, string | - | If true, the Consult is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Consult was created. |
modified_at | num, string | - | The epoch time when the Consult was last modified. |
code | string | - | The custom code override for the Consult . |
date | string | - | The Consult date of consultation. |
animal_id | string | - | The Consult 's associated Animal ID. |
vet_id | string | - | The Consult 's associated User ID, also known as the case owner. |
referring_vet_contact_id | string | - | The referring vet for the Consult , represented as a Contact marked as a vet (is_vet=1 ). |
referring_clinic_id | num, string | - | The referring clinic ID for the Consult |
description | string | - | The Consult 's general description. |
presenting_problem_link_list | PresentingProblemLink[] |
- | The Consult 's list of IDs of links, each of which bridges the Consult to a PresentingProblem . |
ownership_id | num, string | - | The ID of the ownership Separation to which this Consult belongs. |
Delete a Consult
Deletes a Consult
.
Sample Request: Delete a
Consult
with an ID of 3392.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/consult/3392",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "25135dc52cdb0251ef20feb945eef08c15a64a06c51445965a0dcf943fae5a6f",
"timestamp": "1588240136",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/consult/{id}
Response Fields
There are no response fields for a DELETE
operation.
Contact
Represents a contact record. Most Contact
s are customers, though some can be business people, suppliers and so on.
Each contact can have multiple ContactDetail
s, as well as one physical and one postal Address
.
Contacts marked as vets can be used as referring vets.
Fetch a Contact list
Fetches a list containing Contact
(s). (up to 10)
Sample Request: Fetch a list containing one
Contact
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contact?limit=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1529881510",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"contact": {
"id": "465",
"active": "1",
"created_at": "1521505900",
"modified_at": "1529881473",
"code": "200465",
"first_name": "",
"last_name": "",
"business_name": "demo test business",
"is_business": "1",
"is_customer": "0",
"is_supplier": "1",
"is_vet": "0",
"is_syndicate": "0",
"is_staff_member": "0",
"website": "",
"stop_credit": "OK",
"contact_detail_list": [
"714"
],
"address_physical": "987",
"address_postal": "988",
"date_of_birth": "1529835676",
"driver_license_number": "456876345",
"driver_license_issuer": "California",
"driver_license_expiry": "1529898765",
"ownership_id": "1"
}
}],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/contact
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Contact . |
active | num, string | - | If true, the Contact is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Contact was created. |
modified_at | num, string | - | The epoch time when the Contact was last modified. |
ownership_id | num, string | - | The ID of the ownership Separation to which this Contact belongs. |
code | string | - | The custom code override for the Contact . |
first_name | string | - | The Contact 's first name. |
last_name | string | - | The Contact 's last/family name. |
business_name | string | - | The Contact 's business name, if it is a business. |
is_business | bool, string | - | If true, the Contact is a business. |
is_customer | bool, string | - | If true, the Contact is a customer. |
is_supplier | bool, string | - | If true, the Contact is a supplier. |
is_vet | bool, string | - | If true, the Contact is a vet. |
is_syndicate | bool, string | - | If true, the Contact is a syndicate. |
is_staff_member | bool, string | - | If true, the Contact is a staff member. |
website | string | - | The Contact 's website. |
address_postal | num, string | - | The unique identifier of the PostalAddress . |
stop_credit | enum, string | - | Specifies if the Contact can be invoiced: OK (invoiceable), WARNING (issues a warning when invoiced), STOP (cannot be invoiced). |
limit | num, string | 10 | Sets the limit on the number of items returned (range: 1 - 50). |
page | num, string | 1 | Specifies the page number of the result. |
date_of_birth | num | 0 | The date of birth of the primary contact. |
driver_license_number | string | null | The driver license number of the primary contact. |
driver_license_issuer | string | null | The issuer of the driver license of the primary contact. |
driver_license_expiry | num | null | The expiry date of the driver license of the primary contact. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
contact_detail_list | ContactDetail[] |
- | A list containing ContactDetail ID(s) associated with the Contact . |
address_physical | Address |
- | The physical Address associated with the Contact . |
address_postal | Address |
- | The postal Address associated with the Contact . |
Create a Contact
Creates a single Contact
.
Sample Request: Creating
Contact
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contact",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"first_name" : "Geoff",
"last_name" : "Demoton",
"contact_detail_list": [
{
"name" : "Email",
"value" : "demo@demo.com",
"contact_detail_type_id" : 1,
"preferred": 1
},
{
"name" : "Home",
"value" : "012312012",
"contact_detail_type_id" : 3
}
],
"address_physical" : 123,
"stop_credit" : "WARNING"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1529889974"
},
"items": [
{
"contact": {
"id": "501",
"active": "1",
"created_at": "1529889972",
"modified_at": "1529889972",
"code": "200501",
"first_name": "first",
"last_name": "last",
"business_name": "",
"is_business": "0",
"is_customer": "1",
"is_supplier": "0",
"is_vet": "0",
"is_syndicate": "0",
"is_staff_member": "0",
"website": "",
"stop_credit": "WARNING",
"contact_detail_list": [
"716",
"717"
],
"address_physical": "123",
"address_postal": "1045",
"date_of_birth": "1529889972",
"driver_license_number": "DK456787",
"driver_license_issuer": "California",
"driver_license_expiry": "17712347890",
"ownership_id": "1"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/contact
POST Parameters
Parameter | Type | Default | Description |
---|---|---|---|
ownership_id | num, string | - | The ID of the ownership Separation to which this Contact belongs. |
code | string | - | The custom code override for the Contact . |
first_name | string | - | The Contact 's first name. |
last_name* | string | - | The Contact 's last/family name. |
business_name | string | - | The Contact 's business name, if it is a business. |
is_business | bool, string | - | If true, the Contact is a business. |
is_customer | bool, string | - | If true, the Contact is a customer. |
is_supplier | bool, string | - | If true, the Contact is a supplier. |
is_vet | bool, string | - | If true, the Contact is a vet. |
is_syndicate | bool, string | - | If true, the Contact is a syndicate. |
is_staff_member | bool, string | - | If true, the Contact is a staff member. |
address_postal | num, string | - | The unique identifier of the PostalAddress . |
contact_detail_list* | ContactDetail[] |
- | A list containing ContactDetail objects to be associated with the Contact . |
address_physical | Address |
- | The physical Address associated with the Contact . |
address_postal | Address |
- | The postal Address associated with the Contact . |
stop_credit | enum, string | - | Specifies if the Contact can be invoiced: OK (invoiceable), WARNING (issues a warning when invoiced), STOP (cannot be invoiced). |
date_of_birth | num | 0 | The date of birth of the primary contact. |
driver_license_number | string | null | The driver license number of the primary contact. |
driver_license_issuer | string | null | The issuer of the driver license of the primary contact. |
driver_license_expiry | num | null | The expiry date of the driver license of the primary contact. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
active | num, string | - | If true, the Contact is active and usable in ezyVet. |
id | num, string | - | The ID number used by the system to uniquely identify a Contact . |
created_at | num, string | - | The epoch time when the Contact was created. |
modified_at | num, string | - | The epoch time when the Contact was last modified. |
Update a Contact
Update a single Contact
.
Sample Request: Updating a contact with the ID of 1. A contact_detail_list is provided with this PATCH request so a new ContactDetail will be created and the ContactDetail with the id of 132 will be retained. Any other ContactDetails that were attached to the
Contact
will be deleted.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contact/1",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data":
{
"last_name" : "modified last name",
"address_physical" :
{
"street_1" : "street1",
"street_2": "street2",
"suburb" : "suburb",
"city" : "city",
"region" : "region",
"post_code" : "postcode",
"country_id" : "country",
"state" : "state",
"longitude" : "30",
"latitude" : "10"
},
"contact_detail_list" : [
{
"name" : "Demo Email",
"value" : "demo@demo.com",
"contact_detail_type_id" : "1"
},
{
"id" : 132
}
],
"stop_credit" : "OK"
}
Response (JSON)
{
"meta": {
"timestamp": "1529880503",
"items_matched": 1,
"items_processed": 1
},
"items": [
{
"contact": {
"id": "33",
"active": "1",
"created_at": "1313463417",
"modified_at": 1529880501,
"code": "200033",
"first_name": "Donald",
"last_name": "Demo change",
"business_name": "",
"is_business": "0",
"is_customer": "1",
"is_supplier": "0",
"is_vet": "0",
"is_syndicate": "0",
"is_staff_member": "0",
"website": "",
"stop_credit": "OK",
"contact_detail_list": [
"132",
"154",
],
"address_physical": "63",
"address_postal": "64",
"primary_contact_date_of_birth": "1529835676",
"driver_license_number": "456876345",
"driver_license_issuer": "California",
"driver_license_expiry": "1529898765",
"ownership_id": "1"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/contact
PATCH Parameters
Parameter | Type | Default | Description |
---|---|---|---|
active | num, string | - | If true, the Contact is active and usable in ezyVet. |
ownership_id | num, string | - | The ID of the ownership Separation to which this Contact belongs. |
code | string | - | The custom code override for the Contact . |
first_name | string | - | The Contact 's first name. |
last_name | string | - | The Contact 's last/family name. |
business_name | string | - | The Contact 's business name, if it is a business. |
is_business | bool, string | - | If true, the Contact is a business. |
is_customer | bool, string | - | If true, the Contact is a customer. |
is_supplier | bool, string | - | If true, the Contact is a supplier. |
is_vet | bool, string | - | If true, the Contact is a vet. |
is_syndicate | bool, string | - | If true, the Contact is a syndicate. |
is_staff_member | bool, string | - | If true, the Contact is a staff member. |
address_postal | num, string | - | The unique identifier of the PostalAddress . |
contact_detail_list | ContactDetail[] |
- | A list containing ContactDetail objects to be associated with the Contact . |
address_physical | Address |
- | The physical Address associated with the Contact . |
address_postal | Address |
- | The postal Address associated with the Contact . |
stop_credit | enum, string | - | Specifies if the Contact can be invoiced: OK (invoiceable), WARNING (issues a warning when invoiced), STOP (cannot be invoiced). |
date_of_birth | num | 0 | The date of birth of the primary contact. |
driver_license_number | string | null | The driver license number of the primary contact. |
driver_license_issuer | string | null | The issuer of the driver license of the primary contact. |
driver_license_expiry | num | null | The expiry date of the driver license of the primary contact. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Contact . |
created_at | num, string | - | The epoch time when the Contact was created. |
modified_at | num, string | - | The epoch time when the Contact was last modified. |
Delete a Contact
Deletes a Contact
.
Sample Request: Delete a
Contact
with an ID of 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contact/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/contact
Response Fields
There are no response fields for a DELETE
operation.
Contact v2
Represents a contact record. Most Contact
s are customers, though they may also be businesses, suppliers and so on.
Each contact can have multiple ContactDetail
s, as well as one physical and one postal Address
.
Contacts marked as vets can be used as referring vets.
Fetch a Contact list
Fetches a list containing Contact
(s). (up to 10)
HTTP Request
GET https://api.ezyvet.com/v2/contact
Sample Request: Fetch a list containing one
Contact
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/contact,
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Sample Response (JSON)
{
"meta": {
"timestamp": "1529889974"
},
"items": [
{
"contact": {
"id": 3,
"uid": "contact_jGV3OcyEWAoEZFnerzXCr",
"created_at": 0,
"modified_at": 1683847354,
"active": true,
"code": "ROUSGP",
"first_name": "John",
"last_name": "Smith",
"business_name": "ezyVet",
"is_customer": false,
"is_business": true,
"is_vet": false,
"is_supplier": false,
"is_syndicate": false,
"is_staff_member": false,
"stop_credit": "OK",
"website": "ezyvet.com",
"address_physical": 1,
"address_postal": 10,
"contact_detail_list": [
{
"id": 1,
"name": "Business name",
"type_id": 4,
"preferred": true,
"value": "28193712933",
"value_cleaned": "0028193712933"
}
]
}
}
],
"messages": []
}
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Contact . |
uid | string | - | The globally unique identifier to identify a Contact . |
created_at | num, string | - | The epoch time when the Contact was created. |
modified_at | num, string | - | The epoch time when the Contact was last modified. |
active | num, string | - | If true, the Contact is active and usable in ezyVet. |
code | string | - | The custom code override for the Contact . |
first_name | string | - | The Contact 's first name. |
last_name | string | - | The Contact 's last/family name. |
business_name | string | - | The Contact 's business name, if it is a business. |
is_customer | bool, string | - | If true, the Contact is a customer. |
is_vet | bool, string | - | If true, the Contact is a vet. |
is_supplier | bool, string | - | If true, the Contact is a supplier. |
is_syndicate | bool, string | - | If true, the Contact is a syndicate. |
is_staff_member | bool, string | - | If true, the Contact is a staff member. |
stop_credit | enum, string | - | Specifies if the Contact can be invoiced: OK (invoiceable), WARNING (issues a warning when invoiced), STOP (cannot be invoiced). |
website | string | - | The Contact 's website. |
address_physical | num, string | - | The unique identifier of the PhysicalAddress . |
address_postal | num, string | - | The unique identifier of the PostalAddress . |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
contact_detail_list | ContactDetail[] |
- | A list containing ContactDetail ID(s) associated with the Contact . |
ContactAssociation
Fetch a list of contact associations
Fetches a list of ContactAssociation
.
Sample Request: Get a list of ContactAssociations.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contactassociation?contact_id=61",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 2,
"items_total": 2,
"transaction_id": "376c0f4df729ef8c2d7863ff95768b97e060552d9b4fc2bbc6d5eea200d8526c",
"timestamp": 1554691590
},
"items": [
{
"contactassociation": {
"id": 62,
"created_at": 1365656652,
"modified_at": 1365656652,
"active": true,
"contact_id": 61,
"associatedcontact_id": 61,
"associationclass": "Family"
}
},
{
"contactassociation": {
"id": 101,
"created_at": 1365656652,
"modified_at": 1365656652,
"active": false,
"contact_id": 61,
"associatedcontact_id": 23,
"associationclass": "Other"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/contactassociation?contact_id=61
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ContactAssociation . |
contact_id | num, string | The Contact to fetch the associated contact ids for |
|
active | num, string | - | If true, the ContactAssociation is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ContactAssociation was created. |
modified_at | num, string | - | The epoch time when the ContactAssociation was last modified. |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Response Fields
Includes all query parameters above, plus:
Parameter | Type | Default | Description |
---|---|---|---|
associatedcontact_id | Contact |
- | The id of the Contact associated |
associationclass | enum |
Other |
The association class for the contact associated. |
ContactDetail
Represents a method of communication with a contact.
Fetch a ContactDetail list
Fetches a list containing ContactDetail
(s). (up to 10)
Sample Request: Get a list of
ContactDetail
(s)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contactdetail",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"contactdetail": {
"id": "3",
"active": "1",
"created_at": "1307421010",
"modified_at": "1462835238",
"name": "Business Phone",
"value": "12345679",
"contact_id": "5",
"value_cleaned": "006412345679",
"contact_detail_type_id": "4",
"preferred": "1",
"subscription_groups": [
"General",
"Reminders",
"Accounts"
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/contactdetail
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ContactDetail . |
active | bool | true | If true, the ContactDetail is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ContactDetail was created. |
modified_at | num, string | - | The epoch time when the ContactDetail was last modified. |
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
value_cleaned | string | - | The value of the ContactDetail record which has been cleaned of all special characters and prefixed with the country code. This filter can be used for phone or fax numbers but it should not be used for email addresses. |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
contact_detail_type_id | num, string | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | false | If true, this ContactDetail is a preferred contact method for the related Contact . |
subscription_groups | array of string | [] | A list of subscription groups that this ContactDetail is subscribed to (General, Reminders, Accounts). |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ContactDetail . |
active | bool | true | If true, the ContactDetail is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ContactDetail was created. |
modified_at | num, string | - | The epoch time when the ContactDetail was last modified. |
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
value_cleaned | string | - | The value of the ContactDetail record which has been cleaned of all special characters and prefixed with the country code. This filter can be used for phone or fax numbers but it should not be used for email addresses. |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
contact_detail_type_id | num, string | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | false | If true, this ContactDetail is a preferred contact method for the related Contact . |
subscription_groups | array of string | [] | A list of subscription groups that this ContactDetail is subscribed to (General, Reminders, Accounts). |
Create a ContactDetail Record
Creates a single ContactDetail
record.
Sample Request: Creating
ContactDetail
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contactdetail",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data":
{
"name": "Business Phone",
"value": "02112312312",
"contact_id": "911",
"contact_detail_type_id": "3",
"subscription_groups": [
"General",
"Reminders",
"Accounts"
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1529889974"
},
"items": [
{
"contactdetail": {
"id": "2332",
"active": "1",
"created_at": "1667264085",
"modified_at": "1667264085",
"name": "Business Phone",
"value": "02112312312",
"contact_id": "911",
"value_cleaned": "00642112312312",
"contact_detail_type_id": "3",
"preferred": "0",
"subscription_groups": [
"General",
"Reminders",
"Accounts"
]
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/contactdetail
POST Parameters
Parameter | Type | Default | Description |
---|---|---|---|
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
contact_detail_type_id | num, string | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | false | If true, this ContactDetail is a preferred contact method for the related Contact . |
subscription_groups | array of string | [] | A list of subscription groups that this ContactDetail is subscribed to (General, Reminders, Accounts). |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ContactDetail . |
active | bool | 1 | If true, the ContactDetail is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ContactDetail was created. |
modified_at | num, string | - | The epoch time when the ContactDetail was last modified. |
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
value_cleaned | string | - | The value of the ContactDetail record which has been cleaned of all special characters and prefixed with the country code. This filter can be used for phone or fax numbers but it should not be used for email addresses. |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
contact_detail_type_id | num, string | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | 0 | If true, this ContactDetail is a preferred contact method for the related Contact . |
subscription_groups | array of string | [] | A list of subscription groups that this ContactDetail is subscribed to (General, Reminders, Accounts). |
Update a ContactDetail Record
Updates an existing ContactDetail
record.
Sample Request: Updating
ContactDetail
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contactdetail/2332",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data":
{
"active": "1",
"name": "Business Phone",
"value": "02112312312",
"contact_id": "911",
"contact_detail_type_id": "3",
"subscription_groups": [
"General",
"Reminders",
"Accounts"
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1529889974"
},
"items": [
{
"contactdetail": {
"id": "2332",
"active": "1",
"created_at": "1667264085",
"modified_at": "1667264085",
"name": "Business Phone",
"value": "02112312312",
"contact_id": "911",
"value_cleaned": "00642112312312",
"contact_detail_type_id": "3",
"preferred": "0",
"subscription_groups": [
"General",
"Reminders",
"Accounts"
]
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/contactdetail/2332
PATCH Parameters
Parameter | Type | Default | Description |
---|---|---|---|
active | bool | - | If true, the ContactDetail is active and usable in ezyVet. |
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
contact_detail_type_id | num, string | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | - | If true, this ContactDetail is a preferred contact method for the related Contact . |
subscription_groups | array of string | - | A list of subscription groups that this ContactDetail is subscribed to (General, Reminders, Accounts). |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ContactDetail . |
active | bool | 1 | If true, the ContactDetail is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ContactDetail was created. |
modified_at | num, string | - | The epoch time when the ContactDetail was last modified. |
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
value_cleaned | string | - | The value of the ContactDetail record which has been cleaned of all special characters and prefixed with the country code. This filter can be used for phone or fax numbers but it should not be used for email addresses. |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
contact_detail_type_id | num, string | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | 0 | If true, this ContactDetail is a preferred contact method for the related Contact . |
subscription_groups | array of string | [] | A list of subscription groups that this ContactDetail is subscribed to (General, Reminders, Accounts). |
ContactDetail V2
Represents a method of communication with a contact.
Fetch a ContactDetail list
Fetches a list containing ContactDetail
(s). (up to 10)
Sample Request: Get a list of
ContactDetail
(s)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/contactdetail",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"contactdetail": {
"id": "3",
"active": true,
"created_at": 1307421010,
"modified_at": 1462835238,
"name": "Business Phone",
"value": "12345679",
"contact_id": 5,
"value_cleaned": "006412345679",
"type_id": 4,
"preferred": true
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/contactdetail
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a ContactDetail . |
active | bool | true | If true, the ContactDetail is active and usable in ezyVet. |
created_at | num | - | The epoch time when the ContactDetail was created. |
modified_at | num | - | The epoch time when the ContactDetail was last modified. |
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
value_cleaned | string | - | The value of the ContactDetail record which has been cleaned of all special characters and prefixed with the country code. This filter can be used for phone or fax numbers but it should not be used for email addresses. |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
type_id | num | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | false | If true, this ContactDetail is a preferred contact method for the related Contact . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a ContactDetail . |
active | bool | true | If true, the ContactDetail is active and usable in ezyVet. |
created_at | num | - | The epoch time when the ContactDetail was created. |
modified_at | num | - | The epoch time when the ContactDetail was last modified. |
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
value_cleaned | string | - | The value of the ContactDetail record which has been cleaned of all special characters and prefixed with the country code. This filter can be used for phone or fax numbers but it should not be used for email addresses. |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
type_id | num | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | false | If true, this ContactDetail is a preferred contact method for the related Contact . |
Create a ContactDetail Record
Creates a single ContactDetail
record.
Sample Request: Creating
ContactDetail
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/contactdetail",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data":
{
"name": "Business Phone",
"value": "02112312312",
"contact_uid": "contact_ri57EocI0RNWtYaAFrMGo",
"type_id": "3",
"preferred": true
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1529889974"
},
"items": [
{
"contactdetail": {
"id": 2332,
"active": true,
"created_at": 1667264085,
"modified_at": 1667264085,
"name": "Business Phone",
"value": "02112312312",
"contact_id": 4,
"value_cleaned": "00642112312312",
"type_id": "3",
"preferred": true
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v2/contactdetail
POST Parameters
Mandatory fields are marked with a *.
You will need pass in one of contact_id
or contact_uid
Parameter | Type | Default | Description |
---|---|---|---|
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value * | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
contact_id * | int | - | The ID of the Contact to whom this ContactDetail is assigned. |
contact_uid * | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
type_id * | num, string | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | false | If true, this ContactDetail is a preferred contact method for the related Contact . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a ContactDetail . |
active | bool | true | If true, the ContactDetail is active and usable in ezyVet. |
created_at | num | - | The epoch time when the ContactDetail was created. |
modified_at | num | - | The epoch time when the ContactDetail was last modified. |
name | string | - | The name of the ContactDetail , such as "Home Phone" or "Business E-mail". |
value | string | - | The value of the ContactDetail , such as the number, or the email (depending on its ContactDetailType ). |
value_cleaned | string | - | The value of the ContactDetail record which has been cleaned of all special characters and prefixed with the country code. This filter can be used for phone or fax numbers but it should not be used for email addresses. |
contact_id | string | - | The ID of the Contact to whom this ContactDetail is assigned. |
type_id | num | - | The ID of the ContactDetailType of this ContactDetail . |
preferred | bool | false | If true, this ContactDetail is a preferred contact method for the related Contact . |
ContactDetailType
Specifies the type of contact method, such as "Mobile" or "Email".
Fetch a ContactDetailType list
Fetches a list containing ContactDetailType
(s). (up to 10)
Sample Request: Get a list of
ContactDetailType
(s) supported.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/contactdetailtype",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"procedure": {
"id": "1",
"active": "1",
"created_at": "1307421010",
"modified_at": "1462835238",
"name": "Email"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/contactdetailtype
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an ContactDetailType . |
active | num, string | - | If true, the ContactDetailType is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ContactDetailType was created. |
modified_at | num, string | - | The epoch time when the ContactDetailType was last modified. |
name | string | - | The name of the ContactDetailType . |
Country
Represents a country recognized by the clinic.
Each Country
must belong to a Species
.
Fetch a Country list
Fetches a list containing Country
(s). (up to 10)
Sample Request: Get the
Country
ID of New Zealand.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/country?name=New+Zealand",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"country": {
"id": "153",
"active": "1",
"created_at": 1480035980,
"modified_at": 1480035980,
"name": "New Zealand"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/country
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Country . |
active | num, string | - | If true, the Country is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Country was created. |
modified_at | num, string | - | The epoch time when the Country was last modified. |
name | string | - | The name of the Country . |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Diagnostic
A Diagnostic
represents a Diagnostic within ezyVet.
Fetch a Diagnostic
Fetches a Diagnostic
Sample Request: Get the
Diagnostic
with ID 115.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/Diagnostic/115
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1536190503",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1",
"transaction_id": "4c3922593fc4dfa0d570f1bc284862175e9391fa9c33613debc0ad0031e70019"
},
"items": [
{
"diagnostic": {
"id": "115",
"active": "1",
"created_at": "0",
"modified_at": "0",
"name": "B12/Folate",
"code": "B12/Folate",
"supplier_contact_id": ""
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/diagnostic
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | string, num | - | The ID number used by the system to uniquely identify a Diagnostic . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | string, num | - | The ID number used by the system to uniquely identify a Diagnostic . |
active | string, num | - | If true, the Diagnostic is active and usable in ezyVet. |
created_at | string, num | - | The epoch time when the Diagnostic was created. |
modified_at | string, num | - | The epoch time when the Diagnostic was last modified. |
name | string | - | The name of the Diagnostic . |
code | string | - | A code assigned by an ezyVet user to keep track of the Diagnostic . This value is subject to change. |
supplier_contact_id | string | - | The suppliers Contact ID. |
DiagnosticResult
The result of a diagnostic. It is sometimes also referred to as a lab result.
Each DiagnosticResult
must be linked to an Animal
.
Fetch a Diagnostic Result list
Fetches a list containing DiagnosticResult
(s). (up to 10)
Sample Request: Get
DiagnosticResult
s forAnimal
"Doggo" (ID:5).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticresult?animal_id=5",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"diagnosticresult": {
"id": "21",
"active": "1",
"created_at": "1393954326",
"modified_at": "1393954326",
"ownership_id": "1",
"consult_id": "883",
"animal_id": "5",
"supplier_id": "2",
"vet_id": "5",
"diagnostic_request_id": "1",
"reference_number": "US59-DR280",
"timestamp": "1393954296",
"specifics": "Sent diagnostic results early morning.",
"outcome": "
This is heading 1
========
This is heading 2
--------
Results show the pupper is fine.
[LINK](https://ezyvet.com)
Below is an external image:

This is: *Italic text* OR _Italic text_
This is: **Bold text** OR __Bold text__
* Unordered list item 1
* Unordered list item 2
1. Ordered List 1
2. Ordered List 2
| Tables | With | Markdown |
| ------------- | :-----------: | -------: |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Here is the link to the documentation - https://commonmark.org/help/
",
"diagnostic_result_item_list": [
"12"
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/diagnosticresult
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an DiagnosticResult . |
active | num, string | - | If true, the DiagnosticResult is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the DiagnosticResult was created. |
modified_at | num, string | - | The epoch time when the DiagnosticResult was last modified. |
ownership_id | num, string | - | The ID of the Separation to which this DiagnosticResult belongs. |
consult_id | num, string | - | Refers to the ID of the Consult where the DiagnosticResult is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
supplier_id | num, string | - | Refers to the ID of the Contact (who is a supplier) of the diagnostic. |
vet_id | string | - | Refers to the ID of the User (who is a vet) associated with the DiagnosticResult . |
diagnostic_request_id | num, string | - | Refers to the ID of the DiagnosticRequest linked to the DiagnosticResult . |
reference_number | num, string | - | Refers to the reference number of the DiagnosticRequest linked to the DiagnosticResult . |
timestamp | num, string | - | Generally refers to the date when the results of the diagnostic were released. This doesn't necessarily refer to when the DiagnosticResult record was created. |
specifics | string | - | Specifics/notes about the DiagnosticResult . |
outcome | string | - | Notes about the result of the DiagnosticResult . This can be in markdown format. |
limit | num, string | 10 | Sets the limit on the number of items returned (range: 1 - 50) |
page | num, string | 1 | Specifies the page number of the result. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
diagnostic_result_item_list | DiagnosticResultItem[] |
- | Contains a list of DiagnosticResultItem (s). |
Create a Diagnostic Result
Creates a single DiagnosticResult
.
It is generally recommended (but not required) to supply the diagnostic_request_id
when creating diagnostic results. ezyVet will automatically
populate the IDs for the animal, consult, contact and even vet based from this. This lets you avoid any validation issues, such as when you try
to provide an animal with the wrong contact owner.
You can still specify each of these individually, and the API will automatically figure out the rest. For example, if you provide the animal_id
, the API will automatically populate the contact_id
.
Sample Request: Create a
DiagnosticResult
for a given diagnostic request.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticresult",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
},
"data": {
"diagnostic_request_id": "1",
"diagnostic_result_item_list": [
{
"name":"GLUC",
"value":"4.2",
"range_low":"3.9",
"range_high":"5.5",
"unit":"mmol/L"
}
],
"outcome": "
This is heading 1
========
This is heading 2
--------
Results show the pupper is fine.
[LINK](https://ezyvet.com)
Below is an external image:

This is: *Italic text* OR _Italic text_
This is: **Bold text** OR __Bold text__
* Unordered list item 1
* Unordered list item 2
1. Ordered List 1
2. Ordered List 2
| Tables | With | Markdown |
| ------------- | :-----------: | -------: |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Here is the link to the documentation - https://commonmark.org/help/
",
"external_link" : "https://demolink.com/link"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1497838663"
},
"items": [
{
"diagnosticresult": {
"id": "60",
"active": "1",
"created_at": "1497838662",
"modified_at": "1497838662",
"ownership_id": "1",
"contact_id": "4",
"consult_id": "2",
"animal_id": "2",
"vet_id": "8",
"diagnostic_request_id": "1",
"timestamp": "1497838662",
"specifics": "Diagnostic Request Specifics",
"outcome": "
This is heading 1
========
This is heading 2
--------
Results show the pupper is fine.
[LINK](https://ezyvet.com)
Below is an external image:

This is: *Italic text* OR _Italic text_
This is: **Bold text** OR __Bold text__
* Unordered list item 1
* Unordered list item 2
1. Ordered List 1
2. Ordered List 2
| Tables | With | Markdown |
| ------------- | :-----------: | -------: |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Here is the link to the documentation - https://commonmark.org/help/
",
"diagnostic_result_item_list": [
"49"
]
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/diagnosticresult
POST Parameters
Parameter | Type | Default | Description |
---|---|---|---|
active | bool, string | 1 | If true, the DiagnosticResult is active and usable in ezyVet. |
consult_id | num, string | - | Refers to the ID of the Consult where the DiagnosticResult is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
supplier_id | num, string | - | Refers to the ID of the Contact (who is a supplier) of the diagnostic. |
vet_id | string | - | Refers to the ID of the User (who is a vet) associated with the DiagnosticResult . |
diagnostic_request_id | num, string | - | Refers to the ID of the DiagnosticRequest linked to the DiagnosticResult . |
timestamp | num, string | Current epoch | Generally refers to the date when the results of the diagnostic were released. This doesn't necessarily refer to when the DiagnosticResult record was created. |
specifics | string | - | Specifics/notes about the DiagnosticResult . |
outcome | string | - | Notes about the result of the DiagnosticResult . This can be in markdown format. |
diagnostic_result_item_list | DiagnosticResultItem[] |
- | Contains a list of DiagnosticResultItem (s). |
external_link | string | - | An external link for users to view any additional data. |
Response Fields
Includes most post parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an DiagnosticResult . |
created_at | num, string | - | The epoch time when the DiagnosticResult was created. |
modified_at | num, string | - | The epoch time when the DiagnosticResult was last modified. |
ownership_id | num, string | - | The ID of the Separation to which this DiagnosticResult belongs. |
Update a Diagnostic Result
Update a DiagnosticResult
.
Sample Request: Update a
DiagnosticResult
for ID = 9.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticresult/9",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json"
},
"data": {
"specifics" : "Some specifics",
"external_link" : "https://demolink.com/link"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1497838663"
},
"items": [
{
"diagnosticresult": {
"id": "9",
"active": "1",
"created_at": "1497838662",
"modified_at": "1497838662",
"ownership_id": "1",
"contact_id": "4",
"consult_id": "2",
"animal_id": "2",
"vet_id": "8",
"diagnostic_request_id": "1",
"timestamp": "1497838662",
"specifics": "Some specifics",
"outcome": "
This is heading 1
========
This is heading 2
--------
Results show the pupper is fine.
[LINK](https://ezyvet.com)
Below is an external image:

This is: *Italic text* OR _Italic text_
This is: **Bold text** OR __Bold text__
* Unordered list item 1
* Unordered list item 2
1. Ordered List 1
2. Ordered List 2
| Tables | With | Markdown |
| ------------- | :-----------: | -------: |
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Here is the link to the documentation - https://commonmark.org/help/
",
"diagnostic_result_item_list": [
"49"
]
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/diagnosticresult
PATCH Parameters
Parameter | Type | Default | Description |
---|---|---|---|
active | bool, string | 1 | If true, the DiagnosticResult is active and usable in ezyVet. |
consult_id | num, string | - | Refers to the ID of the Consult where the DiagnosticResult is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
supplier_id | num, string | - | Refers to the ID of the Contact (who is a supplier) of the diagnostic. |
vet_id | string | - | Refers to the ID of the User (who is a vet) associated with the DiagnosticResult . |
diagnostic_request_id | num, string | - | Refers to the ID of the DiagnosticRequest linked to the DiagnosticResult . |
timestamp | num, string | Current epoch | Generally refers to the date when the results of the diagnostic were released. This doesn't necessarily refer to when the DiagnosticResult record was created. |
specifics | string | - | Specifics/notes about the DiagnosticResult . |
outcome | string | - | Notes about the result of the DiagnosticResult . This can be in markdown format. |
diagnostic_result_item_list | DiagnosticResultItem[] |
- | Contains a list of DiagnosticResultItem (s). |
external_link | string | - | An external link for users to view any additional data. |
Response Fields
Includes most patch parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an DiagnosticResult . |
created_at | num, string | - | The epoch time when the DiagnosticResult was created. |
modified_at | num, string | - | The epoch time when the DiagnosticResult was last modified. |
ownership_id | num, string | - | The ID of the Separation to which this DiagnosticResult belongs. |
Delete a Diagnostic Result
Delete a DiagnosticResult
.
Sample Request: Delete the
DiagnosticResult
with ID of10
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticresult/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/diagnosticresult
Response Fields
There are no response fields for a DELETE
operation.
DiagnosticResultItem
An item in a diagnostic result that contains a measure of a particular diagnostic, as well as the ranges for it. For example, the item may indicate the glucose levels, as well as the minimum and maximum thresholds for it.
Each DiagnosticResultItem
is linked to a DiagnosticResult
.
Fetch a DiagnosticResultItem list
Fetches a list DiagnosticResultItem
(s) for a DiagnosticResult
. (up to 10)
Sample Request: Get
DiagnosticResultItem
s for a givenDiagnosticResult
(ID:24).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticresultitem?diagnostic_result_id=5",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"diagnosticresultitem": {
"id": "3",
"active": "1",
"created_at": "1377495460",
"modified_at": "1377495480",
"timestamp": "1377432000",
"diagnostic_result_id": "24",
"name": "GLU",
"value": "5.0",
"unit": "mmol/L",
"range_low": "3.3",
"range_high": "6.1",
"qualifier": "",
"notes": "Normal"
}
},
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/diagnosticresultitem
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an DiagnosticResultItem . |
active | num, string | - | If true, the DiagnosticResultItem is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the DiagnosticResultItem was created. |
modified_at | num, string | - | The epoch time when the DiagnosticResultItem was last modified. |
timestamp | num, string | - | Generally refers to the date when the the particular item was finished. This doesn't necessarily refer to when the DiagnosticResultItem record was created. |
diagnostic_result_id | num, string | - | Refers to the ID of the DiagnosticResult where the DiagnosticResultItem is attached. |
name | string | - | Name of the DiagnosticResultItem . |
value | string | - | Resulting value of the DiagnosticResultItem . |
unit | string | - | Unit of measurement of the DiagnosticResultItem . |
range_low | string | - | Low threshold value of the DiagnosticResultItem . |
range_high | string | - | High threshold value of the DiagnosticResultItem . |
qualifier | string | - | The qualifier of the DiagnosticResultItem . |
notes | string | - | Notes about the DiagnosticResultItem . |
limit | num, string | 10 | Sets the limit on the number of items returned (range: 1 - 50) |
page | num, string | 1 | Specifies the page number of the result. |
Create a DiagnosticResultItem
Creates a single DiagnosticResultItem
.
Each DiagnosticResultItem
must be linked to a DiagnosticResult
.
Sample Request: Create a
DiagnosticResultItem
for a givenDiagnosticResult
. (ID:62)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticresultitem",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
},
"data": {
"name": "GLUC",
"value": "4.2",
"range_low": "3.9",
"range_high": "5.5",
"unit": "mmol/L",
"diagnostic_result_id": "62"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1497840199"
},
"items": [
{
"diagnosticresultitem": {
"id": "54",
"active": "1",
"created_at": "1497840198",
"modified_at": "1497840198",
"timestamp": "1497840198",
"diagnostic_result_id": "62",
"name": "GLUC",
"value": "4.2",
"unit": "mmol/L",
"range_low": "3.9",
"range_high": "5.5",
"qualifier": "",
"notes": ""
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/diagnosticresultitem
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
timestamp | num, string | - | Generally refers to the date when the the particular item was finished. This doesn't necessarily refer to when the DiagnosticResultItem record was created. |
diagnostic_result_id | num, string | - | Refers to the ID of the DiagnosticResult where the DiagnosticResultItem is attached. |
name | string | - | Name of the DiagnosticResultItem . |
value | string | - | Resulting value of the DiagnosticResultItem . |
unit | string | - | Unit of measurement of the DiagnosticResultItem . |
range_low | string | - | Low threshold value of the DiagnosticResultItem . |
range_high | string | - | High threshold value of the DiagnosticResultItem . |
qualifier | string | - | The qualifier of the DiagnosticResultItem . |
notes | string | - | Notes about the DiagnosticResultItem . |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an DiagnosticResultItem . |
active | num, string | - | If true, the DiagnosticResultItem is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the DiagnosticResultItem was created. |
modified_at | num, string | - | The epoch time when the DiagnosticResultItem was last modified. |
DiagnosticRequest
A DiagnositcRequest
represents a request for a Diagnostic or a Integrated Diagnostic.
Fetch a DiagnosticRequest
Fetches a DiagnositcRequest
Sample Request: Get the
DiagnositcRequest
with an ID 1435.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticrequest/1435",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1528348635",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1",
},
"items": [
{
"diagnosticrequest": {
"id": 1435,
"active": true,
"created_at": "1527812992",
"modified_at": "1527813000",
"timestamp": 1527812978,
"contact_id": 2539,
"animal_id": 6000,
"consult_id": 119307,
"vet_id": 22,
"reference_number": "AU10495-DR1435",
"specifics": "",
"status": "Received by FUSE",
"supplier_id": 13780,
"diagnostic_list": [
{
"id": 1624,
"active": "1",
"created_at": "1527812992",
"modified_at": "1527812992",
"diagnostic_id": 753,
"name": "Prep Profile II",
"diagnostic_class": "IntegratedDiagnostic",
"code": "Prep"
}
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/diagnosticrequest
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a DiagnosticRequest . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a DiagnosticRequest . |
active | bool | - | If true, the DiagnosticRequest is active and usable in ezyVet. |
created_at | num | - | The epoch time when the DiagnosticRequest was created. |
modified_at | num | - | The epoch time when the DiagnosticRequest was last modified. |
timestamp | num | - | The epoch creation date of the DiagnosticRequest . |
contact_id | num | - | The unique identifier for the Contact . |
animal_id | num | - | The unique identifier for the Animal . |
consult_id | num | - | The unique identifier for the Consult . |
vet_id | num | - | The unique identifier for the User that is the vet assigned to the consult. |
reference_number | string | - | The lab request reference ID. |
specifics | string | - | |
status | string | - | |
supplier_id | num | - | The unique identifier for the Supplier the request is sent to. |
ownership_id | num | - | The unique identifier for the ownership that the DiagnosticRequest is part of. |
diagnostic_list | list | [] | A list containing DiagnosticRequestItems |
Create a DiagnosticRequest
Creates a single DiagnosticRequest
.
Sample Request: Creating
DiagnosticRequest
that links to aConsult
with a ID of1
. The objects in the diagnostic_list will all create aDiagnosticRequestItem
that has the same Diagnostic using three different methods
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticrequest",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"status" : "Created",
"specifics" : "Made by APIUSER",
"vet_id" : 1,
"consult_id" : 1,
"ownership_id" : 1,
"diagnostic_list" :
[
{
"diagnostic_id" : 49,
"diagnostic_class" : "IntegratedDiagnostic"
},
{
"product_id" : 2
},
{
"diagnostic_id" : 49,
"product_id" : 2
}
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
POST https://api.ezyvet.com/v1/diagnosticrequest
Response (JSON)
{
"meta": {
"timestamp": "1528683850"
},
"items": [
{
"diagnosticrequest": {
"id": 20,
"active": true,
"created_at": 1528683840,
"modified_at": 1528683840,
"timestamp": 1528683840,
"contact_id": 1,
"animal_id": 1,
"consult_id": 1,
"vet_id": 1,
"reference_number": "NZ50-DR1",
"specifics": "Made by APIUSER",
"status": "Created",
"supplier_id": 1,
"ownership_id": 1,
"diagnostic_list": [
{
"id": 12,
"active": true,
"created_at": 1528683840,
"modified_at": 1528683840,
"diagnostic_id": 49,
"name": "Bile Acids",
"diagnostic_class": "IntegratedDiagnostic",
"code": "HEI-1"
},
{
"id": 13,
"active": true,
"created_at": 1528683840,
"modified_at": 1528683840,
"diagnostic_id": 49,
"name": "Bile Acids",
"diagnostic_class": "IntegratedDiagnostic",
"code": "HEI-1"
},
{
"id": 14,
"active": true,
"created_at": 1528683840,
"modified_at": 1528683840,
"diagnostic_id": 49,
"name": "Bile Acids",
"diagnostic_class": "IntegratedDiagnostic",
"code": "HEI-1"
}
]
}
}
],
"messages": []
}
Post Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
consult_id* | num | - | The unique identifier for the Consult . |
vet_id* | num | - | The unique identifier for the User that is the vet assigned to the consult. |
specifics | string | - | A field where the request specifics / History of the DiagnosticRequest can be entered and visible within ezyVet. |
status | string | - | A field where the status of the DiagnosticRequest can be visible within ezyVet |
supplier_id | num | - | The unique identifier for the Supplier the request is sent to. |
ownership_id | num | - | The unique identifier for the ownership that the DiagnosticRequest is part of. |
diagnostic_list | list | [] | A list containing DiagnosticRequestItems |
Response Fields
Includes Post parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a DiagnosticRequest . |
active | bool | - | If true, the DiagnosticRequest is active and usable in ezyVet. |
created_at | num | - | The epoch time when the DiagnosticRequest was created. |
modified_at | num | - | The epoch time when the DiagnosticRequest was last modified. |
timestamp | num | - | The epoch creation date of the DiagnosticRequest . |
contact_id | num | - | The unique identifier for the Contact . |
animal_id | num | - | The unique identifier for the Animal . |
reference_number | string | - | The lab request reference ID. |
Update a DiagnosticRequest
update a single DiagnosticRequest
.
Sample Request: Updating a
DiagnosticRequest
with the ID of 1. A diagnostic_list was provided so a newDiagnosticRequestItem
will be added to theDiagnosticRequest
and theDiagnosticRequestItem
s with IDs1505
and1503
will be kept. All otherDiagnosticRequestItem
(s) that were in the diagnostic_list will be removed.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticrequest/1",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data":
{
"vet_id" : 76,
"specifics" : "This request has been updated",
"status" : "Updated",
"active" : 1,
"diagnostic_list" :
[
{
"diagnostic_id" : 27,
"diagnostic_class" : "IntegratedDiagnostic"
},
{
"id": 1505
},
{
"id": 1503
}
]
}
HTTP Request
PATCH https://api.ezyvet.com/v1/diagnosticrequest
Post Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
active | bool | - | If true, the DiagnosticRequest is active and usable in ezyVet. |
vet_id | num | - | The unique identifier for the User that is the vet assigned to the consult. |
specifics | string | - | A field where the request specifics / History of the DiagnosticRequest can be entered and visible within ezyVet. |
status | string | - | A field where the status of the DiagnosticRequest can be visible within ezyVet |
diagnostic_list | list | [] | A list containing DiagnosticRequestItems |
Response Fields
Includes Post parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a DiagnosticRequest . |
created_at | num | - | The epoch time when the DiagnosticRequest was created. |
modified_at | num | - | The epoch time when the DiagnosticRequest was last modified. |
timestamp | num | - | The epoch creation date of the DiagnosticRequest . |
contact_id | num | - | The unique identifier for the Contact . |
animal_id | num | - | The unique identifier for the Animal . |
reference_number | string | - | The lab request reference ID. |
consult_id | num | - | The unique identifier for the Consult . |
supplier_id | num | - | The unique identifier for the Supplier the request is sent to. |
ownership_id | num | - | The unique identifier for the ownership that the DiagnosticRequest is part of. |
Delete a DiagnosticRequest
Deletes a DiagnosticRequest
Sample Request: Delete a
DiagnosticResultItem
with an ID of 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/diagnosticrequest/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/diagnosticrequest
Response Fields
There are no response fields for a DELETE
operation.
DiagnosticRequestItem
A DiagnosticRequestItem
record represents a Diagnostic
in a DiagnosticRequest
.
Each DiagnosticRequestItem
must belong to a DiagnosticRequest
.
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a DiagnosticRequestItem . |
active | num | - | If true, the DiagnosticRequestItem is active and usable in ezyVet. |
created_at | num | - | The epoch time when the DiagnosticRequestItem was created. |
modified_at | num | - | The epoch time when the DiagnosticRequestItem was last modified. |
diagnostic_id | num | - | The ID number used by the system to uniquely identify the Diagnostic that the DiagnosticRequestItem represents. |
name | string | - | The name of the Diagnostic . |
diagnostic_class | string | - | The type of Diagnostic |
code | string | - | The code of the Diagnostic . |
Estimate V2
Represents an estimate record. Estimate
s are used to record the estimated cost of a procedure or
service.
Each estimate can have multiple lines, each of which represents a product, procedure or service.
Fetch an Estimate list V2
Fetches a list containing estimate
(s). (up to 10)
Sample Request: Get a list of
estimate
(s).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/estimate",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "b3e88e6b3f6c4d37346ae4a36e6e13a3c01cf0fd5f8b09fb09b6b5945b570673",
"timestamp": 1713436829
},
"items": [
{
"estimate": {
"id": 1,
"created_at": 1713436829,
"modified_at": 1713437500,
"active": true,
"number": "60001",
"name": "Estimate 1",
"total": 110,
"date": 1559023200,
"subtotal": 100,
"tax": 10,
"contact_id": 8,
"animal_id": 123,
"consult_id": 456,
"line_item": [
{
"id": 1,
"created_at": 1558999035,
"modified_at": 1558999035,
"active": true,
"name": "Saline eye solution",
"price": 100,
"pricetax": 10,
"qty": 1,
"total": 100,
"totaltax": 10,
"taxcode": "S",
"taxrate": 10,
"discount": 0
}
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/estimate
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an Estimate . |
active | num, string | - | If true, the Estimate is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Estimate was created. |
modified_at | num, string | - | The epoch time when the Estimate was last modified. |
date | num, string | - | The epoch time of when the Estimate was last updated by the insurer. |
animal_id | num | - | The ID of the Animal associated with Estimate . |
contact_id | num | - | The ID of the Contact associated with Estimate . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID used by the system to uniquely identify an Estimate . |
created_at | num | - | The epoch time when the Estimate was created. |
modified_at | num | - | The epoch time when the Estimate was last modified. |
active | bool | true | If true, the Estimate is active and usable in ezyVet. |
number | string | - | The unique number of the Estimate . |
name | string | - | The name of the Estimate . |
total | num | - | The total amount of the Estimate . |
date | num | - | The epoch time of when the Estimate was last updated by the insurer. |
subtotal | num | - | The subtotal amount of the Estimate . |
tax | num | - | The tax amount of the Estimate . |
contact_id | num | - | The ID of the Contact associated with Estimate . |
animal_id | num | null | The ID of the Animal associated with Estimate . |
consult_id | num | null | The ID of the Consult associated with Estimate . |
line_item | array | [] | A list containing line items associated with the Estimate . |
Response Fields - [line_items
]
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID used by the system to uniquely identify a line item. |
created_at | num | - | The epoch time when the line item was created. |
modified_at | num | - | The epoch time when the line item was last modified. |
active | bool | true | If the line item is active and usable in ezyVet. |
name | string | - | The name of the line item. |
price | num | - | The price of the line item. |
pricetax | num | - | The price tax of the line item. |
qty | num | - | The quantity of the line item. |
total | num | - | The total amount of the line item. |
totaltax | num | - | The total tax amount of the line item. |
taxcode | string | - | The tax code of the line item. |
taxrate | num | - | The tax rate of the line item. |
discount | num | - | The discount of the line item. |
External prescription
External Prescription
s are for external pharmacies to write back prescriptions to consult and animal records.
Each external prescription can have multiple lines of external prescription items.
Using the External Prescription
endpoint over the Prescription
endpoint allows for extra features:
- User editing of the record within ezyVet is prevented.
- A button on the medication table takes the user to the external link for the prescription.
- A new product is created in ezyVet for accurate reporting.
- The medication table allows filtering to display only
External Prescription
records.
Post an external prescription
Post an External Prescription
to create a new external prescription record.
Sample POST request to create an
External Prescription
record.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/externalprescription",
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer token12345",
},
"data": {
"animal_id": 1,
"consult_id": 2,
"contact_id": 3,
"prescribing_vet_user_id": 4,
"date_of_prescription": 1633027200,
"date_of_lastdispense": 1633027256,
"external_reference": "abc123"
"total_price": 20.00,
"external_prescription_item_list": [
{
"external_product_name": "Product 3",
"external_product_reference": "abc123",
"external_link": "https://www.ezyvet.com/",
"instructions": "Use as directed",
"price": 50.00,
"qty": 1,
"remaining": 12
}
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "eb3e852f3b5514491e7124e33a0e407d77e0e252a48bf910c52855296d9669f0",
"timestamp": "1718588357"
},
"items": [],
"messages": [
{
"level": "info",
"type": "success",
"text": "Record created successfully.",
"fields": {
"prescription_uid": "prescription_abcdefghijklmnopqrstu"
}
}
]
}
HTTP request
POST https://api.ezyvet.com/v1/externalprescription
Post parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
animal_id* | num | - | The ID of the Animal to associate with the External Prescription . |
consult_id | num | - | The ID of the Consult to associate with the External Prescription . The consult must associate with the animal record. |
contact_id | num | - | The ID of the Contact to associate with the External Prescription . The contact must associate with the animal record. |
prescribing_vet_user_id* | num | - | The ID of the User who is prescribing the External Prescription . Must be a user who is a vet. |
date_of_prescription* | num, string | - | The prescription date of the External Prescription in Epoch time. |
date_of_lastdispense | num, string | - | The last dispense date of the External Prescription in Epoch time. |
external_reference* | string | - | The reference information for the External Prescription from the third party's system. To help find the record in your system when we refer to it. |
total_price* | num | - | The total price for the External Prescription . Doesn't bill anything in ezyVet. |
external_prescription_item_list* | array | - | A list of all prescription line items associated with the External Prescription . |
Post parameters - [external_prescription_item_list]
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
external_product_name* | string | - | The name of the prescribed product for the External Prescription . This creates a product in ezyVet under this name or updates the existing product using the reference. |
external_product_reference* | string | - | The reference of the prescribed product for the External Prescription . ezyVet uses the reference to find the product. |
external_link | string | - | The URL to the prescription information on the third party's system. For example so ezyVet users can see the shipping information etc. |
instructions | string | - | The instructions for the External Prescription line item. Will appear on the medication in ezyVet. |
price* | num | - | The price for the External Prescription line item. Does not bill anything in ezyVet. |
qty* | num | - | The quantity for the External Prescription s prescribed line item. |
remaining | num | - | Shows how many refills are remaining for the External Prescription line item. |
Response fields
Parameter | Type | Default | Description |
---|---|---|---|
prescription_uid | string | - | The unique identifier for the prescription. Patching and deleting requires a prescription uid. |
Patch an external prescription
Patch an External Prescription
to update an existing external prescription record.
Sample PATCH request to edit an
External Prescription
record.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/externalprescription",
"method": "PATCH",
"headers": {
"content-type": "application/merge-patch+json",
"authorization": "Bearer token12345",
},
"data": {
"prescription_uid": "prescription_abcdefghijklmnopqrstu"
"animal_id": 1,
"consult_id": 2,
"contact_id": 3,
"prescribing_vet_user_id": 4,
"date_of_prescription": 1633027200,
"date_of_lastdispense": 1633027256,
"external_reference": "abc123"
"total_price": 20.00,
"external_prescription_item_list": [
{
"external_product_name": "Product 3",
"external_product_reference": "abc123",
"external_link": "https://www.ezyvet.com/",
"instructions": "Use as directed",
"price": 50.00,
"qty": 1,
"remaining": 12
}
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "eb3e852f3b5514491e7124e33a0e407d77e0e252a48bf910c52855296d9669e1",
"timestamp": "1718588357"
},
"items": [],
"messages": [
{
"level": "info",
"type": "success",
"text": "Record updated successfully.",
"fields": {
"prescription_uid": "prescription_abcdefghijklmnopqrstu"
}
}
]
}
HTTP Request
PATCH https://api.ezyvet.com/v1/externalprescription
Patch Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
prescription_uid* | string | - | The Uid of the prescription that associates with the External Prescription . |
animal_id* | num | - | The ID of the Animal to associate with the External Prescription . |
consult_id | num | - | The ID of the Consult to associate with the External Prescription . The consult must associate with the animal record. |
contact_id | num | - | The ID of the Contact to associate with the External Prescription . The contact must associate with the animal record. |
prescribing_vet_user_id* | num | - | The ID of the User who is prescribing the External Prescription . Must be a user who is a vet. |
date_of_prescription* | num, string | - | The prescription date of the External Prescription in Epoch time. |
date_of_lastdispense* | num, string | - | The last dispense date of the External Prescription in Epoch time. Note: mandatory in patch. |
external_reference* | string | - | The reference information for the External Prescription from the third party's system. To help find the record in your system when we refer to it. |
total_price* | num | - | The total price for the External Prescription . Doesn't bill anything in ezyVet. |
external_prescription_item_list* | array | - | A list of all prescription line items associated with the External Prescription . |
Patch Parameters - [external_prescription_item_list]
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
external_product_name* | string | - | The name of the prescribed product for the External Prescription . This creates a product in ezyVet under this name or updates the existing product using the reference. |
external_product_reference* | string | - | The reference of the prescribed product for the External Prescription . ezyVet uses the reference to find the product. |
external_link | string | - | The URL to the prescription information on the third party's system. For example so ezyVet users can see the shipping information etc. |
instructions | string | - | The instructions for the External Prescription line item. Will appear on the medication in ezyVet. |
price* | num | - | The price for the External Prescription line item. Does not bill anything in ezyVet. |
qty* | num | - | The quantity for the External Prescription s prescribed line item. |
remaining | num | - | Shows how many refills are remaining for the External Prescription line item. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
prescription_uid | string | - | The unique identifier for the prescription. Patching and deleting requires a prescription uid. |
Delete an external prescription
Deactivates an External Prescription
record and the corresponding prescription and prescription items.
Third parties can only deactivate external prescriptions that they created.
Sample DELETE request to deactivate an
External Prescription
record.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/externalprescription",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
},
"data": {
"prescription_uid": "prescription_abcdefghijklmnopqrstu"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "eb3e852f3b5514491e7124e33a0e407d77e0e252a48bf910c52855296d9669e1",
"timestamp": "1718588357"
},
"items": [],
"messages": [
{
"level": "info",
"type": "success",
"text": "Record deactivated successfully.",
"fields": {
"prescription_uid": "prescription_abcdefghijklmnopqrstu"
}
}
]
}
HTTP Request
DELETE https://api.ezyvet.com/v1/externalprescription
Delete Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
prescription_uid* | string | - | The Uid of the prescription that associates with the External Prescription . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
prescription_uid | string | - | The unique identifier for the prescription. Patching and deleting requires a prescription uid. |
File
A file, once uploaded, can be linked to any ezyVet object (that can have an Attachment
) using the Attachment
API endpoint.
Fetch a File
Sample Request: Get
File
with ID = 1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/file/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1",
"transaction_id": "f40526a...."
},
"items": [
{
"file": {
"id": "1",
"active": "1",
"created_at": "1307497412",
"modified_at": "1307497412",
"name": "monkey.png",
"size": "132300",
"mime_type": "image/png",
"notes": "This is a demo note",
"file_download_url": "https://ezyvetsydney.s3....",
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/file
Response Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an File . |
active | boolean | - | If true, the File is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the File was created. |
modified_at | num, string | - | The epoch time when the File was last modified. |
name | string | - | The File name. |
size | num, string | - | The File file size in bytes. |
mime_type | string | - | Multipurpose Internet Mail Extension type. Identifies the format of the File . |
notes | string | - | Notes that are related to the File . |
file_download_url | string | - | A URL to download the file. NOTE: The download link is set to expire after one day. |
Create a File
Creates a single File
.
Sample Request: Create a
File
.
data = new FormData();
data.append('file_data', $('#file')[0].files[0]);
data.append('notes', 'Demo note');
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/file",
"data": data,
"method": "POST",
contentType: 'multipart/form-data',
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
POST https://api.ezyvet.com/v1/file
Response (JSON)
{
"meta": {
"transaction_id": "1e394...",
"timestamp": "1527215479"
},
"items": [
{
"file": {
"id": "12312331",
"active": "1",
"created_at": "1527215471",
"modified_at": "1527215471",
"name": "7_ezyvet_small.png",
"size": "132300",
"mime_type": "image/png",
"notes": "Demo note",
"file_download_url": "https://ezyvetsydney.s3...."
}
}
],
"messages": []
}
HTTP Post
POST https://api.ezyvet.com/v1/file
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
notes | string | - | Notes that are related to the File |
file_data* | file | - | The data of the file. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an File |
active | boolean | - | If true, the File is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the File was created. |
modified_at | num, string | - | The epoch time when the File was last modified. |
name | string | - | The File name |
mime_type | string | - | Multipurpose Internet Mail Extension type. Identifies the format of the File . |
size | string | - | Size of File . |
notes | string | - | Notes that are related to the File |
file_download_url | string | - | A URL to download the file. NOTE: The download link is set to expire after one day. |
IntegratedDiagnostic
An IntegratedDiagnostic
represents a Diagnostic
that is provided by a integrated partner.
Fetch a IntegratedDiagnostic
Fetches an IntegratedDiagnostic
Sample Request: Get the
IntegratedDiagnostic
with ID 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/integrateddiagnostic/10
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "7e49f7c00c9e4f74e41212d83836b2a67bf3c0cb895a1e585bdf83878fd6f466",
"timestamp": 1536187695
},
"items": [
{
"integrateddiagnostic": {
"id": 1,
"created_at": 1502840832,
"modified_at": 1502840850,
"active": true,
"name": "Avian/Reptilian Profile Plus",
"code": "AR",
"supplier_price": null,
"supplier_currency": null,
"description": "Avian/Reptilian Profile Plus"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/integrateddiagnostic
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a IntegratedDiagnostic . |
code | string | - | A code assigned by an ezyVet user to keep track of the IntegratedDiagnostic . This value is subject to change. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a DiagnosticRequest . |
created_at | num | - | The epoch time when the IntegratedDiagnostic was created. |
modified_at | num | - | The epoch time when the IntegratedDiagnostic was last modified. |
active | bool | - | If true, the IntegratedDiagnostic is active and usable in ezyVet. |
name | string | - | The name of the IntegratedDiagnostic . |
code | string | - | A code assigned by an ezyVet user to keep track of the IntegratedDiagnostic . This value is subject to change. |
supplier_price | num | - | The suppliers price of the IntegratedDiagnostic . |
supplier_currency | string | - | The currency that the suppliers price is in. |
description | string | - | The description of the IntegratedDiagnostic . |
HealthStatus
Represents a set of health status metrics for an animal such as weight, blood pressure and so on.
Each HealthStatus
must be linked to an active Consult
and to an active Animal
.
Fetch a HealthStatus list
Fetches a list containing HealthStatus
(es). (up to 10)
Sample Request: Get
HealthStatus
forAnimal
"Doggo" (ID:5).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/healthstatus?animal_id=5",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1585325966",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1",
"transaction_id": "e0453c96a4e8abce7a085b5a21eb393a755b3c9512545d6f40a80e4d4d458309"
},
"items": [
{
"healthstatus": {
"id": "46",
"active": "1",
"created_at": "1364264933",
"modified_at": "1364264933",
"consult_id": "219",
"animal_id": "5",
"timestamp": "1364257556",
"notes": "",
"blood_pressure": "120.0000",
"weight": "18.0000",
"weight_unit": "kg",
"temperature": "38.0000",
"heart_rate": "90.0000",
"respiratory_rate": "19.0000",
"bcs": "8.0",
"max_bcs": "9",
"pain_score": "",
"max_pain_score": "24",
"dental_score": "",
"max_dental_score": "4",
"crt": "",
"mm": "",
"attitude": "",
"left_ovary_size": "",
"left_ovary_stage": "",
"right_ovary_size": "",
"right_ovary_stage": "",
"uterine_tone": "",
"uterine_edema": "",
"uterine_fluid": "",
"uterine_cyst": "",
"uterine_cytology": "",
"cervix_tone": "",
"cervix_cytology": "",
"pregnant": "",
"pulse_quality": "",
"respiratory_effort": ""
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/healthstatus
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an HealthStatus . |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a HealthStatus . |
active | num | - | If set to 1 (true) the HealthStatus is active and usable in ezyVet. |
created_at | num | - | The epoch time when the HealthStatus was created. |
modified_at | num | - | The epoch time when the HealthStatus was last modified. |
consult_id | num | - | The unique identifier for the Consult the HealthStatus relates to. |
animal_id | num | - | The unique identifier for the Animal the HealthStatus relates to. |
timestamp | num | - | The epoch creation date of the HealthStatus . |
notes | string | - | HealthStatus notes. |
blood_pressure | num | - | Animal blood pressure. |
weight | num | - | Animal weight (kg) |
weight_unit | string | lb | The Animal weight Unit name abbreviation (possible values: kg, lb, g) |
temperature | num | - | Animal temperature (°c) |
heart_rate | num | - | Animal heart rate (bpm) |
respiratory_rate | num | - | Animal respiratory rate (bpm) |
bcs | num | - | Animal body condition score. |
max_bcs | num | 9 | Animal body condition score (max). |
pain_score | num | - | Animal pain score. |
max_pain_score | num | 5 | Animal pain score (max). |
dental_score | num | - | Animal dental score. |
max_dental_score | num | 4 | Animal dental score (max). |
crt | string | - | Animal capillary refill rate. (possible values: <1 sec, 1-2 sec, >2 sec) |
mm | string | - | Animal mucous membrane. (possible values: Blue, Grey, White, Pale, Yellow, Pigmented, Tacky, Pale Pink, Pink, Injected, Red) |
attitude | string | - | Animal attitude (possible values: BAR, QAR, Comatose, Sleeping, Vocalising, Sedate). |
left_ovary_size | num | - | The size of the Animal left ovary. |
left_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
right_ovary_size | num | - | The size of the Animal attitude. |
right_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
uterine_tone | num | - | The uterine tone of the Animal . |
uterine_edema | num | - | The uterine edema of the Animal . |
uterine_fluid | string | - | The uterine fluid of the Animal (possible values: Positive, Negative). |
uterine_cyst | num | - | The uterine cyst of the Animal (possible values: Body, Left Horn, Right Horn, Negative). |
uterine_cytology | num | - | The uterine cytology of the Animal . |
cervix_tone | num | - | The cervix tone of the Animal . |
cervix_cytology | num | - | The cervix cytology of the Animal . |
pregnant | string | - | The status of pregnancy of the Animal (possible values: Yes, No). |
pulse_quality | string | - | The pulse quality of the Animal (possible values: Bounding, Normal, Fair, Difficult To Palpate, Weak, No Pulse Detected, Dropped Pulse). |
respiratory_effort | string | - | The respiratory effort of the Animal (possible values: Normal, Laboured Breathing, Shallow). |
Create a HealthStatus
Creates a HealthStatus
.
Sample Request: Create a
HealthStatus
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/healthstatus",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/x-www-form-urlencoded",
},
"data": {
"consult_id": "219",
"animal_id": "5",
"notes": "Post winter status",
"blood_pressure": "110",
"weight": "16.5",
"weight_unit": "kg",
"temperature": "38",
"heart_rate": "90"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
},
"items": [
{
"healthstatus": {
"id": "2",
"active": "1",
"created_at": "1364264933",
"modified_at": "1364264933",
"consult_id": "219",
"animal_id": "5",
"timestamp": "1364257556",
"notes": "Post winter status",
"blood_pressure": "110.0000",
"weight": "16.5000",
"weight_unit": "kg",
"temperature": "38.0000",
"heart_rate": "90.0000",
"respiratory_rate": "19.0000",
"bcs": "8.0",
"max_bcs": "9",
"pain_score": "",
"max_pain_score": "24",
"dental_score": "",
"max_dental_score": "4",
"crt": "",
"mm": "",
"attitude": "",
"left_ovary_size": "",
"left_ovary_stage": "",
"right_ovary_size": "",
"right_ovary_stage": "",
"uterine_tone": "",
"uterine_edema": "",
"uterine_fluid": "",
"uterine_cyst": "",
"uterine_cytology": "",
"cervix_tone": "",
"cervix_cytology": "",
"pregnant": "",
"pulse_quality": "",
"respiratory_effort": ""
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/healthstatus
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
consult_id | num | - | Refers to the ID of the Consult where the HealthStatus is attached. |
animal_id | num | - | Refers to the ID of the Animal . |
Post Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
active | num | - | If set to 1 (true) the HealthStatus is active and usable in ezyVet. |
created_at | num | - | The epoch time when the HealthStatus was created. |
modified_at | num | - | The epoch time when the HealthStatus was last modified. |
consult_id | num | - | The unique identifier for the Consult the HealthStatus relates to. |
animal_id | num | - | The unique identifier for the Animal the HealthStatus relates to. |
timestamp | num | - | The epoch creation date of the HealthStatus . |
notes | string | - | HealthStatus notes. |
blood_pressure | num | - | Animal blood pressure. |
weight | num | - | Animal weight (kg) |
weight_unit | string | lb | The Animal weight Unit name abbreviation (possible values: kg, lb, g) |
temperature | num | - | Animal temperature (°c) |
heart_rate | num | - | Animal heart rate (bpm) |
respiratory_rate | num | - | Animal respiratory rate (bpm) |
bcs | num | - | Animal body condition score. |
max_bcs | num | 9 | Animal body condition score (max). |
pain_score | num | - | Animal pain score. |
max_pain_score | num | 5 | Animal pain score (max). |
dental_score | num | - | Animal dental score. |
max_dental_score | num | 4 | Animal dental score (max). |
crt | string | - | Animal capillary refill rate. (possible values: <1 sec, 1-2 sec, >2 sec) |
mm | string | - | Animal mucous membrane. (possible values: Blue, Grey, White, Pale, Yellow, Pigmented, Tacky, Pale Pink, Pink, Injected, Red) |
attitude | string | - | Animal attitude (possible values: BAR, QAR, Comatose, Sleeping, Vocalising, Sedate). |
left_ovary_size | num | - | The size of the Animal left ovary. |
left_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
right_ovary_size | num | - | The size of the Animal attitude. |
right_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
uterine_tone | num | - | The uterine tone of the Animal . |
uterine_edema | num | - | The uterine edema of the Animal . |
uterine_fluid | string | - | The uterine fluid of the Animal (possible values: Positive, Negative). |
uterine_cyst | num | - | The uterine cyst of the Animal (possible values: Body, Left Horn, Right Horn, Negative). |
uterine_cytology | num | - | The uterine cytology of the Animal . |
cervix_tone | num | - | The cervix tone of the Animal . |
cervix_cytology | num | - | The cervix cytology of the Animal . |
pregnant | string | - | The status of pregnancy of the Animal (possible values: Yes, No). |
pulse_quality | string | - | The pulse quality of the Animal (possible values: Bounding, Normal, Fair, Difficult To Palpate, Weak, No Pulse Detected, Dropped Pulse). |
respiratory_effort | string | - | The respiratory effort of the Animal (possible values: Normal, Laboured Breathing, Shallow). |
limit | num | 10 | Limits the number of items returned. |
page | num | 1 | Specifies the page number of the result. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a HealthStatus . |
active | num | - | If set to 1 (true) the HealthStatus is active and usable in ezyVet. |
created_at | num | - | The epoch time when the HealthStatus was created. |
modified_at | num | - | The epoch time when the HealthStatus was last modified. |
consult_id | num | - | The unique identifier for the Consult the HealthStatus relates to. |
animal_id | num | - | The unique identifier for the Animal the HealthStatus relates to. |
timestamp | num | - | The epoch creation date of the HealthStatus . |
notes | string | - | HealthStatus notes. |
blood_pressure | num | - | Animal blood pressure. |
weight | num | - | Animal weight (kg) |
weight_unit | string | - | The Animal weight Unit name abbreviation (possible values: kg, lb, g) |
temperature | num | - | Animal temperature (°c) |
heart_rate | num | - | Animal heart rate (bpm) |
respiratory_rate | num | - | Animal respiratory rate (bpm) |
bcs | num | - | Animal body condition score. |
max_bcs | num | - | Animal body condition score (max). |
pain_score | num | - | Animal pain score. |
max_pain_score | num | - | Animal pain score (max). |
dental_score | num | - | Animal dental score. |
max_dental_score | num | - | Animal dental score (max). |
crt | string | - | Animal capillary refill rate. (possible values: <1 sec, 1-2 sec, >2 sec) |
mm | string | - | Animal mucous membrane. (possible values: Blue, Grey, White, Pale, Yellow, Pigmented, Tacky, Pale Pink, Pink, Injected, Red) |
attitude | string | - | Animal attitude (possible values: BAR, QAR, Comatose, Sleeping, Vocalising, Sedate). |
left_ovary_size | num | - | The size of the Animal left ovary. |
left_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
right_ovary_size | num | - | The size of the Animal attitude. |
right_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
uterine_tone | num | - | The uterine tone of the Animal . |
uterine_edema | num | - | The uterine edema of the Animal . |
uterine_fluid | string | - | The uterine fluid of the Animal (possible values: Positive, Negative). |
uterine_cyst | num | - | The uterine cyst of the Animal (possible values: Body, Left Horn, Right Horn, Negative). |
uterine_cytology | num | - | The uterine cytology of the Animal . |
cervix_tone | num | - | The cervix tone of the Animal . |
cervix_cytology | num | - | The cervix cytology of the Animal . |
pregnant | string | - | The status of pregnancy of the Animal (possible values: Yes, No). |
pulse_quality | string | - | The pulse quality of the Animal (possible values: Bounding, Normal, Fair, Difficult To Palpate, Weak, No Pulse Detected, Dropped Pulse). |
respiratory_effort | string | - | The respiratory effort of the Animal (possible values: Normal, Laboured Breathing, Shallow). |
Update a Health Status
Updates a HealthStatus
.
Sample Request: Create a
HealthStatus
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/healthstatus",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data": {
"consult_id": "219",
"animal_id": "5",
"blood_pressure": "115",
"weight": "17",
"weight_unit": "kg",
"temperature": "36",
"heart_rate": "91"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999"
},
"items": [
{
"healthstatus": {
"id": "2",
"active": "1",
"created_at": "1364264933",
"modified_at": "1364264933",
"consult_id": "219",
"animal_id": "5",
"timestamp": "1364257556",
"notes": "Post winter status",
"blood_pressure": "115.0000",
"weight": "17.0000",
"weight_unit": "kg",
"temperature": "36.0000",
"heart_rate": "91.0000",
"respiratory_rate": "19.0000",
"bcs": "8.0",
"max_bcs": "9",
"pain_score": "",
"max_pain_score": "24",
"dental_score": "",
"max_dental_score": "4",
"crt": "",
"mm": "",
"attitude": "",
"left_ovary_size": "",
"left_ovary_stage": "",
"right_ovary_size": "",
"right_ovary_stage": "",
"uterine_tone": "",
"uterine_edema": "",
"uterine_fluid": "",
"uterine_cyst": "",
"uterine_cytology": "",
"cervix_tone": "",
"cervix_cytology": "",
"pregnant": "",
"pulse_quality": "",
"respiratory_effort": ""
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/healthstatus
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an HealthStatus . |
consult_id | num | - | Refers to the ID of the Consult where the HealthStatus is attached. |
animal_id | num | - | Refers to the ID of the Animal . |
Patch Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
active | num | - | If set to 1 (true) the HealthStatus is active and usable in ezyVet. |
created_at | num | - | The epoch time when the HealthStatus was created. |
modified_at | num | - | The epoch time when the HealthStatus was last modified. |
consult_id | num | - | The unique identifier for the Consult the HealthStatus relates to. |
animal_id | num | - | The unique identifier for the Animal the HealthStatus relates to. |
timestamp | num | - | The epoch creation date of the HealthStatus . |
notes | string | - | HealthStatus notes. |
blood_pressure | num | - | Animal blood pressure. |
weight | num | - | Animal weight (kg) |
weight_unit | string | - | The Animal weight Unit name abbreviation (possible values: kg, lb, g) |
temperature | num | - | Animal temperature (°c) |
heart_rate | num | - | Animal heart rate (bpm) |
respiratory_rate | num | - | Animal respiratory rate (bpm) |
bcs | num | - | Animal body condition score. |
max_bcs | num | - | Animal body condition score (max). |
pain_score | num | - | Animal pain score. |
max_pain_score | num | - | Animal pain score (max). |
dental_score | num | - | Animal dental score. |
max_dental_score | num | - | Animal dental score (max). |
crt | string | - | Animal capillary refill rate. (possible values: <1 sec, 1-2 sec, >2 sec) |
mm | string | - | Animal mucous membrane. (possible values: Blue, Grey, White, Pale, Yellow, Pigmented, Tacky, Pale Pink, Pink, Injected, Red) |
attitude | string | - | Animal attitude (possible values: BAR, QAR, Comatose, Sleeping, Vocalising, Sedate). |
left_ovary_size | num | - | The size of the Animal left ovary. |
left_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
right_ovary_size | num | - | The size of the Animal attitude. |
right_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
uterine_tone | num | - | The uterine tone of the Animal . |
uterine_edema | num | - | The uterine edema of the Animal . |
uterine_fluid | string | - | The uterine fluid of the Animal (possible values: Positive, Negative). |
uterine_cyst | num | - | The uterine cyst of the Animal (possible values: Body, Left Horn, Right Horn, Negative). |
uterine_cytology | num | - | The uterine cytology of the Animal . |
cervix_tone | num | - | The cervix tone of the Animal . |
cervix_cytology | num | - | The cervix cytology of the Animal . |
pregnant | string | - | The status of pregnancy of the Animal (possible values: Yes, No). |
pulse_quality | string | - | The pulse quality of the Animal (possible values: Bounding, Normal, Fair, Difficult To Palpate, Weak, No Pulse Detected, Dropped Pulse). |
respiratory_effort | string | - | The respiratory effort of the Animal (possible values: Normal, Laboured Breathing, Shallow). |
limit | num | 10 | Limits the number of items returned. |
page | num | 1 | Specifies the page number of the result. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a HealthStatus . |
active | num | - | If set to 1 (true) the HealthStatus is active and usable in ezyVet. |
created_at | num | - | The epoch time when the HealthStatus was created. |
modified_at | num | - | The epoch time when the HealthStatus was last modified. |
consult_id | num | - | The unique identifier for the Consult the HealthStatus relates to. |
animal_id | num | - | The unique identifier for the Animal the HealthStatus relates to. |
timestamp | num | - | The epoch creation date of the HealthStatus . |
notes | string | - | HealthStatus notes. |
blood_pressure | num | - | Animal blood pressure. |
weight | num | - | Animal weight (kg) |
weight_unit | string | - | The Animal weight Unit name abbreviation (possible values: kg, lb, g) |
temperature | num | - | Animal temperature (°c) |
heart_rate | num | - | Animal heart rate (bpm) |
respiratory_rate | num | - | Animal respiratory rate (bpm) |
bcs | num | - | Animal body condition score. |
max_bcs | num | - | Animal body condition score (max). |
pain_score | num | - | Animal pain score. |
max_pain_score | num | - | Animal pain score (max). |
dental_score | num | - | Animal dental score. |
max_dental_score | num | - | Animal dental score (max). |
crt | string | - | Animal capillary refill rate. (possible values: <1 sec, 1-2 sec, >2 sec) |
mm | string | - | Animal mucous membrane. (possible values: Blue, Grey, White, Pale, Yellow, Pigmented, Tacky, Pale Pink, Pink, Injected, Red) |
attitude | string | - | Animal attitude (possible values: BAR, QAR, Comatose, Sleeping, Vocalising, Sedate). |
left_ovary_size | num | - | The size of the Animal left ovary. |
left_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
right_ovary_size | num | - | The size of the Animal attitude. |
right_ovary_stage | string | - | The stage of the Animal left ovary (possible values: CL, CH, ANOV). |
uterine_tone | num | - | The uterine tone of the Animal . |
uterine_edema | num | - | The uterine edema of the Animal . |
uterine_fluid | string | - | The uterine fluid of the Animal (possible values: Positive, Negative). |
uterine_cyst | num | - | The uterine cyst of the Animal (possible values: Body, Left Horn, Right Horn, Negative). |
uterine_cytology | num | - | The uterine cytology of the Animal . |
cervix_tone | num | - | The cervix tone of the Animal . |
cervix_cytology | num | - | The cervix cytology of the Animal . |
pregnant | string | - | The status of pregnancy of the Animal (possible values: Yes, No). |
pulse_quality | string | - | The pulse quality of the Animal (possible values: Bounding, Normal, Fair, Difficult To Palpate, Weak, No Pulse Detected, Dropped Pulse). |
respiratory_effort | string | - | The respiratory effort of the Animal (possible values: Normal, Laboured Breathing, Shallow). |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Delete a HealthStatus
Deletes a HealthStatus
.
Sample Request: Delete a
DiagnosticResultItem
with an ID of 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/healthstatus/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/healthstatus
Response Fields
There are no response fields for a DELETE
operation.
History
Represents a Visit History record. The History
records are
always linked to a Consult
.
A Consult
can have multiple History
records against
it.
Fetch a History list
Fetches a list containing History
(s). (up to 10)
Sample Request: Fetch a list containing one
History
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/history?limit=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479846904",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "1",
"items_total": "1"
},
"items": [
{
"history": {
"id": "4",
"active": "1",
"created_at": "1478823323",
"modified_at": "1478823323",
"consult_id": "1",
"animal_id": "1",
"history_system": "0",
"chain": "||",
"comments": "This is a comment.",
"timestamp": "1478823328",
"vet_id": "1"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/history
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an History . |
active | num, string | - | If true, the History is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the History was created. |
modified_at | num, string | - | The epoch time when the History was last modified. |
consult_id | num, string | - | Refers to the ID of the Consult where the History is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
history_system | num, string | - | Refers to the ID of the HistorySystem . |
chain | num, string | - | The chain of HistorySystem items thus far. |
comments | string | - | Comments for the History record. |
timestamp | num, string | - | The date when History was noted for the consult. Note that this doesn't necessarily refer to when the History record was created. |
vet_id | num, string | - | Refers to the ID of the User who is a Vet and is linked to the History . |
Invoice
A financial transaction with the clinic.
Each invoice can have multiple invoice lines.
NOTE: The V1 Invoice
endpoint does not return any Header
invoice lines.
The ID's of these lines will not appear in the invoice_line_list
field.
Fetch an Invoice list
Fetches a list containing Invoice
(s). (up to 10)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/invoice?animal_id=5",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1492464074",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"invoice": {
"id": "2",
"active": "1",
"created_at": "1492043991",
"modified_at": "1492043991",
"ownership_id": "1",
"code": "400002",
"contact_id": "4",
"animal_id": "5",
"consult_id": "2",
"subtotal": "10",
"tax": "1",
"includes_tax": "1",
"payment_terms_id": "1",
"date": "1492043940",
"date_due": "1492005600",
"date_approved" : "1492043945",
"approved_by" : "1",
"customer_reference_number": "",
"invoice_line_list": [
"2"
],
"linked_payments": [
{
"id": "10",
"amount": "5",
"type": "payment"
},
{
"id": "110",
"amount": "6",
"type": "invoice"
}
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/invoice
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Invoice . |
active | num, string | - | If true, the Invoice is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Invoice was created. |
modified_at | num, string | - | The epoch time when the Invoice was last modified. |
ownership_id | num, string | - | The ID of the Ownership Separation to which this Invoice belongs. |
code | num, string | - | The auto-generated code of the Invoice . Cannot be modified. |
subtotal | num, string | - | The sum of all InvoiceLines totals exclusive of tax (up to 2 decimal places). |
tax | num, string | - | The sum of all InvoiceLines tax amounts (up to 2 decimal places). |
contact_id | num, string | - | Required. The ID of the Contact associated with the Invoice . |
animal_id | num, string | - | The ID of the Animal associated with the Invoice . |
consult_id | num, string | - | The ID of the Consult associated with the Invoice . |
payment_terms_id | num, string | - | The ID for the PaymentTerm of the Invoice . |
includes_tax | num, string | - | If true, the InvoiceLine totals were calculated from prices that include tax. If false, the InvoiceLine totals were calculated from prices that exclude tax. |
date | num, string | - | The epoch time of the Invoice transaction date. |
date_due | num, string | - | The epoch time of when the Invoice transaaction is due for payment. |
date_approved | num | 0 | The epoch time of when the Invoice transaction is approved. |
customer_reference_number | num, string | - | Customer reference number for the Invoice . |
limit | num, string | 10 | Sets the limit on the number of items returned (range: 1 - 50) |
page | num, string | 1 | Specifies the page number of the result. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
invoice_line_list | InvoiceLine[] |
- | - | A JSON list containing the InvoiceLine ID(s) of the Invoice . |
linked_payments | list | - | [] | A list containing payments allocated to this Invoice . NOTE: An Invoice may be paid by multiple payments or credit invoices . |
id | num, string | linked_payments | - | The ID number used by the system to uniquely identify a Payment . |
amount | num, string | linked_payments | - | The amount of the Payment . |
date_approved | num, string | - | - | The epoch time of when the Invoice was approved. |
approved_by | num, string | - | - | The ID of the user that approved the Invoice . |
Invoice V2
A financial transaction with the clinic.
Each invoice can have multiple invoice lines.
Fetch an Invoice list (V2)
Fetches a list containing Invoice
(s). (up to 10)
Sample Request: Get the
Invoice
with the ID 1.
var settings = {
crossDomain: true,
url: "https://api.ezyvet.com/v2/invoice/1",
method: "GET",
headers: {
authorization: "Bearer token12345"
}
};
$.ajax(settings).done(function(response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "89dd52d1a9c1b1ae0b2078c83ef758dac62915b7d5f43e9c6ca7a1cd215b5c78",
"timestamp": 1553550950
},
"items": [
{
"invoice": {
"id": 1,
"created_at": 1553550949,
"modified_at": 1553550949,
"active": true,
"ownership_id": 1,
"created_by": 379,
"modified_by": 379,
"code": "404951",
"animal_id": 2,
"consult_id": null,
"contact_id": 40,
"subtotal": 2.82,
"tax": 0.28,
"includes_tax": false,
"payment_terms_id": 0,
"date": 1553550949,
"date_due": 1553550949,
"date_approved": 0,
"approved_by": 0,
"customer_reference_number": null,
"line_item": [
{
"id": 44885,
"created_at": 1553550949,
"modified_at": 1553550949,
"active": true,
"name": "Can of Coke 350ml",
"product_id": 1923,
"sales_person": 1,
"quantity": 1.25,
"discount": 0,
"dispense": 0,
"price": 2.26,
"price_tax": 0.23,
"standard_price": 2.26,
"standard_price_tax": 0.23,
"total": 2.82,
"total_tax": 0.28,
"status": "Pending",
"tax_code": "Z",
"tax_percent": 0,
"ownership_id": 4,
"location_id": 8,
"ledger_account": 3,
"group_id": null,
"type": "standard"
}
],
"financials": [
{
"linked_payments": [
{
"id": "10",
"amount": "5",
"type": "payment"
},
{
"id": "110",
"amount": "6",
"type": "invoice"
}
]
}
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/invoice
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an Invoice . |
created_at | num | - | The epoch time when the Invoice was created. |
modified_at | num | - | The epoch time when the Invoice was last modified. |
active | bool | true | If true, the Invoice is active and usable in ezyVet. |
code | num, string | - | The auto-generated code of the Invoice . Cannot be modified. |
animal_id | num | - | The ID of the Animal associated with the Invoice . |
consult_id | num | - | The ID of the Consult associated with the Invoice . |
contact_id | num | - | The ID of the Contact associated with the Invoice . |
date | num | - | The epoch time of the Invoice transaction date. |
date_due | num | - | The epoch time of when the Invoice transaction is due for payment. |
date_approved | num | 0 | The epoch time of when the Invoice transaction is approved. |
approved_by | num | - | The ID of the User that approved the Invoice . |
Response Parameters
Includes query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
ownership_id | num | - | The ID of the Ownership Separation to which this Invoice belongs. |
created_by | num | - | The ID of the User that created the invoice. |
modified_by | num | - | The ID of the User that modified the invoice. |
subtotal | num | - | The sum of all InvoiceLines totals exclusive of tax (up to 2 decimal places). |
tax | num | - | The sum of all InvoiceLines tax amounts (up to 2 decimal places). |
includes_tax | bool | - | If true, the InvoiceLine totals were calculated from prices that include tax. If false, the InvoiceLine totals were calculated from prices that exclude tax. |
payment_terms_id | num | - | The ID for the PaymentTerm of the Invoice . |
customer_reference_number | num, string | null | Customer reference number for the Invoice . |
line_item | array | [] | The array of InvoiceLine s that are linked to the Invoice |
financials->linked_payments | array | [] | A list containing payments allocated to this Invoice . NOTE: An Invoice may be paid by multiple payments or credit invoices . |
Create an Invoice (V2)
Creates a single Invoice
Sample Request: Create a
Invoice
for the contact 22
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/invoice",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"contact_id" : 22,
"animal_id": 2,
"ownership_id": 1,
"line_item" : [
{
"product_id": 1923,
"ownership_id": 4,
"location_id": 8,
"quantity": "1.25",
"sales_person": 1,
"tax_code": "Z"
}
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "89dd52d1a9c1b1ae0b2078c83ef758dac62915b7d5f43e9c6ca7a1cd215b5c78",
"timestamp": 1553550950
},
"items": [
{
"invoice": {
"id": 4951,
"created_at": 1553550949,
"modified_at": 1553550949,
"active": true,
"ownership_id": 1,
"created_by": 379,
"modified_by": 379,
"code": "404951",
"animal_id": 2,
"consult_id": null,
"contact_id": 40,
"subtotal": 2.82,
"tax": 0.28,
"includes_tax": false,
"payment_terms_id": 0,
"date": 1553550949,
"date_due": 1553550949,
"date_approved": 0,
"approved_by": 0,
"customer_reference_number": null,
"line_item": [
{
"id": 44885,
"created_at": 1553550949,
"modified_at": 1553550949,
"active": true,
"name": "Can of Coke 350ml",
"product_id": 1923,
"sales_person": 1,
"quantity": 1.25,
"discount": 0,
"dispense": 0,
"price": 2.26,
"price_tax": 0.23,
"standard_price": 2.26,
"standard_price_tax": 0.23,
"total": 2.82,
"total_tax": 0.28,
"status": "Pending",
"tax_code": "Z",
"tax_percent": 0,
"ownership_id": 4,
"location_id": 8,
"ledger_account": 3,
"group_id": null,
"type": "standard"
}
]
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v2/invoice
POST Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
ownership_id* | num | - | The ID of the Ownership Separation to which this Invoice belongs. |
animal_id | num | - | The ID of the Animal associated with the Invoice . |
consult_id | num | - | The ID of the Consult associated with the Invoice . |
contact_id* | num | - | The ID of the Contact associated with the Invoice . |
includes_tax | bool | - | If true, the InvoiceLine totals will be calculated from prices that include tax. If false, the InvoiceLine totals will be calculated from prices that exclude tax. |
date | num | - | The epoch time of the Invoice transaction date. |
date_due | num | - | The epoch time of when the Invoice transaction is due for payment. |
date_approved | num | 0 | The epoch time of when the Invoice transaction is approved. |
customer_reference_number | num, string | null | Customer reference number for the Invoice . |
line_item | array | [] | The array of InvoiceLine s that are linked to the Invoice |
Response Parameters
Includes query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an Invoice . |
created_at | num | - | The epoch time when the Invoice was created. |
modified_at | num | - | The epoch time when the Invoice was last modified. |
active | bool | true | If true, the Invoice is active and usable in ezyVet. |
created_by | num | - | The ID of the User that created the invoice. |
modified_by | num | - | The ID of the User that modified the invoice. |
code | num, string | - | The auto-generated code of the Invoice . Cannot be modified. |
subtotal | num | - | The sum of all InvoiceLines totals exclusive of tax (up to 2 decimal places). |
tax | num | - | The sum of all InvoiceLines tax amounts (up to 2 decimal places). |
payment_terms_id | num | - | The ID for the PaymentTerm of the Invoice . |
approved_by | num | - | The ID of the User that approved the Invoice . |
Update an Invoice (V2)
Update a single Invoice
.
Sample Request: Updating an
Invoice
with the ID of 1
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/invoice",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
{
"id": 1,
"animal_id": 2,
"consult_id": 2,
"contact_id": 10004,
"includes_tax": 0,
"date": 1554681318,
"date_due": 1554681318,
"date_approved": 1554681318,
"customer_reference_number": "referencenumber"
}
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "89dd52d1a9c1b1ae0b2078c83ef758dac62915b7d5f43e9c6ca7a1cd215b5c78",
"timestamp": 1553550949
},
"items": [
{
"invoice": {
"id": 1,
"created_at": 1492044005,
"modified_at": 1553550949,
"active": true,
"ownership_id": 1,
"created_by": 379,
"modified_by": 379,
"code": "404951",
"animal_id": 2,
"consult_id": 2,
"contact_id": 10004,
"subtotal": 2.82,
"tax": 0.28,
"includes_tax": false,
"payment_terms_id": 0,
"date": 1554681318,
"date_due": 1554681318,
"date_approved": 1554681318,
"approved_by": 1,
"customer_reference_number": "referencenumber",
"line_item": [
{
"id": 44885,
"created_at": 1492044005,
"modified_at": 1492044005,
"active": true,
"name": "Can of Coke 350ml",
"product_id": 1923,
"sales_person": 1,
"quantity": 1.25,
"discount": 0,
"dispense": 0,
"price": 2.26,
"price_tax": 0.23,
"standard_price": 2.26,
"standard_price_tax": 0.23,
"total": 2.82,
"total_tax": 0.28,
"status": "Pending",
"tax_code": "Z",
"tax_percent": 0,
"ownership_id": 4,
"location_id": 8,
"ledger_account": 3,
"group_id": null,
"type": "standard"
}
]
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v2/invoice
PATCH Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
id* | num | - | The ID number used by the system to uniquely identify an Invoice . |
animal_id | num | - | The ID of the Animal associated with the Invoice . |
consult_id | num | - | The ID of the Consult associated with the Invoice . |
contact_id | num | - | The ID of the Contact associated with the Invoice . |
includes_tax | bool | - | If true, the InvoiceLine totals will be calculated from prices that include tax. If false, the InvoiceLine totals will be calculated from prices that exclude tax. |
date | num | - | The epoch time of the Invoice transaction date. |
date_due | num | - | The epoch time of when the Invoice transaction is due for payment. |
date_approved | num | 0 | The epoch time of when the Invoice transaction is approved. |
customer_reference_number | num, string | null | Customer reference number for the Invoice . |
Response Fields
Includes Patch parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
created_at | num | - | The epoch time when the Invoice was created. |
modified_at | num | - | The epoch time when the Invoice was last modified. |
active | bool | true | If true, the Invoice is active and usable in ezyVet. |
ownership_id | num | - | The ID of the Ownership Separation to which this Invoice belongs. |
created_by | num | - | The ID of the User that created the invoice. |
modified_by | num | - | The ID of the User that modified the invoice. |
code | num, string | - | The auto-generated code of the Invoice . Cannot be modified. |
subtotal | num | - | The sum of all InvoiceLines totals exclusive of tax (up to 2 decimal places). |
tax | num | - | The sum of all InvoiceLines tax amounts (up to 2 decimal places). |
payment_terms_id | num | - | The ID for the PaymentTerm of the Invoice . |
approved_by | num | - | The ID of the User that approved the Invoice . |
line_item | array | [] | The array of InvoiceLine s that are linked to the Invoice |
Delete a Invoice (V2)
Deletes a Invoice
.
Sample Request: Delete a
Invoice
with an ID of 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/invoice/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "8f37e6200eb97e4301818df320969d513c340a187edef8ee0ffa6246abf60390",
"timestamp": 1556259376
},
"items": [
{
"invoice": {
"id": 5080,
"created_at": 1556066171,
"modified_at": 1556259376,
"active": false,
"created_by": 1,
"modified_by": 379,
"code": "405080",
"ownership_id": 1,
"animal_id": 334,
"consult_id": 3187,
"contact_id": 11,
"subtotal": 2,
"tax": 0.2,
"includes_tax": true,
"payment_terms_id": 2,
"date": 1556066171,
"date_due": 1558312560,
"date_approved": 0,
"approved_by": 0,
"customer_reference_number": null,
"line_item": [
{
"id": 45074,
"created_at": 1556066171,
"modified_at": 1556066171,
"active": true,
"name": "test",
"product_id": 1912,
"sales_person": 1,
"quantity": 1,
"discount": 0,
"dispense": 0,
"price": 2,
"price_tax": 0.2,
"standard_price": 2,
"standard_price_tax": 0.2,
"total": 2,
"total_tax": 0.2,
"status": "pending",
"tax_code": "S",
"tax_percent": 10,
"ownership_id": 1,
"location_id": 8,
"ledger_account": 3,
"group_id": null,
"type": "standard"
}
]
}
}
],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v2/invoice
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an Invoice . |
created_at | num | - | The epoch time when the Invoice was created. |
modified_at | num | - | The epoch time when the Invoice was last modified. |
active | bool | true | If true, the Invoice is active and usable in ezyVet. |
created_by | num | - | The ID of the User that created the invoice. |
modified_by | num | - | The ID of the User that modified the invoice. |
code | num, string | - | The auto-generated code of the Invoice . Cannot be modified. |
ownership_id | num | - | The ID of the Ownership Separation to which this Invoice belongs. |
animal_id | num | - | The ID of the Animal associated with the Invoice . |
consult_id | num | - | The ID of the Consult associated with the Invoice . |
contact_id | num | - | The ID of the Contact associated with the Invoice . |
subtotal | num | - | The sum of all InvoiceLines totals exclusive of tax (up to 2 decimal places). |
tax | num | - | The sum of all InvoiceLines tax amounts (up to 2 decimal places). |
includes_tax | bool | - | If true, the InvoiceLine totals were calculated from prices that include tax. If false, the InvoiceLine totals were calculated from prices that exclude tax. |
payment_terms_id | num | - | The ID for the PaymentTerm of the Invoice . |
date | num | - | The epoch time of the Invoice transaction date. |
date_due | num | - | The epoch time of when the Invoice transaction is due for payment. |
date_approved | num | 0 | The epoch time of when the Invoice transaction is approved. |
approved_by | num | - | The ID of the User that approved the Invoice . |
customer_reference_number | num, string | null | Customer reference number for the Invoice . |
line_item | array | [] | The array of InvoiceLine (s) that are linked to the Invoice |
InvoiceLine
A line on an invoice.
NOTE: The V1 InvoiceLine
endpoint does not return any Header
invoice lines.
Fetch an InvoiceLine list
Fetches the InvoiceLines
(s) for the given Invoice
(id=9). (up to 10)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/invoiceline?invoice_id=9",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "47cac383897543544a64b89eeb3bf7155444635d7690528994b8c4fc214767ee",
"timestamp": 1556675880
},
"items": [
{
"invoiceline": {
"id": 3,
"created_at": 1307652957,
"modified_at": 1307654494,
"active": true,
"name": "Consultation Fee ",
"product_id": 208,
"staff_user_id": 16,
"invoice_id": 9,
"quantity": 1,
"discount": 0,
"price": 34.78,
"price_tax": 5.22,
"standard_price": 34.78,
"standard_price_tax": 5.22,
"total": 34.78,
"total_tax": 5.22,
"status": "Finalised",
"tax_code": "S",
"tax_percent": 15,
"ownership_id": 2,
"location_id": 3,
"consult_id": 13,
"animal_id": 3,
"date": null
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/invoiceline
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an InvoiceLine . |
active | num, string | - | If true, the InvoiceLine is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the InvoiceLine was created. |
modified_at | num, string | - | The epoch time when the InvoiceLine was last modified. |
ownership_id | num, string | - | The ID of the Ownership Separation to which this InvoiceLine belongs. |
location_id | num, string | - | The ID of the Location Separation to which this InvoiceLine belongs. |
product_id | num, string | - | The ID of the Product used in the InvoiceLine . |
staff_user_id | num, string | - | The ID of the User used in the InvoiceLine . The User must be marked as a salesperson (is_salesperson ). |
invoice_id | num, string | - | The ID of the Invoice to which this InvoiceLine belongs. |
quantity | num, string | - | The amount of the Product in this InvoiceLine (up to 4 decimal places). |
status | string | - | The status of the InvoiceLine : Pending (initial status), Allocated (Product reserved), Finalised (Invoice approved). |
tax_code | num, string | - | The code of the tax applied to the InvoiceLine . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
name | num, string | - | The name or description of the InvoiceLine . This is usually the name of the Product . |
discount | num, string | - | The percent discount applied to the InvoiceLine (from 0 to 100, without the % ). |
price | num, string | - | The price of the InvoiceLine after the discount is applied (up to 4 decimal places). |
price_tax | num, string | - | The tax applied to the InvoiceLine after the discount is applied (up to 4 decimal places). |
standard_price | num, string | - | The standard price of the InvoiceLine , without taxes and discounts (up to 4 decimal places). |
standard_price_tax | num, string | - | The tax to be applied to InvoiceLine , before taking discounts into account (up to 4 decimal places). |
total | num, string | - | The total price of the InvoiceLine , including the discount (no tax, up to 4 decimal places). |
total_tax | num, string | - | The total tax of the InvoiceLine , including the discount (up to 4 decimal places). |
tax_percent | num, string | - | The percentage of the tax applied to InvoiceLine (from 0 to 100, without the % ). |
animal_id | num, string | - | The ID of the Animal associated with both Invoice and InvoiceLine . |
consult_id | num, string | - | The ID of the Consult associated with both Invoice and InvoiceLine . |
date | num | - | The date that the product on the InvoiceLine was administered on the related record. The return value will be NULL if the product does not have an administration date. |
InvoiceLine V2
A line on an invoice.
Fetch an InvoiceLine list (V2)
Fetches the InvoiceLine
(s) for a given Invoice
(id=9). (up to 10)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/invoiceline?invoice_id=9",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "47cac383897543544a64b89eeb3bf7155444635d7690528994b8c4fc214767ee",
"timestamp": 1556675880
},
"items": [
{
"invoiceline": {
"id": 3,
"created_at": 1307652957,
"modified_at": 1307654494,
"active": true,
"name": "Consultation Fee ",
"product_id": 208,
"batch": 17,
"sales_person": 16,
"invoice_id": 9,
"quantity": 1,
"discount": 0,
"dispense": 0,
"price": 34.78,
"price_tax": 5.22,
"standard_price": 34.78,
"standard_price_tax": 5.22,
"total": 34.78,
"total_tax": 5.22,
"status": "Finalised",
"tax_code": "S",
"tax_percent": 15,
"ownership_id": 2,
"location_id": 3,
"ledger_account": 3,
"group_id": null,
"type": "standard",
"date": null
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/invoiceline
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an InvoiceLine . |
created_at | num, string | - | The epoch time when the InvoiceLine was created. |
modified_at | num, string | - | The epoch time when the InvoiceLine was last modified. |
active | num, string | - | If true, the InvoiceLine is active and usable in ezyVet. |
product_id | num, string | - | The ID of the Product used in the InvoiceLine . |
batch | num, string | - | The ID of the Product used in the InvoiceLine . |
sales_person | num, string | - | The ID of the User used in the InvoiceLine . The User must be marked as a salesperson (is_salesperson ). |
invoice_id | num, string | - | The ID of the Invoice to which this InvoiceLine belongs. |
quantity | num, string | - | The amount of the Product in this InvoiceLine (up to 4 decimal places). |
status | string | - | The status of the InvoiceLine : Pending (initial status), Allocated (Product reserved), Finalised (Invoice approved). |
tax_code | num, string | - | The code of the tax applied to the InvoiceLine . |
ownership_id | num, string | - | The ID of the Ownership Separation to which this InvoiceLine belongs. |
location_id | num, string | - | The ID of the Location Separation to which this InvoiceLine belongs. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an InvoiceLine . |
created_at | num, string | - | The epoch time when the InvoiceLine was created. |
modified_at | num, string | - | The epoch time when the InvoiceLine was last modified. |
active | num, string | - | If true, the InvoiceLine is active and usable in ezyVet. |
name | num, string | - | The name or description of the InvoiceLine . This is usually the name of the Product . |
product_id | num, string | - | The ID of the Product used in the InvoiceLine . |
batch | num, string | - | The number/lot of the Batch used on the InvoiceLine . |
sales_person | num, string | - | The ID of the sales person User used in the InvoiceLine . The User must be marked as a salesperson (is_salesperson ). |
invoice_id | num, string | - | The ID of the Invoice to which this InvoiceLine belongs. |
quantity | num, string | - | The amount of the Product in this InvoiceLine (up to 4 decimal places). |
discount | num, string | - | The percent discount applied to the InvoiceLine (from 0 to 100, without the % ). |
dispense | num, string | - | The dispense fee for the InvoiceLine . |
price | num, string | - | The price of the InvoiceLine after the discount is applied (up to 4 decimal places). |
price_tax | num, string | - | The tax applied to the InvoiceLine after the discount is applied (up to 4 decimal places). |
standard_price | num, string | - | The standard price of the InvoiceLine , without taxes and discounts (up to 4 decimal places). |
standard_price_tax | num, string | - | The tax to be applied to InvoiceLine , before taking discounts into account (up to 4 decimal places). |
total | num, string | - | The total price of the InvoiceLine , including the discount (no tax, up to 4 decimal places). |
total_tax | num, string | - | The total tax of the InvoiceLine , including the discount (up to 4 decimal places). |
status | string | - | The status of the InvoiceLine : Pending (initial status), Allocated (Product reserved), Finalised (Invoice approved). |
tax_code | string | - | The tax code for the InvoiceLine . |
tax_percent | num, string | - | The percentage of the tax applied to InvoiceLine (from 0 to 100, without the % ). |
ownership_id | num, string | - | The ID of the Ownership Separation to which this InvoiceLine belongs. |
location_id | num, string | - | The ID of the Location Separation to which this InvoiceLine belongs. |
ledger_account | num | - | The ID of the Ledger Account to which this InvoiceLine is recorded under. |
group_id | num | - | The ID of the line item group the InvoiceLine is under. |
type | string | - | The type of the InvoiceLine . |
date | num | - | The date that the product on the InvoiceLine was administered on the related record. The return value will be NULL if the product does not have an administration date. |
Create an InvoiceLine (V2)
Creates a single InvoiceLine
Sample Request: Create an
InvoiceLine
for the contact 22
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/invoiceline",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"active": true,
"name": "Demo",
"product_id": 4010,
"sales_person": 1,
"invoice_id": 5075,
"quantity": 1,
"discount": 0,
"dispense": 0,
"price": 1.74,
"price_tax": 0.26,
"standard_price": 1.74,
"standard_price_tax": 0.26,
"tax_code": "S",
"ownership_id": 2,
"location_id": 3,
"status": "pending"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "804b55b1ce3a8e31632977785215f8b6408fad73b9da3359e3f663c9c54e0d95",
"timestamp": 1557353556
},
"items": [
{
"invoiceline": {
"id": 45106,
"created_at": 1557353556,
"modified_at": 1557353556,
"active": true,
"name": "Demo",
"product_id": 4010,
"batch": null,
"sales_person": 1,
"invoice_id": 5075,
"quantity": 1,
"discount": 0,
"dispense": 0,
"price": 1.74,
"price_tax": 0.26,
"standard_price": 1.74,
"standard_price_tax": 0.26,
"total": 2,
"total_tax": 0,
"status": "pending",
"tax_code": "E",
"tax_percent": 0,
"ownership_id": 2,
"location_id": 3,
"ledger_account": 3,
"group_id": null,
"type": "standard",
"date": null
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v2/invoiceline
POST Parameters
Mandatory fields are marked with a *.
Note: Passing a value in the discount
property will not apply any discount to the invoice item.
Parameter | Type | Default | Description |
---|---|---|---|
name | num, string | - | The name or description of the InvoiceLine . This is usually the name of the Product . |
product_id* | num, string | - | The ID of the Product used in the InvoiceLine . |
batch | num, string | - | The number/lot of the Batch used on the InvoiceLine . |
sales_person* | num, string | - | The ID of the sales person User used in the InvoiceLine . The User must be marked as a salesperson (is_salesperson ). |
invoice_id* | num, string | - | The ID of the Invoice to which this InvoiceLine belongs. |
quantity* | num, string | - | The amount of the Product in this InvoiceLine (up to 4 decimal places). |
dispense | num, string | - | The dispense fee for the InvoiceLine . |
price | num, string | - | The price of the InvoiceLine after the discount is applied (up to 4 decimal places). |
price_tax | num, string | - | The tax applied to the InvoiceLine after the discount is applied (up to 4 decimal places). |
standard_price | num, string | - | The standard price of the InvoiceLine , without taxes and discounts (up to 4 decimal places). |
standard_price_tax | num, string | - | The tax to be applied to InvoiceLine , before taking discounts into account (up to 4 decimal places). |
status | string | - | The status of the InvoiceLine : Pending (initial status), Allocated (Product reserved), Finalised (Invoice approved). |
tax_code | string | - | The tax code for the InvoiceLine . |
ownership_id* | num, string | - | The ID of the Ownership Separation to which this InvoiceLine belongs. |
location_id* | num, string | - | The ID of the Location Separation to which this InvoiceLine belongs. |
ledger_account | num | - | The ID of the Ledger Account to which this InvoiceLine is recorded under. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an InvoiceLine . |
created_at | num, string | - | The epoch time when the InvoiceLine was created. |
modified_at | num, string | - | The epoch time when the InvoiceLine was last modified. |
active | num, string | - | If true, the InvoiceLine is active and usable in ezyVet. |
name | num, string | - | The name or description of the InvoiceLine . This is usually the name of the Product . |
product_id | num, string | - | The ID of the Product used in the InvoiceLine . |
batch | num, string | - | The number/lot of the Batch used on the InvoiceLine . |
sales_person | num, string | - | The ID of the sales person User used in the InvoiceLine . The User must be marked as a salesperson (is_salesperson ). |
invoice_id | num, string | - | The ID of the Invoice to which this InvoiceLine belongs. |
quantity | num, string | - | The amount of the Product in this InvoiceLine (up to 4 decimal places). |
discount | num, string | - | The percent discount applied to the InvoiceLine (from 0 to 100, without the % ). |
dispense | num, string | - | The dispense fee for the InvoiceLine . |
price | num, string | - | The price of the InvoiceLine after the discount is applied (up to 4 decimal places). |
price_tax | num, string | - | The tax applied to the InvoiceLine after the discount is applied (up to 4 decimal places). |
standard_price | num, string | - | The standard price of the InvoiceLine , without taxes and discounts (up to 4 decimal places). |
standard_price_tax | num, string | - | The tax to be applied to InvoiceLine , before taking discounts into account (up to 4 decimal places). |
total | num, string | - | The total price of the InvoiceLine , including the discount (no tax, up to 4 decimal places). |
total_tax | num, string | - | The total tax of the InvoiceLine , including the discount (up to 4 decimal places). |
status | string | - | The status of the InvoiceLine : Pending (initial status), Allocated (Product reserved), Finalised (Invoice approved). |
tax_code | string | - | The tax code for the InvoiceLine . |
tax_percent | num, string | - | The percentage of the tax applied to InvoiceLine (from 0 to 100, without the % ). |
ownership_id | num, string | - | The ID of the Ownership Separation to which this InvoiceLine belongs. |
location_id | num, string | - | The ID of the Location Separation to which this InvoiceLine belongs. |
ledger_account | num | - | The ID of the Ledger Account to which this InvoiceLine is recorded under. |
group_id | num | - | The ID of the line item group the InvoiceLine is under. |
type | string | - | The type of the InvoiceLine . |
date | num | - | The date that the product on the InvoiceLine was administered on the related record. The return value will be NULL if the product does not have an administration date. |
Update an InvoiceLine (V2)
Update a single InvoiceLine
Sample Request: Updating an
InvoiceLine
with the ID of 1
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/invoiceline",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data": {
"id": 1,
"active": true,
"name": "Demo",
"product_id": 4010,
"sales_person": 1,
"invoice_id": 5075,
"quantity": 1,
"discount": 0,
"dispense": 1,
"price": 1.74,
"price_tax": 0.26,
"standard_price": 1.74,
"standard_price_tax": 0.26,
"tax_code": "S",
"ownership_id": 2,
"location_id": 3,
"status": "pending"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "a89daef2ac9dadf60def21adf601b99faee5b9521034798d8893d1792c661091",
"timestamp": 1558316091
},
"items": [
{
"invoiceline": {
"id": 1,
"created_at": 1307500143,
"modified_at": 1557892149,
"active": true,
"name": "Demo",
"product_id": 4010,
"batch": 17,
"sales_person": 1,
"invoice_id": 5075,
"quantity": 1,
"discount": 0,
"dispense": 1,
"price": 1.74,
"price_tax": 0.26,
"standard_price": 1.74,
"standard_price_tax": 0.26,
"total": 1.74,
"total_tax": 0.26,
"status": "pending",
"tax_code": "S",
"tax_percent": 15,
"ownership_id": 2,
"location_id": 3,
"ledger_account": 3,
"group_id": null,
"type": "standard",
"date": null
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v2/invoiceline
PATCH Parameters
Mandatory fields are marked with a *.
Note: Passing a value in the discount
property will not apply any discount to the invoice line.
Parameter | Type | Default | Description |
---|---|---|---|
id* | num, string | - | The ID number used by the system to uniquely identify an InvoiceLine . |
active | num, string | - | If true, the InvoiceLine is active and usable in ezyVet. |
name | num, string | - | The name or description of the InvoiceLine . This is usually the name of the Product . |
product_id | num, string | - | The ID of the Product used in the InvoiceLine . |
batch | num, string | - | The number/lot of the Batch used on the InvoiceLine . |
sales_person | num, string | - | The ID of the sales person User used in the InvoiceLine . The User must be marked as a salesperson (is_salesperson ). |
invoice_id | num, string | - | The ID of the Invoice to which this InvoiceLine belongs. |
quantity | num, string | - | The amount of the Product in this InvoiceLine (up to 4 decimal places). |
dispense | num, string | - | The dispense fee for the InvoiceLine . |
price | num, string | - | The price of the InvoiceLine after the discount is applied (up to 4 decimal places). |
price_tax | num, string | - | The tax applied to the InvoiceLine after the discount is applied (up to 4 decimal places). |
standard_price | num, string | - | The standard price of the InvoiceLine , without taxes and discounts (up to 4 decimal places). |
standard_price_tax | num, string | - | The tax to be applied to InvoiceLine , before taking discounts into account (up to 4 decimal places). |
status | string | - | The status of the InvoiceLine : Pending (initial status), Allocated (Product reserved), Finalised (Invoice approved). |
tax_code | string | - | The tax code for the InvoiceLine . |
ownership_id | num, string | - | The ID of the Ownership Separation to which this InvoiceLine belongs. |
location_id | num, string | - | The ID of the Location Separation to which this InvoiceLine belongs. |
ledger_account | num | - | The ID of the Ledger Account to which this InvoiceLine is recorded under. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an InvoiceLine . |
created_at | num, string | - | The epoch time when the InvoiceLine was created. |
modified_at | num, string | - | The epoch time when the InvoiceLine was last modified. |
active | num, string | - | If true, the InvoiceLine is active and usable in ezyVet. |
name | num, string | - | The name or description of the InvoiceLine . This is usually the name of the Product . |
product_id | num, string | - | The ID of the Product used in the InvoiceLine . |
batch | num, string | - | The number/lot of the Batch used on the InvoiceLine . |
sales_person | num, string | - | The ID of the sales person User used in the InvoiceLine . The User must be marked as a salesperson (is_salesperson ). |
invoice_id | num, string | - | The ID of the Invoice to which this InvoiceLine belongs. |
quantity | num, string | - | The amount of the Product in this InvoiceLine (up to 4 decimal places). |
discount | num, string | - | The percent discount applied to the InvoiceLine (from 0 to 100, without the % ). |
dispense | num, string | - | The dispense fee for the InvoiceLine . |
price | num, string | - | The price of the InvoiceLine after the discount is applied (up to 4 decimal places). |
price_tax | num, string | - | The tax applied to the InvoiceLine after the discount is applied (up to 4 decimal places). |
standard_price | num, string | - | The standard price of the InvoiceLine , without taxes and discounts (up to 4 decimal places). |
standard_price_tax | num, string | - | The tax to be applied to InvoiceLine , before taking discounts into account (up to 4 decimal places). |
total | num, string | - | The total price of the InvoiceLine , including the discount (no tax, up to 4 decimal places). |
total_tax | num, string | - | The total tax of the InvoiceLine , including the discount (up to 4 decimal places). |
status | string | - | The status of the InvoiceLine : Pending (initial status), Allocated (Product reserved), Finalised (Invoice approved). |
tax_code | string | - | The tax code for the InvoiceLine . |
tax_percent | num, string | - | The percentage of the tax applied to InvoiceLine (from 0 to 100, without the % ). |
ownership_id | num, string | - | The ID of the Ownership Separation to which this InvoiceLine belongs. |
location_id | num, string | - | The ID of the Location Separation to which this InvoiceLine belongs. |
ledger_account | num | - | The ID of the Ledger Account to which this InvoiceLine is recorded under. |
group_id | num | - | The ID of the line item group the InvoiceLine is under. |
type | string | - | The type of the InvoiceLine . |
date | num | - | The date that the product on the InvoiceLine was administered on the related record. The return value will be NULL if the product does not have an administration date. |
Delete an InvoiceLine (V2)
Delete a single InvoiceLine
Sample Request: Deleting an
InvoiceLine
with the ID of 1
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/invoiceline",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
{
"id": 1
}
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "a89daef2ac9dadf60def21adf601b99faee5b9521034798d8893d1792c661091",
"timestamp": 1558316091
},
"items": [
{
"invoiceline": {
"id": 1,
"created_at": 1307500143,
"modified_at": 1557892149,
"active": true,
"name": "Demo",
"product_id": 4010,
"batch": 17,
"sales_person": 1,
"invoice_id": 5075,
"quantity": 1,
"discount": 0,
"dispense": 1,
"price": 1.74,
"price_tax": 0.26,
"standard_price": 1.74,
"standard_price_tax": 0.26,
"total": 1.74,
"total_tax": 0.26,
"status": "pending",
"tax_code": "S",
"tax_percent": 15,
"ownership_id": 2,
"location_id": 3,
"ledger_account": 3,
"group_id": null,
"type": "standard",
"date": null
}
}
],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v2/invoiceline
DELETE Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
id* | num, string | - | The ID number used by the system to uniquely identify an InvoiceLine . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an InvoiceLine . |
created_at | num, string | - | The epoch time when the InvoiceLine was created. |
modified_at | num, string | - | The epoch time when the InvoiceLine was last modified. |
active | num, string | - | If true, the InvoiceLine is active and usable in ezyVet. |
name | num, string | - | The name or description of the InvoiceLine . This is usually the name of the Product . |
product_id | num, string | - | The ID of the Product used in the InvoiceLine . |
batch | num, string | - | The number/lot of the Batch used on the InvoiceLine . |
sales_person | num, string | - | The ID of the sales person User used in the InvoiceLine . The User must be marked as a salesperson (is_salesperson ). |
invoice_id | num, string | - | The ID of the Invoice to which this InvoiceLine belongs. |
quantity | num, string | - | The amount of the Product in this InvoiceLine (up to 4 decimal places). |
discount | num, string | - | The percent discount applied to the InvoiceLine (from 0 to 100, without the % ). |
dispense | num, string | - | The dispense fee for the InvoiceLine . |
price | num, string | - | The price of the InvoiceLine after the discount is applied (up to 4 decimal places). |
price_tax | num, string | - | The tax applied to the InvoiceLine after the discount is applied (up to 4 decimal places). |
standard_price | num, string | - | The standard price of the InvoiceLine , without taxes and discounts (up to 4 decimal places). |
standard_price_tax | num, string | - | The tax to be applied to InvoiceLine , before taking discounts into account (up to 4 decimal places). |
total | num, string | - | The total price of the InvoiceLine , including the discount (no tax, up to 4 decimal places). |
total_tax | num, string | - | The total tax of the InvoiceLine , including the discount (up to 4 decimal places). |
status | string | - | The status of the InvoiceLine : Pending (initial status), Allocated (Product reserved), Finalised (Invoice approved). |
tax_code | string | - | The tax code for the InvoiceLine . |
tax_percent | num, string | - | The percentage of the tax applied to InvoiceLine (from 0 to 100, without the % ). |
ownership_id | num, string | - | The ID of the Ownership Separation to which this InvoiceLine belongs. |
location_id | num, string | - | The ID of the Location Separation to which this InvoiceLine belongs. |
ledger_account | num, string | - | The ID of the Ledger Account to which this InvoiceLine is recorded under. |
group_id | num | - | The ID of the line item group the InvoiceLine is under. |
type | string | - | The type of the InvoiceLine . |
date | num | - | The date that the product on the InvoiceLine was administered on the related record. The return value will be NULL if the product does not have an administration date. |
JobQueue V2
JobQueue
is used to queue API requests to be processed.
Fetch a list of Jobs
Fetches a list containing JobQueue
jobs (up to 10).
Sample Request: Get a list of
JobQueue
jobs with a status of "Pending".
let settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/jobqueue?status=pending",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1559164275,
"items_page": 1,
"items_page_total": 1,
"items_page_size": 10,
"items_total": 1
},
"items": [
{
"jobqueue": {
"id": 101,
"created_at": 1559772103,
"modified_at": 1559772103,
"active": true,
"type": "ReceiveInvoiceItem",
"type_id": 0,
"action": "ApiRequest",
"status": "Pending",
"data": {
"method": "POST",
"endpoint": "api\/v2\/receiveinvoiceitem",
"body": {
"quantity": 10,
"price": 5,
"tax": 0.5,
"supplier_code": "abc123",
"ownership_id": 3,
"receive_invoice_id": 5
}
},
"error": null
}
}
],
"messages": []
}
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | int | - | The ID number used by the system to uniquely identify a JobQueue job |
type | string | - | The endpoint type to hit. |
type_id | num | - | The id of the record the JobQueue job is for. |
action | string | "ApiRequest" | The type of action to perform for the JobQueue job. |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
created_at | num | - | The epoch time when the JobQueue job was created. |
modified_at | num | - | The epoch time when the JobQueue job was last modified. |
active | boolean | true | If true, the JobQueue job is active and usable in ezyVet. |
status | enum, string | - | The status of the current JobQueue job: Pending , Queued , Processing , Error , or Completed . |
data | DataConfig |
- | This configuration describes the action that this JobQueue job performs |
Create a Job
Creates a JobQueue
job. A job will need to contain the parameters needed for a normal API request to
be processed.
Sample Request: Create a
JobQueue
job for processing aReceiveInvoice
with aReceiveInvoiceItem
.
let settings = {
"crossDomain":true,
"url":"https://api.ezyvet.com/v2/jobqueue",
"method":"POST",
"headers":{
"authorization":"Bearer token12345",
"content-type":"application/x-www-form-urlencoded"
},
"data":{
"type": "ReceiveInvoice",
"type_id": 3,
"data": {
"method": "POST",
"endpoint": "api/v2/receiveinvoice",
"body": {
"date": 1558559681,
"due_date": 1558559681,
"invoice_number": "10000",
"ownership_id": 1,
"line_item": [
{
"quantity": 1,
"price": 100,
"tax": 10,
"tax_code": "S",
"supplier_code": "EZY_001"
}
]
}
}
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1560131695
},
"items": [
{
"jobqueue": {
"id": 249,
"created_at": 1560131692,
"modified_at": 1560131692,
"active": true,
"type": "ReceiveInvoice",
"type_id": 3,
"action": "ApiRequest",
"status": "Queued",
"data": {
"method": "POST",
"endpoint": "api\/v2\/receiveinvoice",
"body": {
"date": 1558559681,
"due_date": 1558559681,
"invoice_number": "10000",
"ownership_id": 1,
"line_item": [
{
"quantity": 1,
"price": 100,
"tax": 10,
"supplier_code": "abc123"
}
]
}
},
"error": null
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v2/jobqueue
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
type | string | - | The endpoint type to hit. |
type_id | num | 0 | The id of the record the JobQueue job is for. |
action | string | ApiRequest | The type of action to perform for the JobQueue job. |
data* | DataConfig |
- | This configuration describes the action that this job performs |
Data Config
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
method* | string | - | The HTTP method to be used: POST and PATCH |
endpoint* | string | - | The endpoint to be queued to hit: api/v2/{endpoint} |
body* | JSON | - | The JSON body to be sent to the endpoint . |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a JobQueue job. |
created_at | num | - | The epoch time when the JobQueue job was created. |
modified_at | num | - | The epoch time when the JobQueue job was last modified. |
active | boolean | true | If true, the JobQueue job is active and usable in ezyVet. |
status | enum, string | - | The status of the current JobQueue job: Pending , Queued , Processing , Error , or Completed . |
LedgerAccount
Represents a Ledger Account
within ezyVet.
Fetch Ledger Accounts
Fetches a list containing Ledger Account
s.
HTTP Request
GET https://api.ezyvet.com/v2/ledgeraccount
Sample Request: Get a
Ledger Account
with ID = 6.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/ledgeraccount/6",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "ab699b1919fe39ff173c960ae7a11845b0bf7bd93680bf70747567d73c6d1895",
"timestamp": 1559252557
},
"items": [
{
"ledgeraccount": {
"id": 6,
"created_at": 1313381960,
"modified_at": 1315864644,
"active": true,
"code": "200",
"name": "Sales"
}
}
],
"messages": []
}
Response Fields
The below response fields are all queryable.
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Ledger Account . |
created_at | num | - | The epoch time when the Ledger Account was created. |
modified_at | num | - | The epoch time when the Ledger Account was last modified. |
active | bool | true | If true, the Ledger Account is active and usable in ezyVet. |
code | string | - | The unique code for this Ledger Account . |
name | string | - | The name of this Ledger Account . |
Operation
An operation done at the clinic that can involve multiple procedures/therapeutics.
Each Operation
must be linked to a Consult
.
Fetch an Operation list
Fetches a list containing Operation
(s).(up to 10).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/operation?animal_id=5",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"operation": {
"id": "1",
"active": "1",
"created_at": "1307497412",
"modified_at": "1307497412",
"consult_id": "4",
"animal_id": "5",
"vet_id": "24",
"timestamp": "1307497412",
"therapeutic_id": "1",
"specifics": "Specifics",
"outcome": "Outcomes"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/operation
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Operation . |
active | num, string | - | If true, the Operation is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Operation was created. |
modified_at | num, string | - | The epoch time when the Operation was last modified. |
consult_id | num, string | - | Refers to the ID of the Consult where the Operation is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
vet_id | num, string | - | Refers to the ID of the User who is a Vet and is linked to the Operation . |
timestamp | num, string | - | The date when the clinic did a performed the examination for the health status of the Animal . Note that this doesn't necessarily refer to when the Operation record was created. |
therapeutic_id | num, string | - | Refers to the ID of the Therapeutic performed in the Operation . |
specifics | string | - | Contains specifics/notes about the Operation . |
outcome | string | - | Contains notes about the result of the Operation . |
Payment
Represents a payment record. Payments
can be allocated against Invoices
and
represent the amount paid.
A Payment
can be greater than the amount allocated, leaving an amount available to be used
towards another Invoice
.
Fetch a Payment list
Fetches a list containing Payment(s)
. (up to 10)
Sample Request: Fetch a list containing one
Payment
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/payment?limit=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479846904",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "1",
"items_total": "1"
},
"items": [
{
"payment": {
"id": "1",
"created_at": "1478823323",
"modified_at": "1478823323",
"active": "1",
"ownership_id": "1",
"amount": "50.00",
"method": "2",
"details": "Some Details",
"date": "1478823444",
"comments": "Some Comments",
"available": "0.00",
"allocated": "50.00",
"client_id": "30",
"cash_amount": "45.00",
"cash_change": "0.00",
"rounding_factor": "0.10",
"status": "Accepted",
"linked_invoices": [
{
"id": "2",
"allocated_amount": "25"
},
{
"id": "3",
"allocated_amount": "25"
}
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/payment
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Payment . |
created_at | num, string | - | The epoch time when the Payment was created. |
modified_at | num, string | - | The epoch time when the Payment was last modified. |
active | num, string | - | If true, the Payment is active and usable in ezyVet. |
ownership_id | num, string | - | The ID of the ownership Separation to which this Payment belongs. |
amount | string | - | The amount of the Payment . This is the total amount that was paid in the Payment . |
method | string | - | The PaymentMethod used to make the Payment . |
details | string | - | Any details regarding the Payment . |
date | string | - | The date on which the Payment was made. |
comments | bool, string | - | Any comments associated to the Payment . |
available | bool, string | - | Any surplus Payment amount. Happens when the amount paid was greater than the amount due. |
allocated | bool, string | - | The portion of the Payment that was allocated against an Invoice or the like. |
client_id | bool, string | - | The ID of the Client that made the Payment . |
cash_amount | bool, string | - | The amount paid in cash. |
cash_change | string | - | The amount of change produced from a cash Payment . |
rounding_factor | num, string | - | The denomination to which the Payment is rounded. |
status | num, string | - | The status of the Payment . E.g. Accepted , Declined etc. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Parent | Default | Description |
---|---|---|---|---|
linked_invoices | list | - | [] | A list containing the invoices to which this Payment is allocated. _NOTE: The Payment can be split between multiple invoices . |
id | num, string | linked_invoices | - | The ID number used by the system to uniquely identify an Invoice . |
allocated_amount | num, string | linked_invoices | - | The amount allocated to the Invoice . |
Payment V2
The following documentation is specifically for V2.
Payment
objects are used to record a single Payment
received from a Contact
of the practice for goods or services they have received.
Fetch a List of Payments
Fetches a list of Payments
. The list is paginated and returns pages of up to 10 records.
Sample Request: Get the
Payment
with the ID 24.
var settings = {
crossDomain: true,
url: "https://api.ezyvet.com/v2/payment/24",
method: "GET",
headers: {
authorization: "Bearer token12345"
}
};
$.ajax(settings).done(function(response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "3df37e2cc8635ebd6143aaf0742b9e00dcd65c0e4d58f206b087c254d5ba1e48",
"timestamp": 1558325539
},
"items": [
{
"payment": {
"id": 24,
"created_at": 1321230382,
"modified_at": 1321230382,
"active": true,
"amount": 100,
"method": 1,
"date": 1321230000,
"details": "",
"outstanding": 0,
"allocated": 100,
"comments": "client paid in cash",
"client_contact": 13,
"ledger_account": 7,
"cash_amount": 100,
"cash_change": 0,
"rounding_factor": 0.1,
"status": "accepted",
"ownership_id": 2
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/payment
Query Parameters
Parameter | Type | Description |
---|---|---|
id | num | The ID of the Payment . |
method | num | The ID of the Payment Method . Representing how the payment was received. |
client_contact | num | The ID of the Client Contact that made the Payment . |
ledger_account | num | The ID of the Ledger Account the Payment was paid into. |
active | bool | The active flag for the Payment which indicates whether the payment is available to be used within ezyVet. |
status | string | The status of the Payment which indicates what state the payment is in. Can be one of (created, accepted, declined) |
ownership_id | num | The ID of the Ownership Separation representing the part of the business that the payment will financially impact |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Payment . |
created_at | num | - | The epoch time when the Payment was created. |
modified_at | num | - | The epoch time when the Payment was last modified. |
active | bool | true | If true, the Payment is active and usable in ezyVet. |
amount | num | - | The amount of the Payment . This is the total amount that was paid in the Payment . |
method | num | - | The ID of the Payment Method used to make the Payment . |
date | num | - | The date of the Payment , stored as an epoch timestamp. |
details | string | - | Any details regarding the Payment . |
outstanding | num | amount | The outstanding balance on this Payment . |
allocated | num | - | The portion of the Payment allocated against an Invoice . |
comments | string | - | Any comments associated to the Payment . |
client_contact | num | - | The ID of the Client Contact that made the Payment . |
ledger_account | num | - | The ID of the Ledger Account the Payment was paid into. |
cash_amount | num | - | The amount paid in cash. |
cash_change | num | - | The amount of change produced from a cash Payment . |
rounding_factor | num | 0.05 | The denomination to which the Payment is rounded. |
status | string | - | The status of the Payment . e.g. accepted , declined etc. |
ownership_id | num | - | The ID of the ownership Separation to which this Payment belongs. |
PaymentMethod
Represents a payment method. PaymentMethods
are the different ways with which a
Payment
can be made.
Fetch a PaymentMethod list
Fetches a list containing PaymentMethod(s)
. (up to 10)
Sample Request: Fetch a list containing one
PaymentMethod
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/paymentmethod?limit=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479846904",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "1",
"items_total": "1"
},
"items": [
{
"paymentmethod": {
"id": "1",
"created_at": "1478823323",
"modified_at": "1478823323",
"active": "1",
"name": "Direct Credit",
"uses_eftpos_machine": "1",
"type": "Direct",
"commission_rate": "0.00",
"surcharge_amount": "0.00",
"surcharge_type": "None"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/paymentmethod
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a PaymentMethod . |
created_at | num, string | - | The epoch time when the PaymentMethod was created. |
modified_at | num, string | - | The epoch time when the PaymentMethod was last modified. |
active | num, string | - | If true, the PaymentMethod is active and usable in ezyVet. |
name | num, string | - | The name of the PaymentMethod . |
uses_eftpos_machine | string | - | If true, the PaymentMethod uses an eftpos machine. |
type | string | - | The type of the PaymentMethod . E.g. 'Direct'. |
commission_rate | string | - | The commission rate of the PaymentMethod . |
surcharge_amount | bool, string | - | The surcharge amount of the PaymentMethod . |
surcharge_type | bool, string | - | The type of the surcharge. |
PhysicalExam
Represents a Physical Exam record. The PhysicalExam
records are
always linked to a Consult
.
A Consult
can have multiple PhysicalExam
records against
it.
Fetch a PhysicalExam list
Fetches a list containing PhysicalExam
(s). (up to 10)
Sample Request: Fetch a list containing one
PhysicalExam
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/physicalexam?limit=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479846904",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "1",
"items_total": "1"
},
"items": [
{
"physicalexam": {
"id": "4",
"active": "1",
"created_at": "1478823323",
"modified_at": "1478823323",
"consult_id": "1",
"animal_id": "1",
"body_system": "5",
"chain": "|0||5|",
"comments": "This is a comment.",
"timestamp": "1478823328",
"vet_id": "1"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/physicalexam
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an PhysicalExam . |
active | num, string | - | If true, the PhysicalExam is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PhysicalExam was created. |
modified_at | num, string | - | The epoch time when the PhysicalExam was last modified. |
consult_id | num, string | - | Refers to the ID of the Consult where the PhysicalExam is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
body_system | num, string | - | Refers to the ID of the BodySystem . |
chain | num, string | - | The chain of BodySystem items thus far. |
comments | string | - | Comments for the PhysicalExam record. |
timestamp | num, string | - | The date when PhysicalExam was noted for the consult. Note that this doesn't necessarily refer to when the PhysicalExam record was created. |
vet_id | num, string | - | Refers to the ID of the User who is a Vet and is linked to the PhysicalExam . |
Create a PhysicalExam
Creates a single PhysicalExam
.
Sample Request: Creating
PhysicalExam
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/physicalexam",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data": {
"consult_id": "3372",
"animal_id": "580",
"vet_id": "467",
"ownership_id": "1",
"body_system": "1",
"comments": "comments example here",
"timestamp": "1587694080",
"historical_record_id": "0",
"active": 1
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "d282b404ae347ead892db302825a938fe318567f9b3f522ee9f64d4bdac4a851",
"timestamp": "1529889974"
},
"items": [
{
"physicalexam": {
"id": "624",
"active": "1",
"created_at": "1587701051",
"modified_at": "1587701051",
"consult_id": "3372",
"animal_id": "580",
"body_system": "1",
"chain": "|1|",
"comments": "comments example here",
"timestamp": "1587694080",
"vet_id": "467",
"historical_record_id": "0"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/physicalexam
POST Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
consult_id* | num, string | - | Refers to the ID of the Consult where the PhysicalExam is attached. |
animal_id* | num, string | - | The ID of the Animal associated with the Consult . |
vet_id* | num, string | - | Refers to the ID of the User who is a Vet and is linked to the PhysicalExam . |
ownership_id | num, string | - | The ID of the ownership Separation to which this PhysicalExam belongs. |
body_system | num, string | 0 | Refers to the ID of the BodySystem . |
comments | num, string | - | Any comments associated to the PhysicalExam . |
timestamp | num, string | The epoch now | The epoch creation date of the PhysicalExam . |
historical_record_id | num, string | 0 | Refers to the ID of the previous PhysicalExam . |
active | num | 1 | If 1, the PhysicalExam is active and usable in ezyVet. If 0, the PhysicalExam is disabled in ezyVet. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an PhysicalExam . |
active | num, string | - | If 1, the PhysicalExam is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PhysicalExam was created. |
modified_at | num, string | - | The epoch time when the PhysicalExam was last modified. |
consult_id | num, string | - | Refers to the ID of the Consult where the PhysicalExam is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
body_system | num, string | - | Refers to the ID of the BodySystem . |
chain | string | - | The chain of BodySystem items thus far. |
comments | string | - | Comments for the PhysicalExam record. |
timestamp | num, string | - | The date when PhysicalExam was noted for the consult. Note that this doesn't necessarily refer to when the PhysicalExam record was created. |
vet_id | num, string | - | Refers to the ID of the User who is a Vet and is linked to the PhysicalExam . |
historical_record_id | num, string | - | Refers to the ID of the previous PhysicalExam . If 0, the PhysicalExam does not have any previous PhysicalExam . |
Update a PhysicalExam
Update a single PhysicalExam
.
Sample Request: Updating a
PhysicalExam
with the ID of 624
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/physicalexam/624",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data": {
"consult_id": "3369",
"animal_id": "562",
"vet_id": "88",
"ownership_id": "1",
"body_system": "26",
"comments": "new comments example here",
"timestamp": "1587698080",
"historical_record_id": "0",
"active": "0"
}
}
Response (JSON)
{
"meta": {
"transaction_id": "d2ac39b9db4d68c3ce1441c7356e41ae86b15e5bed96f0567f5a368ac609f68c",
"timestamp": "1529880503",
"items_matched": 1,
"items_processed": 1
},
"items": [
{
"physicalexam": {
"id": "624",
"active": "0",
"created_at": "1587701051",
"modified_at": "1587708069",
"consult_id": "3369",
"animal_id": "562",
"body_system": "26",
"chain": "|2||26|",
"comments": "new comments example here",
"timestamp": "1587698080",
"vet_id": "88",
"historical_record_id": "0"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/physicalexam
PATCH Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id* | num, string | - | The ID number used by the system to uniquely identify a PhysicalExam is attached. |
consult_id | num, string | - | Refers to the ID of the Consult where the PhysicalExam is attached. |
animal_id | num, string | - | The ID of the Animal associated with the Consult . |
vet_id | num, string | - | Refers to the ID of the User who is a Vet and is linked to the PhysicalExam . |
ownership_id | num, string | - | The ID of the ownership Separation to which this PhysicalExam belongs. |
body_system | num, string | 0 | Refers to the ID of the BodySystem . |
comments | num, string | - | Any comments associated to the PhysicalExam . |
timestamp | num, string | The epoch now | The epoch creation date of the PhysicalExam . |
historical_record_id | num, string | 0 | Refers to the ID of the previous PhysicalExam . |
active | num | 1 | If 1, the PhysicalExam is active and usable in ezyVet. If 0, the PhysicalExam is disabled in ezyVet. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an PhysicalExam . |
active | num, string | - | If 1, the PhysicalExam is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PhysicalExam was created. |
modified_at | num, string | - | The epoch time when the PhysicalExam was last modified. |
consult_id | num, string | - | Refers to the ID of the Consult where the PhysicalExam is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
body_system | num, string | - | Refers to the ID of the BodySystem . |
chain | string | - | The chain of BodySystem items thus far. |
comments | string | - | Comments for the PhysicalExam record. |
timestamp | num, string | - | The date when PhysicalExam was noted for the consult. Note that this doesn't necessarily refer to when the PhysicalExam record was created. |
vet_id | num, string | - | Refers to the ID of the User who is a Vet and is linked to the PhysicalExam . |
historical_record_id | num, string | - | Refers to the ID of the previous PhysicalExam . If 0, the PhysicalExam does not have any previous PhysicalExam . |
Plan
A plan is a set of notes recorded by someone to describe a plan of action.
Fetch a Plan
Each Plan
must be linked to a Consult
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/plan?animal_id=5",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"plan": {
"id": "1",
"active": "1",
"created_at": "1307497412",
"modified_at": "1307497412",
"consult_id": "4",
"animal_id": "5",
"vet_id": "24",
"timestamp": "1307497412",
"notes": "This is a plan",
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/plan
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Plan . |
active | num, string | - | If true, the Plan is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Plan was created. |
modified_at | num, string | - | The epoch time when the Plan was last modified. |
consult_id | num, string | - | Refers to the ID of the Consult where the Plan is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
vet_id | num, string | - | Refers to the ID of the User who is the Vet linked to the Plan . |
timestamp | num, string | - | The date when the clinic did a performed the examination for the health status of the Animal . Note that this doesn't necessarily refer to when the Plan record was created. |
notes | num, string | - | Notes about the Plan record. |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Prescription
Represents a list of medications prescribed.
Each prescription can contain multiple prescription items.
Fetch a Prescription list
Fetches a list containing Prescription
(s). (up to 10)
Sample Request: Get a list of
Prescription
(s) for the animal "Pupper" (ID:2).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/prescription?animal_id=2",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"prescription": {
"id": "1",
"active": "1",
"created_at": "1494809239",
"modified_at": "1494809239",
"animal_id": "2",
"consult_id": "2",
"prescribing_vet_user_id": "8",
"date_of_prescription": "1494809199",
"prescription_item_list": [
"1"
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/prescription
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Prescription . |
active | num, string | - | If true, the Prescription is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Prescription was created. |
modified_at | num, string | - | The epoch time when the Prescription was last modified. |
animal_id | num, string | - | The name of the Animal to which the Prescription was issued. |
consult_id | num, string | - | The name of the Consult to which the Prescription was issued. |
prescribing_vet_user | num, string | - | The name of the User (a vet) who issued the Prescription . |
date_of_prescription | num, string | - | The epoch time when the Prescription was issued. This is not necessarily when the Prescription record was created. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
prescription_item_list | num, string | - | Contains a list of PrescriptionItem IDs. |
Create a Prescription
Creates a Prescription
. A Prescription
may contain PrescriptionItem
s
within the POST
data, which will result in new PrescriptionItem
s also being created through this endpoint.
The other alternative is to POST
data directly, using the PrescriptionItem
endpoint.
Sample Request: Create a
Prescription
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/prescription",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/x-www-form-urlencoded",
},
"data": {
"animal_id":"2",
"consult_id":"2",
"prescribing_vet_user_id": "8",
"date_of_prescription": "1494809199",
"prescription_item_list": [
{
"product_id": "220",
"qty": "2"
},
{
"product_id": "221",
"qty": "3"
}
],
"contact_id": "14"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1583574619"
},
"items": [
{
"prescription": {
"id": "2293",
"active": "1",
"created_at": "1583574619",
"modified_at": "1583574619",
"animal_id": "2",
"consult_id": "2",
"prescribing_vet_user_id": "8",
"date_of_prescription": "1494809199",
"prescription_item_list": [
"3808",
"3809"
],
"contact_id": "14"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/prescription
POST Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
animal_id* | num, string | - | Refers to the ID of the Animal . |
consult_id | num, string | - | Refers to the ID of the Consult where the Prescription is attached. |
contact_id | num, string | - | Refers to the Contact ID of the Animal . |
prescribing_vet_user_id* | num, string | - | Refers to the ID of the User that is prescribing the medication. |
date_of_prescription | num, string | - | The epoch time when the Prescription was issued. This is not necessarily when the Prescription record was created. |
prescription_item_list | PrescriptionItem[] |
[] | Contains a list of PrescriptionItem objects. Please refer to the POST fields for PrescriptionItem to understand the values required in each object. |
Response Fields
Includes most POST parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Prescription . |
active | num, string | - | If true, the Prescription is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Prescription was created. |
modified_at | num, string | - | The epoch time when the Prescription was last modified. |
prescription_item_list | PrescriptionItem[] |
[] | Contains a list of PrescriptionItem IDs. |
Update a Prescription
Updates a Prescription
.
Sample Request: Update a
Prescription
with the ID of 2567.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/prescription/2567",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data": {
"animal_id":"2",
"consult_id":"2",
"prescribing_vet_user_id": "8",
"date_of_prescription": "1494809199",
"prescription_item_list": [
{
"product_id": "220",
"qty": "2"
},
{
"product_id": "221",
"qty": "3"
}
],
"contact_id": "14"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1583574619"
},
"items": [
{
"prescription": {
"id": "2293",
"active": "1",
"created_at": "1583574619",
"modified_at": "1583574619",
"animal_id": "2",
"consult_id": "2",
"prescribing_vet_user_id": "8",
"date_of_prescription": "1494809199",
"prescription_item_list": [
"3808",
"3809"
],
"contact_id": "14"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/prescription/{id}
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Prescription . |
consult_id | num, string | - | Refers to the ID of the Consult where the Prescription is attached. |
animal_id | num, string | - | Refers to the ID of the Animal . |
PATCH Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
animal_id* | num, string | - | Refers to the ID of the Animal . |
consult_id | num, string | - | Refers to the ID of the Consult where the Prescription is attached. |
contact_id | num, string | - | Refers to the Contact ID of the Animal . |
prescribing_vet_user_id* | num, string | - | Refers to the ID of the User that is prescribing the medication. |
date_of_prescription | num, string | - | The epoch time when the Prescription was issued. This is not necessarily when the Prescription record was created. |
prescription_item_list | PrescriptionItem[] |
[] | Contains a list of PrescriptionItem objects. Please refer to the POST fields for PrescriptionItem to understand the values required in each object. |
Response Fields
Includes most PATCH parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Prescription . |
active | num, string | - | If true, the Prescription is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Prescription was created. |
modified_at | num, string | - | The epoch time when the Prescription was last modified. |
prescription_item_list | PrescriptionItem[] |
[] | Contains a list of PrescriptionItem IDs. |
Delete a Prescription
Deletes a Prescription
.
Sample Request: Delete a
Prescription
with an ID of 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/prescription/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/prescription/{id}
Response Fields
There are no response fields for a DELETE
operation.
Prescription V2
Represents a list of medications prescribed.
Each prescription can contain multiple prescription items.
Fetch a Prescription list
Fetches a list containing Prescription
(s). (up to 10)
Sample Request: Get a list of
Prescription
(s) for the animal "Pupper" (ID:2).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/prescription?animal_uid=animal_12345",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"prescription": {
"id": "1",
"uid": "prescription_8FZwK2yCDryk8ndWJQl1L",
"created_at": 1560055398,
"modified_at": 1563499160,
"active": true,
"animal_id": 5,
"animal_uid": "animal_MFdiFfzdVzgBJ6pdcpUmT",
"prescribing_vet_user_id": 9,
"prescribing_vet_user_uid": "user_MFdiFfzdVzgBJ6pdcpTmU",
"date_of_prescription": 1560120180,
"sales_resource_id": 11,
"prescription_item_list": [
{
"product_id": 20,
"product_uid": "product_bfi6AdP5HmQxZB61Vkl7Q",
"start_date": 1560055380,
"quantity": 2,
"remaining": 0,
"instructions": "Instructions for medications"
}
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/prescription
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an Prescription . |
active | num | - | If true, the Prescription is active and usable in ezyVet. |
created_at | num | - | The epoch time when the Prescription was created. |
modified_at | num, string | - | The epoch time when the Prescription was last modified. |
animal_id | num | - | The animal id of the Animal to which the Prescription was issued. |
animal_uid | string | - | The animal uid of the Animal to which the Prescription was issued. |
consult_id | num | - | The name of the Consult to which the Prescription was issued. |
prescribing_vet_user | num | - | The name of the User (a vet) who issued the Prescription . |
date_of_prescription | num, string | - | The epoch time when the Prescription was issued. This is not necessarily when the Prescription record was created. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
prescription_item_list | array | - | Contains a list of PrescriptionItem details |
PrescriptionItem
Represents a single line or item in a prescription. Sometimes referred to as medication.
Fetch a PrescriptionItem list
Fetches a list containing PrescriptionItem
(s). (up to 10)
Sample Request: Get a list of
PrescriptionItem
(s) for the givenPrescriptionItem
(ID:1).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/prescriptionitem?prescription_id=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"prescriptionitem": {
"id": "1",
"active": "1",
"created_at": "1494809239",
"modified_at": "1494809239",
"prescription_id": "1",
"product_id": "12",
"qty": "5",
"remaining": "2",
"instructions": "Test Medication Product - Instructions",
"date_start": "1494809239",
"serial_number": "AD321654"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/prescriptionitem
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an PrescriptionItem . |
active | num, string | - | If true, the PrescriptionItem is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PrescriptionItem was created. |
modified_at | num, string | - | The epoch time when the PrescriptionItem was last modified. |
prescription_id | num, string | - | Refers to the ID of the Prescription to which the PrescriptionItem belongs. |
product_id | num, string | - | Refers to the ID of the Product added to the Prescription as a PrescriptionItem . |
qty | num, string | - | The amount of the PrescriptionItem prescribed. |
remaining | num, string | - | The amount of the PrescriptionItem remaining from the prescription. |
instructions | string | - | Instructions on how to use the PrescriptionItem . |
date_start | num, string | - | The epoch time when the PrescriptionItem must start being taken. |
serial_number | string | null | The serial number for PrescriptionItem . |
Create a PrescriptionItem
Creates a PrescriptionItem
.
Sample Request: Create a
PrescriptionItem
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/prescriptionitem",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data": {
"active": "1",
"prescription_id": "1",
"product_id": "12",
"qty": "5",
"remaining": "2",
"instructions": "Test Medication Product - Instructions",
"date_start": "1494809239"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1583574619"
},
"items": [
{
"prescriptionitem": {
"id": "1",
"active": "1",
"created_at": "1494809239",
"modified_at": "1494809239",
"prescription_id": "1",
"product_id": "12",
"qty": "5",
"remaining": "2",
"instructions": "Test Medication Product - Instructions",
"date_start": "1494809239",
"serial_number": "FH321765"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/prescriptionitem
POST Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
prescription_id* | num, string | - | Refers to the ID Prescription to which the PrescriptionItem belongs. |
product_id* | num, string | - | Refers to the ID Product added to the Prescription as a PrescriptionItem . |
qty* | num, string | - | The amount of the PrescriptionItem prescribed. |
remaining* | num, string | - | The amount of the PrescriptionItem remaining from the prescription. |
instructions | string | - | Instructions on how to use the PrescriptionItem . |
date_start* | num, string | - | The epoch time when the PrescriptionItem must start being taken. |
serial_number | string | null | The serial number for PrescriptionItem . |
Response Fields
Includes most POST parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an PrescriptionItem . |
active | num, string | - | If true, the PrescriptionItem is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PrescriptionItem was created. |
modified_at | num, string | - | The epoch time when the PrescriptionItem was last modified. |
Update a PrescriptionItem
Updates a PrescriptionItem
.
Sample Request: Update a
PrescriptionItem
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/prescriptionitem/1",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data": {
"active": "1",
"prescription_id": "1",
"product_id": "12",
"qty": "5",
"remaining": "2",
"instructions": "Test Medication Product - Instructions",
"date_start": "1494809239",
"serial_number": "AD321654"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1583574619"
},
"items": [
{
"prescriptionitem": {
"id": "1",
"active": "1",
"created_at": "1494809239",
"modified_at": "1494809239",
"prescription_id": "1",
"product_id": "12",
"qty": "5",
"remaining": "2",
"instructions": "Test Medication Product - Instructions",
"date_start": "1494809239",
"serial_number": "AD321654"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/prescriptionitem/{id}
PATCH Parameters
Mandatory fields are marked with a *.
Parameter | Type | Default | Description |
---|---|---|---|
prescription_id* | num, string | - | Refers to the ID Prescription to which the PrescriptionItem belongs. |
product_id* | num, string | - | Refers to the ID Product added to the Prescription as a PrescriptionItem . |
qty* | num, string | - | The amount of the PrescriptionItem prescribed. |
remaining* | num, string | - | The amount of the PrescriptionItem remaining from the prescription. |
instructions | string | - | Instructions on how to use the PrescriptionItem . |
date_start* | num, string | - | The epoch time when the PrescriptionItem must start being taken. |
serial_number | string | null | The serial number for PrescriptionItem . |
Response Fields
Includes most PATCH parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an PrescriptionItem . |
active | num, string | - | If true, the PrescriptionItem is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PrescriptionItem was created. |
modified_at | num, string | - | The epoch time when the PrescriptionItem was last modified. |
Delete a PrescriptionItem
Deletes a PrescriptionItem
.
Sample Request: Delete a
PrescriptionItem
with an ID of 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/prescriptionitem/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/prescriptionitem/{id}
Response Fields
There are no response fields for a DELETE
operation.
PresentingProblem
A presenting problem is a problem that is recognized by the clinic. Clinics assign a presenting problem to a consultation in order to quickly identify the reason for the consultation.
Fetch a PresentingProblem list
Fetches a list containing PresentingProblem
(s).
Sample Request: Get a list of
PresentingProblem
s that the clinic recognizes
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/presentingproblem",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"presentingproblem": {
"id": "1",
"active": "1",
"created_at": "1307421010",
"modified_at": "1462835238",
"name": "Seizures"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/presentingproblem
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an PresentingProblem . |
active | num, string | - | If true, the PresentingProblem is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PresentingProblem was created. |
modified_at | num, string | - | The epoch time when the PresentingProblem was last modified. |
name | string | - | The name of the PresentingProblem . |
limit | num, string | 10 | Sets the limit on the number of items returned (range: 1 - 50) |
page | num, string | 1 | Specifies the page number of the result. |
PresentingProblemLink
You can add presenting problems to a consult by creating links between them.
Each Consult
can have PresentingProblemLink
(s) to have multiple PresentingProblem
(s).
Fetch a PresentingProblemLink list
Fetch all the PresentingProblemLink
s. (up to 10)
Sample Request: Get a list of
PresentingProblem
s linked to a givenconsult
(ID:27).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/PresentingProblemLink?consult_id=27",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"presentingproblemlink": {
"id": "1",
"active": "1",
"created_at": "1307421010",
"modified_at": "1462835238",
"presenting_problem_id": "5",
"consult_id": "7",
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/presentingproblemlink
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an PresentingProblemLink . |
active | num, string | - | If true, the PresentingProblemLink is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PresentingProblemLink was created. |
modified_at | num, string | - | The epoch time when the PresentingProblemLink was last modified. |
presenting_problem_id | string | - | Refers to the ID of the PresentingProblem where the PresentingProblemLink is attached. |
consult_id | string | - | Refers to the ID of the Consult where the PresentingProblemLink is attached. |
limit | num, string | 10 | Sets the limit on the number of items returned (range: 1 - 50) |
page | num, string | 1 | Specifies the page number of the result. |
Price Adjustment
Represents a Price Adjustment
within ezyVet.
Fetch Price Adjustments
Fetches a list containing Price Adjustment
s.
HTTP Request
GET https://api.ezyvet.com/v1/priceadjustment
Sample Request: Get a
Price Adjustment
with ID = 3220969.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/priceadjustment/3220969",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "dfb49cad7bb46acb9073531c377627bc0e686fa46b6226e903bd70efc25cf792",
"timestamp": 1547437749
},
"items": [
{
"priceadjustment": {
"id": 3220969,
"created_at": 1538697835,
"modified_at": 1538697835,
"active": true,
"type": "credit",
"adjustment_method": "quantity",
"adjustment_amount": -1,
"associated_type": "InvoiceExpense",
"associated_id": 43158,
"triggering_type": "BillingCredit",
"triggering_id": 1,
"description": "FM Test - Free consult",
"total_change": -34.8,
"total_change_tax": -5.22,
"total_earned": 6.96,
"total_earned_tax": 1.04,
"consuming": true,
"wellnessplan_id": 1,
"wellnessplan_benefit_id": 4,
"wellnessplan_membership_id": 1
}
}
],
"messages": []
}
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Price Adjustment . |
active | bool | true | If true, the Price Adjustment is applied to the associated record. |
type | string | - | The type of adjustment. This can be one of the following: User , Credit , Rounding , Discount , Surcharge . |
associated_type | string | - | The type of record that was adjusted. |
associated_id | string | - | The associated_type records ID. |
triggering_type | string | - | The type of record that triggered the Price Adjustment . |
triggering_id | num | - | The triggering_type records ID. |
wellness_plan_id | num, null | null | The ID of the related Wellness Plan . |
wellness_plan_benefit_id | num, null | null | The ID of the related Wellness Plan Benefit . |
wellness_plan_membership_id | num, null | null | The ID of the related Wellness Plan Membership . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Price Adjustment . |
active | bool | true | If true, the Price Adjustment is applied to the associated record. |
type | string | - | The type of adjustment. This can be one of the following: User , Credit , Rounding , Discount , Surcharge . |
adjustment_method | enum | - | The method used to calculate the adjustment. |
adjustment_amount | num | - | The amount the Price Adjustment adjusted the associated_type . |
associated_type | string | - | The type record that was adjusted. |
associated_id | string | - | The associated_type 's ID. |
triggering_type | string | - | The record type that triggered the Price Adjustment . |
triggering_id | num | - | The triggering_type 's ID. |
description | string | - | The description of the Price Adjustment . |
total_change | num | - | The total adjustment. |
total_change_tax | num | - | The total change in tax. |
total_earned | num | - | Total earned from the adjustment. |
total_earned_tax | num | - | Tax amount on the total earned. |
consuming | bool | - | If the Price Adjustment is consuming part / all of a BillingCredit . |
wellness_plan_id | num, null | null | The ID of the related Wellness Plan . |
wellness_plan_benefit_id | num, null | null | The ID of the related Wellness Plan Benefit . |
wellness_plan_membership_id | num, null | null | The ID of the related Wellness Plan Membership . |
Product
Represents a product item in the clinic. Each product can have typical product-related fields such as price, description, type and so on.
Each Product
must be part of a ProductGroup
.
Fetch a Product list
Fetches a list containing Product
(s). (up to 10)
Sample Request: Fetch a list containing one
Product
, including its stock levels.
var questionsStringified = encodeURIComponent(JSON.stringify([{'name': 'stocklevel'}]));
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/product?limit=1&questions=" + {questionsStringified},
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1475539773",
"items_page": "1",
"items_page_total": "1374",
"items_page_size": "2",
"items_total": "2747"
},
"items": [
{
"product": {
"id": "6",
"active": "1",
"created_at": "1478823071",
"modified_at": "1478823071",
"name": "Test Product Name",
"code": "Test Product Code",
"product_group_id": "1",
"description": "Test Product Description",
"warning": "Test Product Warning",
"is_sold": "1",
"is_purchased": "0",
"is_container": "0",
"product_identifier": "00777310502",
"product_schedule_or_class": "III",
"is_derived_price": "0",
"has_direct_cost": "0",
"type": "Standard",
"_answers": {
"stocklevel": {
"in_stock": "23.00",
"allocated": "8.00",
"available": "15.00",
"on_order_for_inventory": "0.00",
"on_order_total": "0.00",
"being_receipted": "0.00",
"inventory_turn": "0.00"
}
}
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/product
Questions
Name | Args | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stocklevel | - |
Returns various data regarding the given Product's stock numbers.
|
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Product . |
active | num, string | - | If true, the Product is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Product was created. |
modified_at | num, string | - | The epoch time when the Product was last modified. |
code | string | - | String generally used by clinic staff members to identify Products . |
questions | string | - | Complex inquiries about the Product . Refer to the Questions table. |
name | string | - | Name of the Product as it is visible on ezyVet. |
active | bool, string | - | If this field is false, the Product is considered disabled/inactive. |
product_group_id | num, string | - | The ID of the ProductGroup where the Product is assigned. Every Product requires a ProductGroup . This shows up as the "Primary Product Group" on the Product screen. |
description | string | - | The description of the Product . |
warning | string | - | This is where clinic staff can write warning messages regarding the Product , such as "For external use only". |
type | enum, string | Standard |
Specifies the Product type, and where it can be used: Standard , Medication , Vaccination , Diagnostic , Integrated Diagnostic , Procedure |
is_sold | bool, string | - | If true, the Product can be sold. |
is_purchased | bool, string | - | If true, the Product can be bought. |
is_container | bool, string | - | If true, the Product acts as a container for other Product (s). |
is_derived_price | bool, string | - | If true, the price is derived from all the Product (s) contained. |
has_direct_cost | bool, string | - | If true, the Product has the "has direct cost" checkmark set and can use markup |
product_identifier | string | - | For the US, this is the 11 digit NDC or product ID for compounds. |
product_schedule_or_class | string | - | This is the controlled substances for controlled drugs. For the US, this value is in roman numerals, Eg. II, III, IV,V. |
limit | num, string | 10 | Limits the number of results returned. |
page | num, string | 1 | Specifies the page number of the result. |
Product V2
Represents a product item in the clinic. Each product has typical product-related fields such as price, description, type and so on.
The V2 Product API only allows for retrieving product records with GET requests.
Fetch a Product list (V2)
Fetches a list containing Product
(s). (up to 10)
HTTP Request
GET https://api.ezyvet.com/v2/product
Fetch a Specific Product
Fetches a specific product by its id.
HTTP Request
GET https://api.ezyvet.com/v2/product/<product_id>
Sample Request: Fetch a list containing one
Product
.
const settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/product/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "example_id",
"timestamp": 1572527953
},
"items": [
{
"product": {
"id": 1,
"created_at": 1301460580,
"modified_at": 1544389951,
"active": false,
"name": "Testing U pload",
"code": "5984225",
"description": "Testing the upload",
"type": "Procedure",
"tracking_level": "Batch",
"product_group_id": 78,
"warning": "",
"is_sold": true,
"is_purchased": false,
"is_container": false,
"is_derived_price": false,
"has_cost_price": false,
"lowest_dispensable_quantity": 1,
"lowest_dispensable_unit": "kg",
"concentration": 1,
"concentration_unit": "kg",
"concentration_volume": "kg",
"concentration_diluted": 12,
"concentration_diluted_unit": "kg",
"concentration_diluted_volume": "kg",
"default_dosage_calculation_method": "Example Dosage Calculation Method",
"is_constant_rate_infusion": true,
"default_infusion_rate_per": "kg",
"default_route_of_administration": "Example Route of Administration",
"sheet_group": 1,
"sheet_group_name": "Example Sheet Group Name"
}
}
],
"messages": []
}
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Product . |
active | bool | - | If true, the Product is active and usable in ezyVet. |
created_at | num | - | The epoch time when the Product was created. |
modified_at | num | - | The epoch time when the Product was last modified. |
code | string | - | String generally used by clinic staff members to identify Products . |
name | string | - | Name of the Product as it is visible on ezyVet. |
product_group_id | num | - | The ID of the ProductGroup where the Product is assigned. Every Product requires a ProductGroup . This shows up as the "Primary Product Group" on the Product screen. |
description | string | - | The description of the Product . |
warning | string | - | This is where clinic staff can write warning messages regarding the Product , such as "For external use only". |
type | enum, string | Standard |
Specifies the Product type, and where it can be used: Standard , Medication , Vaccination , Diagnostic , Integrated Diagnostic , Procedure |
tracking_level | enum, string | No | The tracking level of the product in ezyVet, can be: No (indicating no tracking), Product or Batch |
is_sold | bool | - | If true, the Product can be sold. |
is_purchased | bool | - | If true, the Product can be bought. |
is_container | bool | - | If true, the Product acts as a container for other Product (s). |
is_derived_price | bool | - | If true, the price is derived from all the Product (s) contained. |
has_direct_cost | bool, string | - | If true, the Product has the "has direct cost" checkmark set and can use markup |
lowest_dispensable_quantity | num | - | The lowest dispensable quantity for the medication |
lowest_dispensable_unit | string | - | The lowest dispensable unit for the medication |
concentration | num | - | The concentration of the medication |
concentration_unit | string | - | The unit of measurement the concentration is measured in |
concentration_volume | string | - | The unit of measurement the volume of the concentration is measured in |
concentration_diluted | num | - | The dilution of the medication |
concentration_diluted_unit | string | - | The unit of measurement the diluted concentration is measured in |
concentration_diluted_volume | string | - | The unit of measurement the volume of the diluted concentration is measured in |
default_dosage_calculation_method | string | - | The default dosage calculation method for the product |
is_constant_rate_infusion | bool | - | Is the medication a Constant Rate Infusion |
default_infusion_rate_per | string | - | The unit of measurement for the infusion rate |
default_route_of_administration | string | - | The default method of administering the medication |
sheet_group | num | - | The id of the sheet group this product belongs to in ezyVet |
sheet_group_name | string | - | The name of the sheet group this product belongs to in ezyVet |
ProductGroup
Represents a product group.
Every product belongs to a product group.
Fetch a ProductGroup list
Fetches a list containing ProductGroup
(s). (up to 10)
Sample Request: Get a list of
ProductGroup
s setup by the clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/productgroup",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"productgroup": {
"id": "12",
"active": "1",
"created_at": "1480035980",
"modified_at": "1480035980",
"name": "Administration",
"description": "This is a description"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/productgroup
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ProductGroup . |
active | num, string | - | If true, the ProductGroup is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ProductGroup was created. |
modified_at | num, string | - | The epoch time when the ProductGroup was last modified. |
name | string | - | The name of the ProductGroup . |
description | string | - | The description of the ProductGroup . |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Product Pricing
Represents a Product Pricing
within ezyVet.
Fetch Product Pricings
Fetches a list containing Product Pricing
s.
HTTP Request
GET https://api.ezyvet.com/v2/productpricing
Sample Request: Get a
Product Pricing
with ID = 25.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/productpricing/25",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "12e07ea8b5c708b53def56bb1a62edaf33c541783986c0b13b9713755e1cd249",
"timestamp": 1554346630
},
"items": [
{
"productpricing": {
"id": 840,
"created_at": 1379551784,
"modified_at": 1434945090,
"active": true,
"cost_price": 114,
"based_on": "Price",
"markup": 80,
"sell_price": 205.2,
"sell_price_tax": 20.52,
"tax_rate": {
"id": 2,
"created_at": 1287442589,
"modified_at": 1559179338,
"active": true,
"code": "S",
"rate": 10
},
"dispense_fee": 0,
"product_id": 145,
"ownership_id": 2
}
}
],
"messages": []
}
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Product Pricing . |
created_at | num | - | The epoch time when the Product Pricing was created. |
modified_at | num | - | The epoch time when the Product Pricing was last modified. |
active | bool | - | If true, the Product Pricing is active and usable in ezyVet. |
product_id | num | - | The ID of the Product this Product Pricing relates to. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Product Pricing . |
created_at | num | - | The epoch time when the Product Pricing was created. |
modified_at | num | - | The epoch time when the Product Pricing was last modified. |
active | bool | true | If true, the Product Pricing is active and usable in ezyVet. |
cost_price | num | - | The cost price of the product. |
based_on | enum | - | The value the sell price is based on, either "Markup" or "Price". |
markup | num | - | The percentage markup on the product. |
sell_price | num | - | The sell price of the product, excluding tax. |
sell_price_tax | num | - | The tax amount of the sell price. |
tax_rate | TaxRate |
- | The TaxRate applied to this product. |
dispense_fee | num | - | The dispense fee applied when billing this product, including tax. |
product_id | num | - | The ID of the Product this Product Pricing relates to. |
ownership_id | num | - | The ID of the Ownership Separation to which this Product Pricing belongs. |
Create a Product Pricing
Creates a new Product Pricing
for the provided Product
and Ownership Separation
.
HTTP Request
Sample Request: Create a new
Product Pricing
for product 132 and ownership 465.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/productpricing/",
"method": "POST",
"headers": {
"authorization": "Bearer token12345"
},
"data": {
"product_id": 132,
"ownership_id": 465,
"based_on": "Price",
"tax_rate": 5,
"cost_price": 114,
"sell_price": 300,
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "187659eeb382355973124162497997b6c634f0e84a96c3b04ccbc1bb49b5e040",
"timestamp": 1562992416
},
"items": [
{
"productpricing": {
"id": 13438,
"created_at": 1562992415,
"modified_at": 1562992415,
"active": true,
"cost_price": 114,
"based_on": "Price",
"markup": 163.16,
"sell_price": 300,
"sell_price_tax": 30,
"tax_rate": {
"id": 2,
"created_at": 1287442589,
"modified_at": 1559179338,
"active": true,
"code": "S",
"rate": 10
},
"dispense_fee": 1,
"product_id": 132,
"ownership_id": 465
}
}
],
"messages": []
}
POST https://api.ezyvet.com/v2/productpricing
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
active | bool | true | If true, the Product Pricing is active and usable in ezyVet. |
cost_price* | num | - | The cost price of the product. |
based_on* | enum | - | The value the sell price is based on, either "Markup" or "Price". |
markup* | num | - | The percentage markup on the product. |
sell_price* | num | - | The sell price of the product, excluding tax. |
tax_rate* | num | - | The ID of the tax rate to be applied to this product. |
product_id* | num | - | The ID of the Product this Product Pricing relates to. |
ownership_id* | num | - | The ID of the Ownership Separation to which this Product Pricing belongs. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Product Pricing . |
created_at | num | - | The epoch time when the Product Pricing was created. |
modified_at | num | - | The epoch time when the Product Pricing was last modified. |
active | bool | true | If true, the Product Pricing is active and usable in ezyVet. |
cost_price | num | - | The cost price of the product. |
based_on | enum | - | The value the sell price is based on, either "Markup" or "Price". |
markup | num | - | The percentage markup on the product. |
sell_price | num | - | The sell price of the product, excluding tax. |
sell_price_tax | num | - | The tax amount of the sell price. |
tax_rate | TaxRate |
- | The TaxRate applied to this product. |
dispense_fee | num | - | The dispense fee applied when billing this product, including tax. |
product_id | num | - | The ID of the Product this Product Pricing relates to. |
ownership_id | num | - | The ID of the Ownership Separation to which this Product Pricing belongs. |
Update a Product Pricing
Updates a Product Pricing
.
HTTP Request
PATCH https://api.ezyvet.com/v2/productpricing
Sample Request: Edit
Product Pricing
(13438) and set the sell price to 285
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/productpricing/13438",
"method": "POST",
"headers": {
"authorization": "Bearer token12345"
},
"data": {
"sell_price": 285,
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "c3d35dc6a110cfacb61f992345e434e727d4e674064f98a910a5d0e48a6cffc8",
"timestamp": 1563491662
},
"items": [
{
"productpricing": {
"id": 13442,
"created_at": 1563491582,
"modified_at": 1563491662,
"active": true,
"cost_price": 114,
"based_on": "Price",
"markup": 150,
"sell_price": 285,
"sell_price_tax": 28.5,
"tax_rate": {
"id": 2,
"created_at": 1287442589,
"modified_at": 1559179338,
"active": true,
"code": "S",
"rate": 10
},
"dispense_fee": 1,
"product_id": 132,
"ownership_id": 465
}
}
],
"messages": []
}
PATCH Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
active | bool | - | If true, the Product Pricing is active and usable in ezyVet. |
cost_price | num | - | The cost price of the product. |
based_on | enum | - | The value the sell price is based on, either "Markup" or "Price". |
markup | num | - | The percentage markup on the product. |
sell_price | num | - | The sell price of the product, excluding tax. |
tax_rate | num | - | The ID of the tax rate to be applied to this product. |
product_id | num | - | The ID of the Product this Product Pricing relates to. |
ownership_id | num | - | The ID of the Ownership Separation to which this Product Pricing belongs. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Product Pricing . |
created_at | num | - | The epoch time when the Product Pricing was created. |
modified_at | num | - | The epoch time when the Product Pricing was last modified. |
active | bool | - | If true, the Product Pricing is active and usable in ezyVet. |
cost_price | num | - | The cost price of the product. |
based_on | enum | - | The value the sell price is based on, either "Markup" or "Price". |
markup | num | - | The percentage markup on the product. |
sell_price | num | - | The sell price of the product, excluding tax. |
sell_price_tax | num | - | The tax amount of the sell price. |
tax_rate | TaxRate |
- | The TaxRate applied to this product. |
dispense_fee | num | - | The dispense fee applied when billing this product, including tax. |
product_id | num | - | The ID of the Product this Product Pricing relates to. |
ownership_id | num | - | The ID of the Ownership Separation to which this Product Pricing belongs. |
Delete a Product Pricing
Deletes a Product Pricing
.
Sample Request: Delete a
Product Pricing
with an ID of 13442
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/productpricing/13438",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "97e088379679cadd57f54901212943838aec790aaea8420ddead51bfdebb066d",
"timestamp": 1563492977
},
"items": [
{
"productpricing": {
"id": 13442,
"created_at": 1563491582,
"modified_at": 1563492975,
"active": false,
"cost_price": 114,
"based_on": "Price",
"markup": 150,
"sell_price": 285,
"sell_price_tax": 28.5,
"tax_rate": {
"id": 2,
"created_at": 1287442589,
"modified_at": 1559179338,
"active": true,
"code": "S",
"rate": 10
},
"dispense_fee": 1,
"product_id": 132,
"ownership_id": 465
}
}
],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v2/productpricing
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Product Pricing . |
created_at | num | - | The epoch time when the Product Pricing was created. |
modified_at | num | - | The epoch time when the Product Pricing was last modified. |
active | bool | - | If true, the Product Pricing is active and usable in ezyVet. |
cost_price | num | - | The cost price of the product. |
based_on | enum | - | The value the sell price is based on, either "Markup" or "Price". |
markup | num | - | The percentage markup on the product. |
sell_price | num | - | The sell price of the product, excluding tax. |
sell_price_tax | num | - | The tax amount of the sell price. |
tax_rate | TaxRate |
- | The TaxRate applied to this product. |
dispense_fee | num | - | The dispense fee applied when billing this product, including tax. |
product_id | num | - | The ID of the Product this Product Pricing relates to. |
ownership_id | num | - | The ID of the Ownership Separation to which this Product Pricing belongs. |
Product Minimum Stock
Represents ProductMinimumStock
data such as re-order quantity, minimum stock level, the associated product_id and so on.
There is one product minimum stock record for each associated product.
Fetches Product Minimum Stock
Fetches a list containing ProductMinimumStock
(s).
Sample Request: Get a list of
ProductMinimumStock
(s) for the product with ID = 130.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/productminimumstock?product_id=130",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "4a8435399f95a95f65078a79a64c07a942a94091d49604199b2b09b7d70cef99",
"timestamp": 1556060795
},
"items": [
{
"productminimumstock": {
"id": 7,
"created_at": null,
"modified_at": 1478655965,
"active": true,
"product_id": 130,
"minimumstock": 456,
"re_order_to_max_level": false,
"re_order_qty": "50.0000",
"start_day": 1,
"start_month": 1,
"end_day": 31,
"end_month": 12,
"ownership_id": 1
}
}
],
"messages": []
}
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
product_id | num | - | The ID of the Product this ProductMinimumStock this relates to. |
HTTP Request
GET https://api.ezyvet.com/v2/productminimumstock
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a ProductMinimumStock . |
created_at | num | - | The epoch time when the ProductMinimumStock was created. |
modified_at | num | - | The epoch time when the ProductMinimumStock was last modified. |
active | bool | true | If true, the ProductMinimumStock is active and usable in ezyVet. |
product_id | num | - | The ID of the Product this ProductMinimumStock relates to. |
minimumstock | num | - | The minimum stock level in units for which a product can have. |
re_order_to_max_level | num | - | If true, the stock will be re-ordered to the maximum level set. |
re_order_qty | num | - | The re-order amount which is calculated from inner units to outer units for a product supplier. |
start_day | num | - | The start day of when stock can be re-ordered. |
start_month | num | - | The start month of when stock can be re-ordered. |
end_day | num | - | The end day of when stock can be re-ordered. |
end_month | num | - | The end month of when stock can be re-ordered. |
ownership_id | num | - | The ID of the Ownership Separation to which this ProductMinimumStock belongs. |
Product Supplier
Fetch Product Suppliers
This will fetch a list of product suppliers based on the query parameters supplied.
Sample request: Get product suppliers for supplier contact with ID = 391
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/productsupplier?supplier_contact_id=391",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 9,
"items_total": 9,
"transaction_id": "c22a53ba6f2c20635f7135248a2627256dbbd5fded44135ee58a577b0f33cc11",
"timestamp": 1555973573
},
"items": [
{
"productsupplier": {
"id": 731,
"created_at": "1503122314",
"modified_at": 1540846566,
"active": true,
"product_id": 1948,
"supplier_code": "_daniel mason",
"expected_price": "8.44",
"units_per_outer": "1.00",
"supplier_contact_id": 391,
"tax_rate_id": 7,
"list_price": null,
"is_default": 1,
"unit_of_measure": null,
"last_update": null,
"contract_price": 0,
"ownership_id": 1,
"ownership_uid": "ownershipSeparation_pFUdSeTCJ0ee7NZXo4gWb"
}
},
{
"productsupplier": {
"id": 745,
"created_at": "1516205707",
"modified_at": 1541518995,
"active": true,
"product_id": 977,
"supplier_code": "DIA050",
"expected_price": "17.60",
"units_per_outer": "1.00",
"supplier_contact_id": 391,
"tax_rate_id": 7,
"list_price": null,
"is_default": 1,
"unit_of_measure": null,
"last_update": null,
"contract_price": 0,
"ownership_id": 1,
"ownership_uid": "ownershipSeparation_pFUdSeTCJ0ee7NZXo4gWb"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/productsupplier
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
product_id | num | - | The ID of the product to filter by. |
supplier_contact_id | num | - | The ID of the supplier contact to filter by. |
ownership_id | num | - | The ID of the Ownership Separation to filter by. |
ownership_uid | string | - | The UID of the Ownership Separation to filter by. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The unique identifier for this product supplier. |
created_at | num | - | The epoch time when the product supplier record was created. |
modified_at | num | - | The epoch time when the product supplier record was last updated. |
active | bool | true | If true, the product supplier is active and usable. |
product_id | num | - | ID that indicates which product this product supplier record is for. |
supplier_code | string | - | Alphanumerical string representing the supplier. |
expected_price | float | - | Expected supplier price for the product. |
units_per_outer | num | - | The amount of units that are supplied at a time. |
supplier_contact_id | num | - | ID that indicates which supplier this product supplier record is for. |
tax_rate_id | num | - | ID that indicates which tax rate this product supplier record is linked to. |
list_price | float | - | The listed price. |
is_default | bool | - | Field indicating whether this is a default product supplier. |
unit_of_measure | string | - | The unit of measure used to measure the products for this product supplier record |
last_updated | num | - | The epoch time when the stock linked to this record was last updated |
contract_price | float | - | The contract price |
ownership_id | int | - | The ID of the Ownership Separation to which this product supplier belongs to. |
ownership_uid | string | - | The UID of the Ownership Separation to which this product supplier belongs to. |
PurchaseOrder
Represents a purchase order
for a list of products
from a given supplier
.
Each purchase order can contain multiple purchase order items
.
Fetch a PurchaseOrder list
Fetches a list containing PurchaseOrder
(s). (up to 10)
Sample Request: Get a list of
PurchaseOrder
(s) for the client "Chris" (ID:2).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/purchaseorder?client_id=2",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"purchaseorder": {
"id": "12",
"active": "1",
"created_at": "1514493886",
"modified_at": "1514493886",
"date": "1514466000",
"shipping_address_id": "",
"comments": "",
"freight": "0",
"freight_tax": "0",
"tax": "0.4",
"total": "4.4",
"client_id": "2",
"supplier_id": "10006",
"status": "Created",
"supplier_order_number": "",
"supplier_account_number": "",
"ownership_id": "1",
"purchase_order_item_list":[
"12"
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/purchaseorder
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a PurchaseOrder . |
active | num, string | - | If true, the PurchaseOrder is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PurchaseOrder was created. |
modified_at | num, string | - | The epoch time when the PurchaseOrder was last modified. |
date | num, string | - | The epoch time of the PurchaseOrder transaction date. |
shipping_address_id | num, string | - | The ID of the shipping Address for the order. This is where the products ordered will be delivered. |
comments | string | - | Any comments left by the User placing the order. |
freight | num, string | - | The total monetary cost of the freight (inc tax). |
freight_tax | num, string | - | The total tax content in the freight amount. |
tax | num, string | - | The total tax content of the PurchaseOrder . |
total | num, string | - | The total monetary amount of the PurchaseOrder . This value can be negative, indicating its a return of items. This value is tax inclusive. |
client_id | num, string | - | The ID of the client linked to the PurchaseOrder . This may be null as it is an optional value in ezyVet. |
supplier_id | num, string | - | The ID of the supplier to whom the order is sent. |
status | string | - | The status of the PurchaseOrder . Can only be one of the following: Created , Approved , Sent , Confirmed , Partial , Received , Completed or Cancelled . |
supplier_order_number | num, string | - | A number assigned by the supplier once an order is placed. |
supplier_account_number | num, string | - | A string assigned on the supplier to identify the account the order is made from. |
ownership_id | num, string | - | The ID of the Ownership Separation to which this PurchaseOrder belongs. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
purchase_order_item_list | PurchaseOrderItem[] |
- | Contains a list of PurchaseOrderItem IDs. |
PurchaseOrderItem
Represents a purchase order item
. These are always linked to a
PurchaseOrder
.
Fetch a PurchaseOrderItem list
Fetches a list containing PurchaseOrderItem
(s). (up to 10)
Sample Request: Get a list of
PurchaseOrderItem
(s) with a supplier code of "TP1".
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/purchaseorderitem?supplier_code=TP1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"purchaseorderitem": {
"id": "9",
"active": "1",
"created_at": "1514493886",
"modified_at": "1514493886",
"purchase_order_id": "100001",
"product_id": "50002",
"supplier_code": "TP1",
"outers": "1",
"units_per_outer": "1",
"price_per_unit": "4",
"tax_per_unit": "0.4",
"quantity": "1",
"total": "4",
"total_tax": "0.4",
"ownership_id": "3",
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/purchaseorderitem
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a PurchaseOrderItem . |
active | num, string | - | If true, the PurchaseOrderItem is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the PurchaseOrderItem was created. |
modified_at | num, string | - | The epoch time when the PurchaseOrderItem was last modified. |
purchase_order_id | num, string | - | The ID of the PurchaseOrder to which this PurchaseOrderItem is linked. |
product_id | num, string | - | The ID of the product on the PurchaseOrderItem . |
supplier_code | string | - | The code of the product in the supplier's records. (i.e. the code given to the product by the supplier) |
outers | num, string | - | The number of outers being ordered for the given product . |
units_per_outer | num, string | - | The number of units of the product included in one outer. |
price_per_unit | num, string | - | The price of one unit in an outer. |
tax_per_unit | num, string | - | The tax content per unit. |
quantity | num, string | - | The number of units being ordered for the given product . |
total | num, string | - | The total monetary amount of the PurchaseOrderItem excluding tax. This is calculated by multiplying the price of the product (excluding tax) by the units_per_outer and the quantity being ordered. |
total_tax | num, string | - | The total tax content of the PurchaseOrderItem . |
ownership_id | num, string | - | The ID of the Ownership Separation to which this PurchaseOrderItem belongs. |
ReceiveInvoice
A Receive Invoice
is created when stock is received from a supplier
.
It records the amount of the invoice and the items (i.e. products
) that were invoiced.
A Receive Invoice
will have one or more Receive Invoice Items
.
Fetch a list of Receive Invoices
Fetches a list containing ReceiveInvoice
(s). (up to 10)
Sample Request: Get a list of
ReceiveInvoice
(s) for the supplier "AVP Medications" (ID:2).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/receiveinvoice?supplier_id=2",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"receiveinvoice": {
"id": "12",
"active": "1",
"created_at": "1514493886",
"modified_at": "1514493886",
"invoice_number": "ab12ssxR4s",
"date": "1514466000",
"due_date": "1514476000",
"supplier_id": "2",
"freight": "0",
"freight_tax": "0",
"comments": "[COMMENT: This is a comment.]",
"tax": "0.4",
"total": "4.4",
"purchase_order_list": [
"1"
],
"receive_invoice_item_list": [
"1"
],
"ownership_id": "2"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/receiveinvoice
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ReceiveInvoice . |
active | num, string | - | If true, the ReceiveInvoice is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ReceiveInvoice was created. |
modified_at | num, string | - | The epoch time when the ReceiveInvoice was last modified. |
invoice_number | string | - | The value given by a Supplier to track the invoice on their end. |
date | num, string | - | The epoch time of the ReceiveInvoice transaction date. |
due_date | num, string | - | The due date of the ReceiveInvoice in epoch time. |
supplier_id | num, string | - | The ID of the supplier who sent the ReceiveInvoice . |
freight | num, string | - | The total monetary cost of the freight (inc tax). |
freight_tax | num, string | - | The total tax content in the freight amount. |
comments | string | - | Any comments. |
tax | num, string | - | The total tax content of the ReceiveInvoice . |
total | num, string | - | The total monetary amount of the ReceiveInvoice . This value is tax inclusive. |
ownership_id | num, string | - | The ID of the Ownership Separation to which this ReceiveInvoice belongs. |
Response Fields
Includes most query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
purchase_order_list | PurchaseOrder[] |
- | Contains a list of PurchaseOrder IDs linked to the ReceiveInvoice . |
receive_invoice_item_list | ReceiveInvoiceItem[] |
- | Contains a list of ReceiveInvoiceItem IDs that are linked to the ReceiveInvoice . |
Create a Receive Invoice
Creates a ReceiveInvoice
. A ReceiveInvoice
may contain ReceiveInvoiceItems
within the POST
data, which will result in new ReceiveInvoiceItems
also being created through this endpoint.
The other alternative is to POST
data using the ReceiveInvoiceItem
endpoint.
Sample Request: Create a
ReceiveInvoice
with the invoice number "2AC_B22".
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/receiveinvoice",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/x-www-form-urlencoded",
},
"data": {
"invoice_number": "2AC_B22",
"date": 1479954983,
"due_date": 1479956000,
"freight": 12.2,
"freight_tax": 1.22,
"comments": "Order invoice 2AC_B22.",
"ownership_id": 1,
"receive_invoice_item_list": [
{
"quantity": 2.2,
"price": 2.35,
"tax": 0.235,
"supplier_code": "AMMOX 5",
"ownership_id": 3
}
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
},
"items": [
{
"receiveinvoice": {
"id": "55",
"active": "1",
"created_at": "1479954994",
"modified_at": "1479954994",
"invoice_number": "2AC_B22",
"date": "1479954983",
"due_date": "1479956000",
"supplier_id": "2",
"freight": "12.20",
"freight_tax": "1.22",
"comments": "Order invoice 2AC_B22.",
"tax": "1.455",
"total": "17.887",
"purchase_order_list": [],
"receive_invoice_item_list": [
"136"
],
"ownership_id": "1"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/receiveinvoice
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
confirm_invoice_number | num | - | If this contains the value 1, then the validation for duplicate invoice_number will be ignored, allowing the invoice_number used on a previous ReceiveInvoice to be used on a new ReceiveInvoice . |
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
invoice_number* | string | - | The value given by a Supplier to track the invoice on their end. |
date* | num, string | - | The epoch time of the ReceiveInvoice transaction date. |
due_date* | num, string | - | The due date of the ReceiveInvoice in epoch time. |
freight | num, string | - | The total monetary cost of the freight (inc tax). |
freight_tax | num, string | - | The total tax content in the freight amount. |
comments | string | - | Any comments. |
ownership_id | num, string | Separation Database ID |
The ID of the Ownership Separation to which this ReceiveInvoice belongs. This value defaults to the separation ID of the Database if not given. |
receive_invoice_item_list | ReceiveInvoiceItem[] |
[] | Contains a list of ReceiveInvoiceItem objects. Please refer to the POST fields for ReceiveInvoiceItem to understand the values required in each object. |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ReceiveInvoice . |
created_at | num, string | - | The epoch time when the ReceiveInvoice was created. |
modified_at | num, string | - | The epoch time when the ReceiveInvoice was last modified. |
active | num, string | true | If true, the ReceiveInvoice is active and usable in ezyVet. |
supplier_id | num, string | - | The ID of the supplier who sent the ReceiveInvoice . |
tax | num, string | - | The total tax content of the ReceiveInvoice . |
total | num, string | - | The total monetary amount of the ReceiveInvoice . This value is tax inclusive. |
purchase_order_list | PurchaseOrder[] |
- | Contains a list of PurchaseOrder IDs linked to the ReceiveInvoice . |
Update a Receive Invoice
Updates a ReceiveInvoice
. You may PATCH
the associated ReceiveInvoiceItems
through the ReceiveInvoiceItem
endpoint or this endpoint.
If PATCH
ing through this endpoint, you may either provide a list of objects, ensuring the objects contain
the id
field OR provide a list of ReceiveInvoiceItem
id
s. E.g. [{"id": 2, "price": 2.3}]
OR [1, 2]
.
Sample Request: Update the quantity on the
ReceiveInvoiceItem
with ID of10
for theReceiveInvoice
with an ID of2
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/receiveinvoice/2",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data": {
"receive_invoice_item_list": [
{
"id": 10,
"quantity": 4
}
]
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [
{
"receiveinvoice": {
"id": "2",
"active": "1",
"created_at": "1479954994",
"modified_at": "1479977994",
"invoice_number": "2AC_B22",
"date": "1479954983",
"due_date": "1479956000",
"supplier_id": "2",
"freight": "12.20",
"freight_tax": "1.22",
"comments": "Order invoice 2AC_B22.",
"tax": "1.455",
"total": "17.887",
"purchase_order_list": [],
"receive_invoice_item_list": [
"10"
],
"ownership_id": "1"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/receiveinvoice
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
confirm_invoice_number | num | - | If this contains the value 1, then the validation for duplicate invoice_number will be ignored, allowing the invoice_number used on a previous ReceiveInvoice to be used on the current ReceiveInvoice . |
PATCH Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
id* | num, string | - | The ID number used by the system to uniquely identify a ReceiveInvoice . |
invoice_number | string | - | The value given by a Supplier to track the invoice on their end. |
date | num, string | - | The epoch time of the ReceiveInvoice transaction date. |
due_date | num, string | - | The due date of the ReceiveInvoice in epoch time. |
freight | num, string | - | The total monetary cost of the freight (inc tax). |
freight_tax | num, string | - | The total tax content in the freight amount. |
comments | string | - | Any comments. |
ownership_id | num, string | Separation Database ID |
The ID of the Ownership Separation to which this ReceiveInvoice belongs. |
receive_invoice_item_list | ReceiveInvoiceItem[] |
[] | Contains a list of ReceiveInvoiceItem objects. Please refer to the PATCH fields for ReceiveInvoiceItem to understand the values that are able to be patched in each object. |
Response Fields
Includes all PATCH parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
created_at | num, string | - | The epoch time when the ReceiveInvoice was created. |
modified_at | num, string | - | The epoch time when the ReceiveInvoice was last modified. |
active | num, string | - | If true, the ReceiveInvoice is active and usable in ezyVet. |
supplier_id | num, string | - | The ID of the supplier who sent the ReceiveInvoice . |
tax | num, string | - | The total tax content of the ReceiveInvoice . |
total | num, string | - | The total monetary amount of the ReceiveInvoice . This value is tax inclusive. |
purchase_order_list | PurchaseOrder[] |
- | Contains a list of PurchaseOrder IDs linked to the ReceiveInvoice . |
Delete a Receive Invoice
Delete a ReceiveInvoice
.
Sample Request: Delete the
ReceiveInvoice
with ID of10
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/receiveinvoice/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/receiveinvoice
Response Fields
There are no response fields for a DELETE
operation.
ReceiveInvoice V2
A ReceiveInvoice
is created when stock is received from a Supplier
.
It records the amount of the invoice and the items (i.e. Product
s) that were invoiced.
A ReceiveInvoice
will have one or more ReceiveInvoiceItem
s.
Fetch a list of Receive Invoices (V2)
Fetches a list containing ReceiveInvoice
s (up to 10), and their associated ReceiveInvoiceItem
s.
Sample Request: Get a list of
ReceiveInvoice
s for the supplier "ezySupplier" (ID:3).
let settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/receiveinvoice?supplier_id=3",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1559075449,
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1
},
"items": [
{
"receiveinvoice": {
"id":1,
"created_at": 1503114848,
"modified_at": 1503114848,
"active": false,
"invoice_number": "abcd1234",
"date": 1514466000,
"due_date": 1514466000,
"supplier_id": 3,
"freight": 0,
"freight_tax": 0,
"rounding": 0,
"comments": "[COMMENT: This is a comment.]",
"tax": 0.4,
"total": 4.4,
"ownership_id": 2,
"line_item":[
{
"id": 1,
"created_at": 1503114848,
"modified_at": 1503114883,
"active": false,
"quantity": 1,
"price": 5,
"tax": 0.75,
"total": 5,
"total_tax": 0.75,
"tax_rate": 15,
"tax_code": "S",
"product_id": 1,
"product_supplier_id": 31,
"supplier_code": "supplier123",
"ownership_id": 3,
"batch": [],
"purchase_order_item_id": 10
}
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/receiveinvoice
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a ReceiveInvoice . |
active | boolean | true | If true, the ReceiveInvoice is active and usable in ezyVet. |
created_at | num | - | The epoch time when the ReceiveInvoice was created. |
modified_at | num | - | The epoch time when the ReceiveInvoice was last modified. |
invoice_number | string | - | The value given by a Supplier to track the invoice on their end. |
date | num | - | The epoch time of the ReceiveInvoice transaction date. |
due_date | num | - | The due date of the ReceiveInvoice in epoch time. |
supplier_id | num | - | The ID of the Supplier who sent the ReceiveInvoice . |
ownership_id | num | - | The ID of the OwnershipSeparation to which this ReceiveInvoice belongs. |
Response Fields
Includes all query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
freight | num | 0 | The total monetary cost of the freight (inc tax). |
freight_tax | num | 0 | The total tax content in the freight amount. |
rounding | num | 0 | The amount of rounding applied to the ReceiveInvoice . |
comments | string | "" | Any comments. |
tax | num | 0 | The total tax content of the ReceiveInvoice . |
total | num | 0 | The total monetary amount of the ReceiveInvoice . This value is tax inclusive. |
line_item | ReceiveInvoiceItem[] |
[] | The ReceiveInvoiceItem s associated with this ReceiveInvoice . |
Create a Receive Invoice (V2)
Creates a ReceiveInvoice
. A ReceiveInvoice
may contain ReceiveInvoiceItem
s
within the POST
data, which will result in new ReceiveInvoiceItem
s also being created through this endpoint.
The other alternative is to POST
data directly, using the ReceiveInvoiceItem
endpoint.
Sample Request: Create a
ReceiveInvoice
with the invoice number "INV_001".
let settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/receiveinvoice",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/x-www-form-urlencoded"
},
"data": {
"invoice_number": "INV_001",
"date": 1558559681,
"due_date": 1558559681,
"comments": "Order invoice INV_001.",
"freight": 4.00,
"freight_tax": 10.00,
"ownership_id": 2,
"line_item": [
{
"quantity": 2,
"price": 100.00,
"tax": 10,
"tax_rate": 10,
"tax_code": "S",
"supplier_code": "supplier123",
"location_id": 3,
}
]
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta":{
"timestamp": "1559079135"
},
"items":[
{
"receiveinvoice":{
"id": 321,
"created_at": 1559271860,
"modified_at": 1559271860,
"active": true,
"invoice_number": "INV_001",
"date": 1558559681,
"due_date": 1558559681,
"supplier_id": 2,
"freight": 10,
"freight_tax": 4,
"rounding": 0,
"comments": "Order invoice INV_001.",
"tax": 24,
"total": 234,
"ownership_id": 2,
"line_item": [
{
"id": 111,
"created_at": 1559271860,
"modified_at": 1559271860,
"active": true,
"quantity": 8,
"price": 25,
"tax": 2.5,
"total": 200,
"total_tax": 20,
"tax_rate": 10,
"tax_code": "S",
"product_id": 1234,
"product_supplier_id": 24,
"supplier_code": "supplier123",
"location_id": 2,
"batch": [],
"purchase_order_item_id": null
}
]
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v2/receiveinvoice
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
invoice_number* | string | - | The value given by a Supplier to track the invoice on their end. |
date* | num | - | The epoch time of the ReceiveInvoice transaction date. |
due_date* | num | - | The due date of the ReceiveInvoice in epoch time. |
freight | num | 0 | The total monetary cost of the freight (inc tax). |
freight_tax | num | 0 | The total tax content in the freight amount. |
comments | string | "" | Any comments. |
ownership_id | num | - | The ID of the OwnershipSeparation to which this ReceiveInvoice belongs. This value defaults to the separation ID of the IntegrationSetting for the SPSI if not provided. |
line_item | ReceiveInvoiceItem[] |
[] | Contains a list of ReceiveInvoiceItem objects. Please refer to the POST fields for ReceiveInvoiceItem to understand the values required in each object. |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ReceiveInvoice . |
created_at | num | - | The epoch time when the ReceiveInvoice was created. |
modified_at | num | - | The epoch time when the ReceiveInvoice was last modified. |
active | boolean | true | If true, the ReceiveInvoice is active and usable in ezyVet. |
supplier_id | num | - | The ID of the Supplier who sent the ReceiveInvoice |
tax | num | 0 | The total tax content of the ReceiveInvoice . |
total | num | 0 | The total monetary amount of the ReceiveInvoice . This value is tax inclusive. |
ReceiveInvoiceItem
Represents a Receive Invoice Item
. These are always linked to a ReceiveInvoice
.
Fetch a list of Receive Invoice Items
Fetches a list containing ReceiveInvoiceItem
(s). (up to 10)
Sample Request: Get a list of
ReceiveInvoiceItem
(s) with a product ID of "23".
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/receiveinvoiceitem?product_id=23",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"receiveinvoiceitem": {
"id": "1",
"active": "1",
"created_at": "1309408167",
"modified_at": "1309408167",
"receive_invoice_id": "1",
"quantity": "1",
"price": "5",
"tax": "0.75",
"total": "5",
"total_tax": "0.75",
"product_id": "23",
"supplier_code": "ty7ujr5",
"ownership_id": "1",
"comments": "This is a comment.",
"purchase_order_item_id": ""
}
}
]
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/receiveinvoiceitem
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ReceiveInvoiceItem . |
active | num, string | - | If true, the ReceiveInvoiceItem is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the ReceiveInvoiceItem was created. |
modified_at | num, string | - | The epoch time when the ReceiveInvoiceItem was last modified. |
receive_invoice_id | num, string | - | The ID of the ReceiveInvoice the ReceiveInvoiceItem is linked to. |
quantity | num, string | - | The quantity of product invoiced. Depending on the configuration set by the Supplier , this value may represent the quantity of Outers or the quantity of Units . |
price | num, string | - | The price of one selling unit. Depending on the configuration set by the Supplier , this value may represent the price of one Outer or the price of one Unit . |
tax | num, string | - | The tax content per selling unit. Depending on the configuration set by the Supplier , this value may represent the tax amount from one Outer or one Unit . |
total | num, string | - | The total monetary amount of the ReceiveInvoiceItem excluding tax. |
total_tax | num, string | - | The total tax content of the ReceiveInvoiceItem . |
product_id | num, string | - | The ID of the product on the ReceiveInvoiceItem . |
supplier_code | string | - | The code of the product in the supplier's records. (i.e. the code given to the product by the supplier) |
ownership_id | num, string | - | The ID of the Ownership Separation to which this ReceiveInvoiceItem belongs. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
purchase_order_item_id | num, string | - | The ID of the PurchaseOrderItem linked to this ReceiveInvoiceItem . |
comments | string | - | Any comments related to the ReceiveInvoiceItem . |
Create a Receive Invoice Item
Creates a ReceiveInvoiceItem
. All ReceiveInvoiceItems
must be linked to
a ReceiveInvoice
.
Sample Request: Create a
ReceiveInvoiceItem
for theReceiveInvoice
with ID of 7 for the PurchaseOrderItem with ID of 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/receiveinvoiceitem",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/x-www-form-urlencoded",
},
"data": {
"receive_invoice_id": 7,
"quantity": 2.2,
"price": 2.35,
"tax": 0.235,
"supplier_code": "AMMOX 5",
"ownership_id": 3,
"purchase_order_item_id": 10
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983"
},
"items": [
{
"receiveinvoiceitem": {
"id": "50",
"active": "1",
"created_at": "1309408167",
"modified_at": "1309408167",
"receive_invoice_id": "7",
"quantity": "2.2",
"price": "2.35",
"tax": "0.235",
"total": "5.17",
"total_tax": "0.517",
"product_id": "719",
"supplier_code": "AMMOX 5",
"ownership_id": "3",
"comments": "",
"purchase_order_item_id": "10"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/receiveinvoiceitem
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
active | num, string | true | If true, the ReceiveInvoiceItem is active and usable in ezyVet. |
receive_invoice_id* | num, string | - | The ID of the ReceiveInvoice the ReceiveInvoiceItem is to be linked to. |
quantity* | num, string | - | The quantity of product invoiced. Depending on the configuration set by the Supplier , this value may represent the quantity of Outers or the quantity of Units . |
price* | num, string | - | The price of one selling unit. Depending on the configuration set by the Supplier , this value may represent the price of one Outer or the price of one Unit . |
tax* | num, string | - | The tax content per selling unit. Depending on the configuration set by the Supplier , this value may represent the tax amount from one Outer or one Unit . |
supplier_code* | string | - | The code of the product in the supplier's records. (i.e. the code given to the product by the supplier) |
ownership_id | num, string | - | The ID of the Ownership Separation to which this ReceiveInvoiceItem belongs. |
comments | string | - | Any comments related to the ReceiveInvoiceItem . |
purchase_order_item_id | num, string | - | The ID of the PurchaseOrderItem linked to this ReceiveInvoiceItem . |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a ReceiveInvoiceItem . |
created_at | num, string | - | The epoch time when the ReceiveInvoiceItem was created. |
modified_at | num, string | - | The epoch time when the ReceiveInvoiceItem was last modified. |
total | num, string | - | The total monetary amount of the ReceiveInvoiceItem excluding tax. |
total_tax | num, string | - | The total tax content of the ReceiveInvoiceItem . |
product_id | num, string | - | The ID of the product on the ReceiveInvoiceItem . |
Update a Receive Invoice Item
Updates a ReceiveInvoiceItem
.
Sample Request: Update the
ReceiveInvoiceItem
with ID of 10.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/receiveinvoiceitem/10",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/merge-patch+json",
},
"data": {
"quantity": 5.3,
"comments": "Updated the quantity"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_matched": 1,
"items_processed": 1
},
"items": [
{
"receiveinvoiceitem": {
"id": "10",
"active": "1",
"created_at": "1309408167",
"modified_at": "1309458167",
"receive_invoice_id": "7",
"quantity": "5.3",
"price": "4.35",
"tax": "0.435",
"total": "23.055",
"total_tax": "2.3055",
"product_id": "719",
"supplier_code": "AMMOX 5",
"ownership_id": "3",
"comments": "Updated the quantity",
"purchase_order_item_id": "2"
}
}
]
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/receiveinvoiceitem
PATCH Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
id* | num, string | - | The ID number used by the system to uniquely identify a ReceiveInvoiceItem . |
active | num, string | - | If true, the ReceiveInvoiceItem is active and usable in ezyVet. |
receive_invoice_id | num, string | - | The ID of the ReceiveInvoice the ReceiveInvoiceItem is linked to. |
quantity | num, string | - | The quantity of product invoiced. Depending on the configuration set by the Supplier , this value may represent the quantity of Outers or the quantity of Units . |
price | num, string | - | The price of one selling unit. Depending on the configuration set by the Supplier , this value may represent the price of one Outer or the price of one Unit . |
tax | num, string | - | The tax content per selling unit. Depending on the configuration set by the Supplier , this value may represent the tax amount from one Outer or one Unit . |
product_id | num, string | - | The ID of the product on the ReceiveInvoiceItem . |
comments | string | - | Any comments related to the ReceiveInvoiceItem . |
ownership_id | num, string | - | The ID of the Ownership Separation to which this ReceiveInvoiceItem belongs. |
Response Fields
Includes all PATCH parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
created_at | num, string | - | The epoch time when the ReceiveInvoiceItem was created. |
modified_at | num, string | - | The epoch time when the ReceiveInvoiceItem was last modified. |
total | num, string | - | The total monetary amount of the ReceiveInvoiceItem excluding tax. |
total_tax | num, string | - | The total tax content of the ReceiveInvoiceItem . |
supplier_code | string | - | The code of the product in the supplier's records. (i.e. the code given to the product by the supplier) |
purchase_order_item_id | num, string | - | The ID of the PurchaseOrderItem linked to this ReceiveInvoiceItem . |
Delete a Receive Invoice Item
Delete a ReceiveInvoiceItem
.
Sample Request: Delete the
ReceiveInvoiceItem
with ID of10
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/receiveinvoiceitem/10",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954999",
"items_matched": 1,
"items_processed": 1
},
"items": [],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/receiveinvoiceitem
Response Fields
There are no response fields for a DELETE
operation.
ReceiveInvoiceItem V2
Represents a ReceiveInvoiceItem
. These are always linked to a ReceiveInvoice
.
Fetch a list of Receive Invoice Items (V2)
Fetches a list containing ReceiveInvoiceItem
s. (up to 10)
Sample Request: Get a list of
ReceiveInvoiceItem
s with a product ID of "23".
let settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/receiveinvoiceitem?product_id=23",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1559164275,
"items_page": 1,
"items_page_total": 1,
"items_page_size": 10,
"items_total": 1
},
"items": [
{
"receiveinvoiceitem": {
"id": 1,
"created_at": 1309408167,
"modified_at": 1309408167,
"active": true,
"receive_invoice_id": 1,
"quantity": 1,
"price": 5,
"tax": 0.75,
"total": 5,
"total_tax": 0.75,
"tax_rate": 15,
"tax_code": "S",
"product_id": 23,
"product_supplier_id": 12,
"supplier_code": "supplier123",
"ownership_id": 3,
"batch": [],
"purchase_order_item_id": 8
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/receiveinvoiceitem
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a ReceiveInvoiceItem . |
created_at | num | - | The epoch time when the ReceiveInvoiceItem was created. |
modified_at | num | - | The epoch time when the ReceiveInvoiceItem was last modified. |
active | boolean | true | If true, the ReceiveInvoiceItem is active and usable in ezyVet. |
receive_invoice_id | string | - | The ID of the ReceiveInvoice the ReceiveInvoiceItem is linked to. |
quantity | num | - | The quantity of Product invoiced. Depending on the configuration set by the Supplier , this value may represent the quantity of Outers or the quantity of Units . |
price | num | - | The price of one selling unit. Depending on the configuration set by the Supplier , this value may represent the price of one Outer or the price of one Unit . |
tax | num | 0 | The tax content per selling unit. Depending on the configuration set by the Supplier , this value may represent the tax amount from one Outer or one Unit . |
total | num | 0 | The total monetary amount of the ReceiveInvoiceItem excluding tax. |
total_tax | num | 0 | The total tax content of the ReceiveInvoiceItem . |
tax_rate | num | - | The tax rate applied to the ReceiveInvoiceItem . |
tax_code | string | - | The tax code relating to the tax rate on the ReceiveInvoiceItem . |
product_id | num | - | The ID of the Product on the ReceiveInvoiceItem . |
product_supplier_id | num | - | The ID of the ProductSupplier on the ReceiveInvoiceItem . |
supplier_code | string | - | The code of the Product in the Supplier 's records. (i.e. the code given to the product by the supplier) |
location_id | num | - | The ID of the LocationSeparation to which this ReceiveInvoiceItem belongs. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
name | string | - | The name of the ReceiveInvoiceItem . |
purchase_order_item_id | num | - | The ID of the PurchaseOrderItem linked to this ReceiveInvoiceItem |
comments | string | "" | Any comments related to the ReceiveInvoiceItem . |
Create a Receive Invoice Item (V2)
Creates a ReceiveInvoiceItem
. All ReceiveInvoiceItem
s must be linked to
a ReceiveInvoice
.
Sample Request: Create a
ReceiveInvoiceItem
for theReceiveInvoice
with ID of 1001
let settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/receiveinvoiceitem",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/x-www-form-urlencoded",
},
"data": {
"receive_invoice_id": 1001,
"quantity": 2,
"price": 2.35,
"tax": 0.235,
"supplier_code": "supplier123",
"location_id": 3,
"purchase_order_item_id": 10
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1559164275
},
"items": [
{
"receiveinvoiceitem": {
"id": 123,
"created_at": 1559164275,
"modified_at": 1559164275,
"active": true,
"receive_invoice_id": 7,
"name": "New Product",
"quantity": 2,
"price": 2.35,
"tax": 0.235,
"total": 4.70,
"total_tax": 0.47,
"tax_rate": 10,
"tax_code": "S",
"product_id": 1234,
"product_supplier_id": 12,
"supplier_code": "supplier123",
"location_id": 3,
"batch": [],
"purchase_order_item_id": 10
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v2/receiveinvoiceitem
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
active | boolean | true | If true, the ReceiveInvoiceItem is active and usable in ezyVet. |
receive_invoice_id* | num | - | The ID of the ReceiveInvoice the ReceiveInvoiceItem is to be linked to. |
name | string | - | The name of the ReceiveInvoiceItem . |
quantity* | num | - | The quantity of Product invoiced. Depending on the configuration set by the Supplier , this value may represent the quantity of Outers or the quantity of Units . |
price* | num | - | The price of one selling unit. Depending on the configuration set by the Supplier , this value may represent the price of one Outer or the price of one Unit . |
tax* | num | 0 | The tax content per selling unit. Depending on the configuration set by the Supplier , this value may represent the tax amount from one Outer or one Unit . |
supplier_code* | string | - | The code of the Product in the Supplier 's records. (i.e. the code given to the product by the supplier) |
location_id | num | Separation Location ID |
The ID of the OwnershipSeparation to which this ReceiveInvoiceItem belongs. |
batch | Batch[] |
[] | The array of Batches for the ReceiveInvoiceItem . This is a required field when the Product 's Inventory Track is set to "Batch". |
purchase_order_item_id | num | - | The ID of the PurchaseOrderItem linked to this ReceiveInvoiceItem |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a ReceiveInvoiceItem . |
created_at | num | - | The epoch time when the ReceiveInvoiceItem was created. |
modified_at | num | - | The epoch time when the ReceiveInvoiceItem was last modified. |
total | num | 0 | The total monetary amount of the ReceiveInvoiceItem excluding tax. |
total_tax | num | 0 | The total tax content of the ReceiveInvoiceItem . |
product_id | num | - | The ID of the Product on the ReceiveInvoiceItem . |
Resource
Resources are booked when creating appointments. Vets are typically set up to be resources, however clinics can also have inanimate resources such as "Surgery Room". Each appointment can book multiple resources. For example, an appointment can have both a vet and the surgery room booked to indicate that both of them will not be available at a particular timeslot.
Fetch a Resource list
Fetches a list containing Resource
(s). (up to 200)
Sample Request: Get a list of
Resource
s at the clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/resource",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"resource": {
"id": "275",
"active": "1",
"created_at": "1436768897",
"modified_at": "1439266160",
"name": "Tennille Newnham",
"type": "user",
"access": "On Calendar",
"ownership_id": "1"
}
},
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/resource
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Resource . |
active | num, string | - | If true, the Resource is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Resource was created. |
modified_at | num, string | - | The epoch time when the Resource was last modified. |
ownership_id | num, string | - | The ID of the Ownership Separation to which the Resource belongs. |
name | string | - | The name of the Resource . |
type | string | - | The type of the Resource : "user" (default), "facility" |
access | enum | - | The level of the access the Resource has. The value can be one of the following: "None", "On Calendar" or "Member" |
ownership_id | num | - | The ID of the Ownership Separation to which this Resource belongs. |
Resource V2
Resources are booked when creating appointments. Vets are typically set up to be resources, however clinics can also have inanimate resources such as "Surgery Room". Each appointment can book multiple resources. For example, an appointment can have both a vet and the surgery room booked to indicate that both of them will not be available at a particular timeslot.
Fetch a Resource list
Fetches a list containing Resource
(s). (up to 200)
Sample Request: Get a list of
Resource
s at the clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/resource",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"resource": {
"id": 275,
"uid": "resource_8rexrENy9DE4oKiXE3222",
"created_at": 1436768897,
"modified_at": 1439266160,
"active": false,
"name": "Tennille Newnham",
"associated_type": "user",
"associated_id": 2,
"associated_uid": "user_123Srx3skj456hsj3",
"access": "On Calendar",
"ownership_uid": "ownershipSeparation_BNxdpQKvOGXhxYss22uDQ",
"ownership_id": 1
}
},
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/resource
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an Resource . |
uid | string | - | The ID number used by the system to uniquely identify an Resource across all ezyVet sites. |
created_at | num | - | The epoch time when the Resource was created. |
modified_at | num | - | The epoch time when the Resource was last modified. |
active | bool | - | If true, the Resource is active and usable in ezyVet. |
associated_type | string | - | The type of the Resource : "user" (default), "facility" |
associated_id | num | - | The ID number used by the system to uniquely identify a user |
associated_uid | string | - | The ID number used by the system to uniquely identify a user : "user" (default), "facility" across all ezyVet sites. |
access | enum | - | The level of the access the Resource has. The value can be one of the following: "None", "On Calendar" or "Member" |
ownership_uid | string | - | The ID of the Ownership Separation to which this Resource belongs across all ezyVet sites. |
ownership_id | num | - | The ID of the Ownership Separation to which this Resource belongs. |
Separation
Represents a record separation at the clinic.
Records can be stored in separate places in an ezyVet practice. When records are saved on ezyVet, they may be
stored in either the Database
, Business
, Division
or Location
. ezyVet chooses one based on the "Split by"
option found under the Record Properties settings on the site. Below is the hierarchy of the different
separation types (from top to bottom) and their descriptions.
Database
- The "main" and topmost level. This can be thought of as the ezyVet practice entity itself, or as "global" across the clinic site.
- For non-multidivisional sites, most records are saved here, unless otherwise specified in the Record Property setting.
Business
- Alias for "Business Unit".
- Only accessible if the clinic has Business Unit separation.
Division
- Represents a division of the clinic. Divisions can be thought of as departments, branches, or satellite clinics of the practice.
- There can be more than one division.
Location
- Represents a stock location for the clinic.
- Generally used for
InvoiceLine
separation, but like other resources, this depends on the Record Property setting.
Fetch a Separation list
Fetches a list containing Separation
(s). (up to 10)
Sample Request: Get a list of all divisions of a clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/separation?type=Division",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"separation": {
"id": "2",
"active": "1",
"created_at": "1419765339",
"modified_at": "1419765339",
"name": "Main Division",
"type": "Division",
"parent": "1",
"contact_id": "3"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/separation
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Separation . |
active | num, string | - | If true, the Separation is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Separation was created. |
modified_at | num, string | - | The epoch time when the Separation was last modified. |
name | string | - | The name of the Separation . |
type | enum, string | - | The type of Separation : Database , Business , Division or Location . |
parent | num, string | - | The ID of the parent Separation . Note, a Database has no parent. |
contact_id | num, string | - | The ID of the Contact containing business details for this Separation . |
Separation V2
Represents a record separation at the clinic.
Records can be stored in separate places in an ezyVet practice. When records are saved on ezyVet, they may be
stored in either the Database
, Business
, Division
or Location
. ezyVet chooses one based on the "Split by"
option found under the Record Properties settings on the site. Below is the hierarchy of the different
separation types (from top to bottom) and their descriptions.
Database
- The "main" and topmost level. This can be thought of as the ezyVet practice entity itself, or as "global" across the clinic site.
- For non-multidivisional sites, most records are saved here, unless otherwise specified in the Record Property setting.
Business
- Alias for "Business Unit".
- Only accessible if the clinic has Business Unit separation.
Division
- Represents a division of the clinic. Divisions can be thought of as departments, branches, or satellite clinics of the practice.
- There can be more than one division.
Location
- Represents a stock location for the clinic.
- Generally used for
InvoiceLine
separation, but like other resources, this depends on the Record Property setting.
Fetch a Separation list
Fetches a list containing Separation
(s). (up to 10)
Sample Request: Get a list of all divisions of a clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/separation",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"separation": {
"id": 2,
"uid": "ownershipSeparation_BlSb33vtXPB5mJe223FNkM",
"created_at": 1419765339,
"modified_at": 1419765339,
"active": true,
"name": "Main Division",
"type": "division",
"parent": 1,
"child": 1,
"separation_type": "Hospital",
"contact_id": 3,
"contact_uid": "contact_1BHHW2xO0u34xi4VaVW0C"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/separation
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Separation . |
uid | string | - | The ID number used by the system to uniquely identify a Separation across all ezyVet sites. |
active | bool | - | If true, the Separation is active and usable in ezyVet. |
created_at | num | - | The epoch time when the Separation was created. |
modified_at | num | - | The epoch time when the Separation was last modified. |
type | string | - | The type of the Separation . This can be one of the following: database , business , division , location . |
Sex
Represents a gender of the an animal. The gender also dictates whether the animal is desexed.
Fetch a Sex list
Fetches a list containing Sex
(es). (up to 10)
Sample Request: Get a list of all
Sex
es recognized by the clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/sex",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"sex": {
"id": "2",
"active": "1",
"created_at": 1480035980,
"modified_at": 1480035980,
"name": "Male Neutered",
"abbreviation": "MN",
"is_desexed": "1"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/sex
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Sex . |
active | num, string | - | If true, the Sex is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Sex was created. |
modified_at | num, string | - | The epoch time when the Sex was last modified. |
name | string | - | The name of the Sex . |
abbreviation | string | - | The name of the Sex . |
is_desexed | bool | - | If true, the Sex is spayed/neutered. |
name | string | - | The name of the Sex . |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Shelter Animal Booking
Represents a single Shelter Animal Booking
in ezyVet. Information about the related entities
Shelter Resource
and Shelter Resource Place
are also returned from this endpoint.
Only GET
requests are supported currently.
Fetch a Specific Shelter Animal Booking
Fetches a specific Shelter Animal Booking
specified by it's id
.
Sample Request: Fetch the
shelteranimalbooking
with id1
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/shelteranimalbooking/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479935858",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "1",
"items_total": "1"
},
"items": [
{
"shelteranimalbooking": {
"id": 1,
"created_at": 1345079097,
"modified_at": 1345079097,
"active": true,
"animal_id": 2,
"start_time": 1345222800,
"end_time": 1345525199,
"consult_id": null,
"status": "Example Status",
"shelter_resource_place_id": 4,
"contact_id": 90,
"shelter_resource_id": 2,
"shelter_resource_name": "Example Name",
"shelter_resource_ownership_id": 1,
"comment": "Example Comment"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/shelteranimalbooking
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Shelter Animal Booking . |
active | bool | - | If true, the Shelter Animal Booking is active and usable in ezyVet. |
created_at | num | - | The epoch time when the Shelter Animal Booking was created. |
modified_at | num | - | The epoch time when the Shelter Animal Booking was last modified. |
animal_id | num | - | The id of the Animal the Shelter Animal Booking is for in ezyVet. |
start_time | num | - | The epoch start time of the Shelter Animal Booking in ezyVet. |
end_time | num | - | The epoch end time of the Shelter Animal Booking in ezyVet. |
consult_id | num | - | The Consult id of the consult related to the Shelter Animal Booking in ezyVet. |
status | string | - | The status of the Shelter Animal Booking in ezyVet. |
shelter_resource_place_id | num | - | The id of the Shelter Resource Place in ezyVet the Shelter Animal Booking is booked under. |
contact_id | num | - | The id of the Contact that owns the animal the booking is for in ezyVet. |
shelter_resource_id | num | - | The Shelter Resource that the Shelter Animal Booking is booked under in ezyVet. |
shelter_resource_name | string | - | The name of the Shelter Resource that the Shelter Animal Booking is booked under in ezyVet. |
shelter_resource_ownership_id | num | - | The ownership separation of the Shelter Resource that the Shelter Animal Booking is booked under in ezyVet. |
comment | string | - | The Comment stored on the Shelter Animal Booking in ezyVet. |
Species
Represents species of an animal.
Fetch a Species list
Fetches a list containing Species
. (up to 10)
Sample Request: Get a list of canine (ID:1)
Species
recognized by the clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/species",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"species": {
"id": "1",
"active": "1",
"created_at": "1409631558",
"modified_at": "1409631558",
"name": "Canine"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/species
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Species . |
active | num, string | - | If true, the Species is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Species was created. |
modified_at | num, string | - | The epoch time when the Species was last modified. |
name | string | - | The name of the Species . |
StockAdjustment V2
Fetch stock adjustments
Fetches a list of StockAdjustment
records (up to 10).
Sample Request: Get the
StockAdjustment
with the ID 1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/stockadjustment/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"timestamp": 1573148660
},
"items": [
{
"stockadjustment": {
"id": 1,
"created_at": 1571889228,
"modified_at": 1571889631,
"active": false,
"date": 1571889180,
"amount": 61.20,
"comments": "Adjust stock to zero.",
"line_item": [
{
"id": 2,
"created_at": 1571889228,
"modified_at": 1571889310,
"active": false,
"product_id": 123,
"name": "Rimadyl Inj 50mg\/mL (Per mL)",
"code": "RMDYL-50",
"quantity": 10,
"price": 6.12,
"ledger_account": 321,
"status": "Pending",
"batch": [
{
"id": 3,
"created_at": 1573172336,
"modified_at": 1573172336,
"active": true,
"name": "123ABC",
"type": "Batch",
"parent": 47,
"expiry": 1571890330
}
],
"location_id": 3
}
],
"ownership_id": 1
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/stockadjustment/1
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a StockAdjustment . |
active | bool | - | If true, the StockAdjustment is active and usable in ezyVet. |
created_at | num | - | The epoch time when the StockAdjustment was created. |
modified_at | num | - | The epoch time when the StockAdjustment was last modified. |
date | num | - | The epoch time specified on create of the StockAdjustment . |
ownership_id | num | - | The ID of the ownership Separation to which this StockAdjustment belongs. |
Response Fields
Includes all query parameters above, plus:
Parameter | Type | Default | Description |
---|---|---|---|
amount | num | 0 | The total quantity * price of all line items. |
comments | string | "" | Any comments to add to the StockAdjustment . |
line_item | StockAdjustmentItem[] |
[] | The array of StockAdjustmentItem s that are linked to the StockAdjustment . |
Create a StockAdjustment
Creates a single StockAdjustment
Sample Request: Create a
StockAdjustment
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/stockadjustment",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"date": 1573517912,
"comments": "Adjust stock to zero",
"line_item": [
{
"product_id": 123,
"quantity": 2,
"batch": [
{
"name": "123ABC",
"quantity": 2
}
],
"location_id": 3
}
],
"ownership_id": 1
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1573177294
},
"items": [
{
"stockadjustment": {
"id": 2,
"created_at": 1573177294,
"modified_at": 1573177294,
"active": true,
"date": 1573517912,
"amount": 115,
"comments": "Adjust stock to zero",
"line_item": [
{
"id": 3,
"created_at": 1573177294,
"modified_at": 1573177294,
"active": true,
"product_id": 123,
"name": "Rimadyl Inj 50mg\/mL (Per mL)",
"code": "RMDYL-50",
"quantity": 2,
"price": 57.5,
"ledger_account": 321,
"status": "Finalised",
"batch": [
{
"id": 4,
"created_at": 1573177294,
"modified_at": 1573177294,
"active": true,
"name": "123ABC",
"type": "Batch",
"parent": 47,
"expiry": 1573520015
}
],
"location_id": 3
}
],
"ownership_id": 1
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v2/stockadjustment
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
date* | num | - | The epoch time specified on create of the StockAdjustment . |
comments | string | "" | Any comments to add to the StockAdjustment . |
line_item | StockAdjustmentItem[] |
[] | The StockAdjustmentItem s associated with this StockAdjustmentItem . |
ownership_id* | num | - | The ID of the ownership Separation to which this StockAdjustment belongs. |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a StockAdjustment . |
created_at | num | - | The epoch time when the StockAdjustment was created. |
modified_at | num | - | The epoch time when the StockAdjustment was last modified. |
active | boolean | true | If true, the StockAdjustment is active and usable in ezyVet. |
amount | num | 0 | The total quantity * price of all line items. |
StockAdjustmentItem V2
Fetch stock adjustment items
Fetches a list of StockAdjustmentItem
records (up to 10).
Sample Request: Get the
StockAdjustmentItem
with the ID 1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/stockadjustmentitem/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"timestamp": 1573148660
},
"items": [
{
"stockadjustmentitem": {
"id": 1,
"created_at": 1571889228,
"modified_at": 1571889310,
"active": false,
"stockadjustment_id": 2,
"product_id": 123,
"name": "Rimadyl Inj 50mg\/mL (Per mL)",
"code": "RMDYL-50",
"quantity": 10,
"price": 6.12,
"ledger_account": 321,
"status": "Pending",
"batch": [
{
"id": 3,
"created_at": 1573172336,
"modified_at": 1573172336,
"active": true,
"name": "123ABC",
"type": "Batch",
"parent": 47,
"expiry": 1571890330
}
],
"location_id": 3
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/stockadjustmentitem/1
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a StockAdjustmentItem . |
active | bool | - | If true, the StockAdjustmentItem is active and usable in ezyVet. |
created_at | num | - | The epoch time when the StockAdjustmentItem was created. |
modified_at | num | - | The epoch time when the StockAdjustmentItem was last modified. |
stockadjustment_id | num | - | The ID of the StockAdjustment the StockAdjustmentItem is linked to. |
product_id | num | - | The ID of the Product the StockAdjustmentItem is linked to. |
name | string | - | The name of the Product the StockAdjustmentItem is linked to. |
code | string | - | The code of the Product the StockAdjustmentItem is linked to. |
quantity | num | - | The quantity by which the Product was adjusted in this StockAdjustmentItem . |
ledger_account | num | - | The ID of the LedgerAccount the StockAdjustmentItem is linked to. |
status | enum | - | The status of the StockAdjustmentItem . This can be either Pending , Allocated , or Finalised . |
location_id | num | - | The ID of the location Separation to which this StockAdjustmentItem belongs. |
Response Fields
Includes all query parameters above, plus:
Parameter | Type | Default | Description |
---|---|---|---|
price | num | Product 's price |
The cost price per unit (excl GST) for this StockAdjustmentItem . |
batch | Batch[] |
[] | The array of Batch es that are linked to the StockAdjustmentItem . |
Create a StockAdjustmentItem
Creates a single StockAdjustmentItem
Sample Request: Create a
StockAdjustmentItem
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/stockadjustmentitem",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":
{
"stockadjustment_id": 1,
"product_id": 123,
"quantity": 2,
"batch": [
{
"name": "123ABC",
"quantity": 2
}
],
"location_id": 3
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1573177294
},
"items": [
{
"stockadjustmentitem": {
"id": 3,
"created_at": 1573177294,
"modified_at": 1573177294,
"active": true,
"stockadjustment_id": 1,
"product_id": 123,
"name": "Rimadyl Inj 50mg\/mL (Per mL)",
"code": "RMDYL-50",
"quantity": 2,
"price": 57.5,
"ledger_account": 0,
"status": "Pending",
"batch": [
{
"id": 4,
"created_at": 1573177294,
"modified_at": 1573177294,
"active": true,
"name": "123ABC",
"type": "Batch",
"parent": 5,
"expiry": 1573520015
}
],
"location_id": 3
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v2/stockadjustmentitem
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
stockadjustment_id* | num | - | The ID of the StockAdjustment the StockAdjustmentItem is linked to. |
product_id* | num | - | The ID of the Product the StockAdjustmentItem is linked to. |
quantity* | num | - | The quantity by which the Product will be adjusted in this StockAdjustmentItem . |
price | num | Product 's price |
The cost price per unit (excl GST) for this StockAdjustmentItem . |
ledger_account | num | - | The ID of the LedgerAccount the StockAdjustmentItem is linked to. |
batch | Batch[] |
[] | The array of Batch es that are linked to the StockAdjustmentItem . |
location_id | num | - | The ID of the location Separation to which this StockAdjustmentItem belongs. |
Response Fields
Includes all POST parameters plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a StockAdjustment . |
created_at | num | - | The epoch time when the StockAdjustment was created. |
modified_at | num | - | The epoch time when the StockAdjustment was last modified. |
active | bool | true | If true, the StockAdjustment is active and usable in ezyVet. |
name | string | - | The name of the Product the StockAdjustmentItem is linked to. |
code | string | - | The code of the Product the StockAdjustmentItem is linked to. |
status | enum | - | The status of the StockAdjustmentItem . This can be either Pending , Allocated , or Finalised . |
StockTransaction
Fetch stock transactions
Fetches a list of StockTransaction
records.
Sample Request: Get a
StockTransaction
record.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/stocktransaction?id=2607",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "05471b8b14f01a677ff3e82503fe6d4f67df7860a5a65c0348eac5d987e3046d",
"timestamp": 1558305109
},
"items": [
{
"stocktransaction": {
"id": 2607,
"created_at": 1418729081,
"modified_at": 1418729081,
"active": true,
"quantity": "1.0000",
"alter_stock": false,
"separation_id": 3,
"for_id": 1,
"for_class": "ReceiveStockItem",
"product_id": 130,
"status": "Finalised",
"date": 1665413333
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/stocktransaction?id=5
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a StockTransaction . |
active | bool | - | If true, the StockTransaction is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the StockTransaction was created. |
modified_at | num, string | - | The epoch time when the StockTransaction was last modified. |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Response Fields
Includes all query parameters above, plus:
Parameter | Type | Default | Description |
---|---|---|---|
quantity | num, string | - | The stock quantity |
alter_stock | bool | - | True if this transaction alters the stock level, false otherwise |
separation_id | num, string | - | The Separation id (this would always be a Location) |
for_id | num, string | - | The id of associated record |
for_class | string | - | The type of the associated record |
product_id | num, string | - | The related product ID |
status | string | - | The status of this StockTransaction |
date | num | - | The epoch time of when the StockTransaction was actioned/moved. |
SystemSetting
Get the SystemSettings
Returns the SystemSetting of the specified site.
Sample Request: Get the
SystemSetting
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/systemsetting",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"systemsetting": {
"timezone": {
"name": "Pacific/Auckland",
"utc_offset": "+12:00",
"utc_offset_seconds": 43200
}
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/systemsetting
Response Fields
Name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
timezone |
Returns various data regarding the sites Timezone.
|
Tag
Represents a tag.
Fetch a list of Tags
Fetches a list containing Tags
. (up to 10)
Sample Request: Get a
Tag
with ID:1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/tag/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"tag": {
"id": "1",
"active": "1",
"created_at": "1409631558",
"modified_at": "1409631558",
"name": "Main Tag",
"associated_id": "2",
"associated_type": "User",
"category_id": "2"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/tag
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Tag . |
active | num, string | - | If true, the Tag is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Tag was created. |
modified_at | num, string | - | The epoch time when the Tag was last modified. |
name | string | - | The name of the Tag . |
associated_id | num, string | - | The ID of the record to which this Tag is associated. |
associated_type | string | - | The name of the entity object to which this Tag is associated. |
category_id | num, string | - | The ID of the TagCategory to which this Tag belongs. |
TagCategory
Represents a tag category.
Fetch a list of Tag Categories
Fetches a list containing TagCategory
. (up to 10)
Sample Request: Get a
TagCategory
with ID:1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/tagcategory/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"tagcategory": {
"id": "1",
"active": "1",
"created_at": "1409631558",
"modified_at": "1409631558",
"name": "Main TagCategory"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/tagcategory
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a TagCategory . |
active | num, string | - | If true, the TagCategory is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the TagCategory was created. |
modified_at | num, string | - | The epoch time when the TagCategory was last modified. |
name | string | - | The name of the TagCategory . |
Tag Name
Represents a Tag Name within ezyVet.
Fetch Tag Name
Fetches a list containing Tag Names
.
Sample Request: Fetches a list containing
Tag Name
(up to 50).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/tagname",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1543875221",
"items_page": "1",
"items_page_total": "122",
"items_page_size": "2",
"items_total": "244"
},
"items": [
{
"tagname": {
"id": "1",
"active": "1",
"created_at": "1393987531",
"modified_at": "1416942341",
"name": "Canine",
"category_id": "2"
}
},
{
"tagname": {
"id": "3",
"active": "1",
"created_at": "1401762381",
"modified_at": "1401762381",
"name": "Feline",
"category_id": "3"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/tagname
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Tag Name . |
created_at | num, string | - | The epoch time when the Tag Name was created. |
modified_at | num, string | - | The epoch time when the Tag Name was last modified. |
active | num, string | - | If true, the Tag Name is active and usable in ezyVet. |
category_id | num, string | - | The ID of the Tag Category the Tag Name is part of. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Tag Name . |
created_at | num, string | - | The epoch time when the Tag Name was created. |
modified_at | num, string | - | The epoch time when the Tag Name was last modified. |
active | num, string | - | If true, the Tag Name is active and usable in ezyVet. |
name | string | - | The Tag Name 's name. |
category_id | num, string | - | The ID of the Tag Category the Tag Name is part of. |
Tax Rate
Represents a Tax Rate
within ezyVet.
Fetch Tax Rate
Fetches a list containing Tax Rate
s.
HTTP Request
GET https://api.ezyvet.com/v2/taxrate
Sample Request: Get a list of 10
Tax Rate
s.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/taxrate",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 2,
"items_page_size": 10,
"items_total": 12,
"transaction_id": "05b2495324467e357f214ab4a20bcf7fdfc6739915caae72069f4791c93b5728",
"timestamp": 1563839396
},
"items": [
{
"taxrate": {
"id": 1,
"created_at": 1237840978,
"modified_at": 1548418981,
"active": true,
"code": "E",
"rate": 0
}
},
{
"taxrate": {
"id": 2,
"created_at": 1287442589,
"modified_at": 1559179338,
"active": true,
"code": "S",
"rate": 10
}
},
{
"taxrate": {
"id": 3,
"created_at": 1237840978,
"modified_at": 1237840978,
"active": true,
"code": "Z",
"rate": 0
}
},
{
"taxrate": {
"id": 4,
"created_at": 1287442524,
"modified_at": 1287442524,
"active": true,
"code": "O",
"rate": 12.5
}
},
{
"taxrate": {
"id": 5,
"created_at": 1393817229,
"modified_at": 1500667915,
"active": true,
"code": "GST",
"rate": 10
}
},
{
"taxrate": {
"id": 6,
"created_at": 1488234054,
"modified_at": 1499380900,
"active": true,
"code": "TEST",
"rate": 0.1
}
},
{
"taxrate": {
"id": 7,
"created_at": 1503002869,
"modified_at": 1543787695,
"active": true,
"code": "LA C",
"rate": 9.25
}
},
{
"taxrate": {
"id": 8,
"created_at": 1516931149,
"modified_at": 1516931230,
"active": true,
"code": "TST",
"rate": 0
}
},
{
"taxrate": {
"id": 9,
"created_at": 1543787370,
"modified_at": 1545852436,
"active": true,
"code": "VK T",
"rate": 6.25
}
},
{
"taxrate": {
"id": 10,
"created_at": 1548363639,
"modified_at": 1548418981,
"active": true,
"code": "VAT",
"rate": 20
}
}
],
"messages": []
}
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Tax Rate . |
created_at | num | - | The epoch time when the Tax Rate was created. |
modified_at | num | - | The epoch time when the Tax Rate was last modified. |
active | bool | - | If true, the Tax Rate is active and usable in ezyVet. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Tax Rate . |
created_at | num | - | The epoch time when the Tax Rate was created. |
modified_at | num | - | The epoch time when the Tax Rate was last modified. |
active | bool | - | If true, the Tax Rate is active and usable in ezyVet. |
code | string | - | The code of the Tax Rate |
rate | num | - | The percentage rate of the Tax Rate |
Therapeutic
A therapeutic (also known as procedure) is medical activity that can be performed by the clinic, such as anaesthesia, desexing, microchipping and so on.
Fetch a Therapeutic list
Fetches a list containing Therapeutic
(s). (up to 10)
Sample Request: Get a list of
Therapeutic
s that the clinic can perform.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/therapeutic",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"therapeutic": {
"id": "2",
"active": "1",
"created_at": "1479955983",
"modified_at": "1479955999",
"name": "Arthroscopy",
"default_template_id": "0",
"department_ids": [
"4009"
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/therapeutic
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify an Therapeutic . |
active | num, string | - | If true, the Therapeutic is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Therapeutic was created. |
modified_at | num, string | - | The epoch time when the Therapeutic was last modified. |
name | string | - | The name of the Therapeutic . |
default_template_id | num, string | 0 | The ID number used by the system to uniquely identify a Template linked to a therapeutic. |
department_ids | array of num, string | - | List of department IDs for which therapeutic is enabled. If empty then all departments can access a therapeutic. Visible only when department.procedures feature is on. |
Transaction
Represents a financial Transaction
that was processed by an external integration.
Fetch an Transaction list
Fetches a list containing Transaction
(s). (up to 200)
Sample Request: Get the
Transaction
with the ID 1.
var settings = {
crossDomain: true,
url: "https://api.ezyvet.com/v2/transaction/86",
method: "GET",
headers: {
authorization: "Bearer token12345"
}
};
$.ajax(settings).done(function(response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "e520732bb731cfae053a3a2662f62b98be639971686e7a702048bd79fc0e05fb",
"timestamp": 1568436403
},
"items": [
{
"transaction": {
"id": 86,
"created_at": 1518065159,
"modified_at": 1518065198,
"active": true,
"ownership_id": 1,
"payment_id": 92,
"status": "Accepted",
"integration_name": "PayJunction",
"external_reference": "70e18ec178d196c56486878d16debd84",
"external_id": 1123
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/transaction
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify an Transaction . |
created_at | num | - | The epoch time when the Transaction was created. |
modified_at | num | - | The epoch time when the Transaction was last modified. |
active | bool | true | If true, the Transaction is active and usable in ezyVet. |
payment_id | num | - | The ID of the associated Payment linked to this Transaction . |
ownership_id | num | - | The ID of the Ownership Separation to which this Transaction belongs. |
Response Parameters
Includes query parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
status | string | - | The status of the Transaction . This field can be one of the following: Declined, Accepted, Canceled, Capture, Initiated or Error. |
integration_name | string | - | The name of the external partner for the Transaction . |
external_reference | string | - | The reference provided by the external partner Transaction . |
external_id | num | - | The ID of the Transaction in the external integrations system. |
User
Represents an ezyVet user at the clinic. Users can be flagged as vets and salespersons. Vets can be used as case owners for consultations, while salespersons can be specified in invoice lines.
Fetch a User list
Fetches a list containing User
(s). (up to 10)
Sample Request: Get a list of vet (ID:1)
User
s at the clinic.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/user?is_vet=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"user": {
"id": "12",
"active": "1",
"created_at": 1480035980,
"modified_at": 1480035980,
"name": "John Smith",
"code": "488714797351",
"is_vet": "1",
"is_salesperson": "1"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/user
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a User . |
active | num, string | - | If true, the User is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the User was created. |
modified_at | num, string | - | The epoch time when the User was last modified. |
name | string | - | The name of the User . |
code | string | - | The code of the User . |
is_vet | bool, string | - | If true, the User is a vet. |
is_salesperson | bool, string | - | If true, the User is a salesperson. |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Vaccination
Represents a record of a vaccine administration.
Each Vaccination
must be linked to a Consult
.
Fetch a Vaccination list
Fetches a list containing Vaccination
(s). (up to 10)
Sample Request: Get a list of
Vaccination
s that used a particular vaccineProduct
(ID:125).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/vaccination?product_id=125",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": "1479954983",
"items_page": "1",
"items_page_total": "1",
"items_page_size": "10",
"items_total": "1"
},
"items": [
{
"vaccination": {
"id": "1",
"active": "1",
"created_at": "1319083957",
"modified_at": "1319083957",
"vet_id": "17",
"consult_id": "96",
"product_id": "125",
"qty": "1",
"description": "First vaccination.",
"notes": "",
"date_of_administration": "1319022000",
"date_of_next_administration": "-43200",
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/vaccination
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num, string | - | The ID number used by the system to uniquely identify a Vaccination . |
active | num, string | - | If true, the Vaccination is active and usable in ezyVet. |
created_at | num, string | - | The epoch time when the Vaccination was created. |
modified_at | num, string | - | The epoch time when the Vaccination was last modified. |
vet_id | num, string | - | Refers to the ID of the User (vets only) who performed the vaccination. |
consult_id | num, string | - | Refers to the ID of the Consult related to the Vaccination . |
product_id | num, string | - | Refers to the ID of the vaccine Product used for the Vaccination . |
qty | num, string | - | Refers to the amount of product units administered. |
description | string | - | Description and notes for the Vaccination . |
date_of_administration | num, string | - | The epoch time when the vaccine Product was administered. This does not necessarily refer to when the Vaccination record was created. |
date_of_next_administration | num, string | - | The epoch time when the vaccine Product will next be administered. |
limit | num, string | 10 | Limits the number of items returned. |
page | num, string | 1 | Specifies the page number of the result. |
Create a new Vaccination
Creates a new Vaccination
.
Sample Request: Create a new
Vaccination
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/vaccination",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "81f951e49bca3831513f40ade8bfb3d02971ac818dfdb46845ccd29d35b74323",
"timestamp": "1681941977"
},
"items": [
{
"vaccination": {
"id": "1",
"active": "1",
"created_at": "1681941977",
"modified_at": "1681941977",
"vet_id": "163",
"animal_id": "621",
"consult_id": "4958",
"product_id": "2698",
"qty": "1",
"description": "Vaccination description for Scruffy the dog",
"notes": "",
"date_of_administration": "1619569460",
"batch_id": "0",
"date_of_next_administration": "0",
"sales_resource_id": "1457"
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/vaccination
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
vet_id* | num, string | - | The ID number used by the system to uniquely identify a Vet . |
animal_id* | num, string | - | Refers to the ID of the Animal that the vaccination is assigned to. |
consult_id | num, string | - | Refers to the ID of the Consult related to the Vaccination . |
product_id* | num, string | - | Refers to the ID of the vaccine Product used for the Vaccination . |
qty | string | - | Refers to the amount of product units administered. |
description | string | - | Description for the Vaccination . |
notes | string | - | Notes for the Vaccination . |
date_of_administration | string | - | The date that the Vaccination was administered. |
batch_id | string | - | The batch ID for the product Vaccination (if applicable). |
date_of_next_administration | string | - | The date that the next Vaccination will be administered. |
Response fields
Includes most post parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | string | - | The ID number used by the system to uniquely identify a Vaccination . |
active | string | - | If true, the Vaccination is active and usable in ezyVet. |
created_at | string | - | The epoch time when the Vaccination was created. |
modified_at | string | - | The epoch time when the Vaccination was last modified. |
sales_resource_id | string | - | The ID of the sales resource for the Vaccination . |
Update a Vaccination
Updates a single Vaccination
.
Sample Request: Update the Notes of a
Vaccination
with an ID of 1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/vaccination/1",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "3535e6523519283b85d4c3256c9e6a4193a32a8731187a5ba91f6036518b9f0f",
"timestamp": "1681943359",
"items_matched": 1,
"items_processed": 1
},
"items": [
{
"vaccination": {
"id": "1",
"active": "1",
"created_at": "1681941977",
"modified_at": "1681943358",
"vet_id": "163",
"animal_id": "621",
"consult_id": "4958",
"product_id": "2698",
"qty": "1",
"description": "Vaccination description for Scruffy the dog",
"notes": "Scruffy is very cute and he is a good boy.",
"date_of_administration": "1619569460",
"batch_id": "0",
"date_of_next_administration": "0",
"sales_resource_id": "1457"
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/vaccination/1
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
vet_id | num, string | - | The ID number used by the system to uniquely identify a Vet . |
animal_id | num, string | - | Refers to the ID of the Animal that the vaccination is assigned to. |
consult_id | num, string | - | Refers to the ID of the Consult related to the Vaccination . |
product_id | num, string | - | Refers to the ID of the vaccine Product used for the Vaccination . |
qty | string | - | Refers to the amount of product units administered. |
description | string | - | Description for the Vaccination . |
notes | string | - | Notes for the Vaccination . |
date_of_administration | string | - | The date that the Vaccination was administered. |
batch_id | string | - | The batch ID for the product Vaccination (if applicable). |
date_of_next_administration | string | - | The date that the next Vaccination will be administered. |
Response fields
Includes most post parameters, plus:
Parameter | Type | Default | Description |
---|---|---|---|
id | string | - | The ID number used by the system to uniquely identify a Vaccination . |
active | string | - | If true, the Vaccination is active and usable in ezyVet. |
created_at | string | - | The epoch time when the Vaccination was created. |
modified_at | string | - | The epoch time when the Vaccination was last modified. |
sales_resource_id | string | - | The ID of the sales resource for the Vaccination . |
WebHookEvents
This endpoint provides the list of available WebHook
events. Any of the provided events can be subscribed to.
Fetch a list of WebHookEvents
Fetch a list of WebHookEvents
.
Sample Request: Fetch a list of
WebHookEvents
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/webhookevents",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "0f83842a8d416e2a9e11e6c9210cdcbe569ddd37f9aea65b278bdfd4b782e2d5",
"timestamp": 1537224411
},
"items": [
{
"webhookevents": [
"appointment_created",
"diagnosticrequest_created",
"operation_created",
"product_created",
"product_updated"
]
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/webhookevents
Events
The response will provide the list of events to which you may subscribe.
All events will be in the format (API endpoint)_(event)
. For example appointment
_created
.
The word before the first underscore will dictate the data structure of the event. You may filter out fields you
do not need by providing a subset of fields when subscribing to an event.
WebHookEvent firing
WebHook
events are fired when the event is triggered in the ezyVet software. The event may be triggered
by an ezyVet user using the software, an API user or the ezyVet system itself.
WebHooks
Represents a WebHook record. WebHooks require a valid URL and event type in order to subscribe to the event successfully.
You may issue a subset of fields should you wish to receive only a subset of the data being pushed to the webhook.
Fetch a list of WebHooks
Fetch a WebHook
.
Sample Request: Fetch a
WebHook
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/webhooks?limit=1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "e47b73bfd943cf0380af6190a2299114af3ff24449a4fdf71dddd95eba301698",
"timestamp": 1536139627
},
"items": [
{
"webhooks": {
"id": 1,
"created_at": 1536038686,
"modified_at": 1536038686,
"active": false,
"webhook_url": "https://api.ezyvet.com/v1/webhooks?myparam",
"event": "appointment_created",
"fields": [
"id", "created_at", "consult_id"
]
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/webhooks
Query Parameters
Only the following fields are queryable.
Parameter | Type | Default | Description |
---|---|---|---|
id | int | - | The ID number used by the system to uniquely identify a WebHook . |
active | bool | - | If true, the WebHook is active and will cause the webhook_url to receive data upon events being fired. |
event | string | - | The name of the subscribed event. Each event is prefixed with a data type (endpoint) followed by the name of the event associated to that data type. I.e. when an Appointment is created in ezyVet, an appointment_created event will be fired. |
Response Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | int | - | The ID number used by the system to uniquely identify a WebHook . |
created_at | int, epoch | - | The epoch time when the WebHook was created. |
modified_at | int, epoch | - | The epoch time when the WebHook was last modified. |
active | bool | - | If true, the WebHook is active and will cause the webhook_url to receive data upon events being fired. |
webhook_url | string, url | - | The WebHook URL. This is where a fired event will push the data. Ensure this URL is correct and points to the desired location. In order to build a form of authentication into the webhook, simply add on query parameters to the URL. These query parameters will be sent when sending data to the webhook, allowing you to perform crude authentication. |
event | string | - | The name of the subscribed event. Each event is prefixed with a data type (endpoint) followed by the name of the event associated to that data type. I.e. when an Appointment is created in ezyVet, an appointment_created event will be fired. |
fields | array of string | * | A subset of fields. The WebHook push data will only contain the subset of fields specified here. If the array is empty, all fields will be sent. |
Create a WebHook
Create a WebHook
.
Sample Request: Create a
WebHook
.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/webhooks",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
},
"data": {
"webhook_url": "https://api.ezyvet.com/v1/webhooks?security=this+is+an+example",
"event": "appointment_created",
"fields": [
"id", "created_at", "animal_id", "consult_id"
],
"active": true
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "e47b73bfd943cf0380af6190a2299114af3ff24449a4fdf71dddd95eba301698",
"timestamp": 1536139627
},
"items": [
{
"webhooks": {
"id": 3,
"created_at": 1536038686,
"modified_at": 1536038686,
"active": false,
"webhook_url": "https://api.ezyvet.com/v1/webhooks?security=this+is+an+example",
"event": "appointment_created",
"fields": [
"id", "created_at", "animal_id", "consult_id"
]
}
}
],
"messages": []
}
HTTP Request
POST https://api.ezyvet.com/v1/webhooks
Post Parameters
Only the following fields allow data to be posted.
Parameter | Type | Default | Description |
---|---|---|---|
active | bool | true | If true, the WebHook is active and will cause the webhook_url to receive data upon events being fired. |
webhook_url | string, url | - | The WebHook URL. This is where a fired event will push the data. Ensure this URL is correct and points to the desired location. In order to build a form of authentication into the webhook, simply add on query parameters to the URL. These query parameters will be sent when sending data to the webhook, allowing you to perform crude authentication. |
event | string | - | The name of the subscribed event. Each event is prefixed with a data type (endpoint) followed by the name of the event associated to that data type. I.e. when an Appointment is created in ezyVet, an appointment_created event will be fired. |
fields | array of string | * | A subset of fields. The WebHook push data will only contain the subset of fields specified here. If the array is empty, all fields will be sent. If the webhook data contains nested values, then you may receive a subset of the nested data as well by specifying a string like appointment.created_at , assuming appointment is the name of a field which contains a nested object. |
Response Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | int | - | The ID number used by the system to uniquely identify a WebHook . |
created_at | int, epoch | - | The epoch time when the WebHook was created. |
modified_at | int, epoch | - | The epoch time when the WebHook was last modified. |
active | bool | - | If true, the WebHook is active and will cause the webhook_url to receive data upon events being fired. |
webhook_url | string, url | - | The WebHook URL. This is where a fired event will push the data. Ensure this URL is correct and points to the desired location. In order to build a form of authentication into the webhook, simply add on query parameters to the URL. These query parameters will be sent when sending data to the webhook, allowing you to perform crude authentication. |
event | string | - | The name of the subscribed event. Each event is prefixed with a data type (endpoint) followed by the name of the event associated to that data type. I.e. when an Appointment is created in ezyVet, an appointment_created event will be fired. |
fields | array of string | * | A subset of fields. The WebHook push data will only contain the subset of fields specified here. If the array is empty, all fields will be sent. |
Update a WebHook
Update a WebHook
.
Sample Request: Update a
WebHook
with ID: 2.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/webhooks/2",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
},
"data": {
"webhook_url": "https://api.ezyvet.com/v1/webhooks?security=this+is+an+example",
"event": "appointment_disabled",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "e47b73bfd943cf0380af6190a2299114af3ff24449a4fdf71dddd95eba301698",
"timestamp": 1536139627
},
"items": [
{
"webhooks": {
"id": 2,
"created_at": 1536038686,
"modified_at": 1536038999,
"active": true,
"webhook_url": "https://api.ezyvet.com/v1/webhooks?security=this+is+an+example",
"event": "appointment_disabled",
"fields": [
"id", "created_at", "animal_id", "consult_id"
]
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v1/webhooks
Patch Parameters
Only the following fields allow data to be edited.
Parameter | Type | Default | Description |
---|---|---|---|
active | bool | - | If true, the WebHook is active and will cause the webhook_url to receive data upon events being fired. |
webhook_url | string, url | - | The WebHook URL. This is where a fired event will push the data. Ensure this URL is correct and points to the desired location. In order to build a form of authentication into the webhook, simply add on query parameters to the URL. These query parameters will be sent when sending data to the webhook, allowing you to perform crude authentication. |
event | string | - | The name of the subscribed event. Each event is prefixed with a data type (endpoint) followed by the name of the event associated to that data type. I.e. when an Appointment is created in ezyVet, an appointment_created event will be fired. |
fields | array of string | * | A subset of fields. The WebHook push data will only contain the subset of fields specified here. If the array is empty, all fields will be sent. If the webhook data contains nested values, then you may receive a subset of the nested data as well by specifying a string like appointment.created_at , assuming appointment is the name of a field which contains a nested object. |
Response Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | int | - | The ID number used by the system to uniquely identify a WebHook . |
created_at | int, epoch | - | The epoch time when the WebHook was created. |
modified_at | int, epoch | - | The epoch time when the WebHook was last modified. |
active | bool | - | If true, the WebHook is active and will cause the webhook_url to receive data upon events being fired. |
webhook_url | string, url | - | The WebHook URL. This is where a fired event will push the data. Ensure this URL is correct and points to the desired location. In order to build a form of authentication into the webhook, simply add on query parameters to the URL. These query parameters will be sent when sending data to the webhook, allowing you to perform crude authentication. |
event | string | - | The name of the subscribed event. Each event is prefixed with a data type (endpoint) followed by the name of the event associated to that data type. I.e. when an Appointment is created in ezyVet, an appointment_created event will be fired. |
fields | array of string | * | A subset of fields. The WebHook push data will only contain the subset of fields specified here. If the array is empty, all fields will be sent. |
Delete a WebHook
Delete a WebHook
.
Sample Request: Delete the
WebHook
with ID: 2.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/webhooks/2",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "e47b73bfd943cf0380af6190a2299114af3ff24449a4fdf71dddd95eba301698",
"timestamp": 1536139627
},
"items": [
{
"webhooks": {
"id": 2,
"created_at": 1536038686,
"modified_at": 1536038999,
"active": false,
"webhook_url": "https://api.ezyvet.com/v1/webhooks?security=this+is+an+example",
"event": "appointment_disabled",
"fields": [
"id", "created_at", "animal_id", "consult_id"
]
}
}
],
"messages": []
}
HTTP Request
DELETE https://api.ezyvet.com/v1/webhooks
Delete Parameters
None. You must specify an id
to delete a record, which can be passed in as a query parameter or directly through the URL i.e. /v1/webhooks?id=2
or /v1/webhooks/2
. Data may be passed in the body of the request, but it will have no effect.
Response Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | int | - | The ID number used by the system to uniquely identify a WebHook . |
created_at | int, epoch | - | The epoch time when the WebHook was created. |
modified_at | int, epoch | - | The epoch time when the WebHook was last modified. |
active | bool | - | If true, the WebHook is active and will cause the webhook_url to receive data upon events being fired. You will notice that this value becomes or remains false . |
webhook_url | string, url | - | The WebHook URL. This is where a fired event will push the data. Ensure this URL is correct and points to the desired location. In order to build a form of authentication into the webhook, simply add on query parameters to the URL. These query parameters will be sent when sending data to the webhook, allowing you to perform crude authentication. |
event | string | - | The name of the subscribed event. Each event is prefixed with a data type (endpoint) followed by the name of the event associated to that data type. I.e. when an Appointment is created in ezyVet, an appointment_created event will be fired. |
fields | array of strings | * | A subset of fields. The WebHook push data will only contain the subset of fields specified here. If the array is empty, all fields will be sent. |
Failed WebHooks
We will attempt to fire off the event data to the webhook_url
defined on the WebHook
record up to 3 times.
After the 3rd attempt, we will disable the webhook. If you notice that your webhook has not been receiving any data for
a suspicious amount of time, a likely cause would be because the webhook_url
was either invalid or unreachable.
Wellness Plan
Represents a Wellness plan within ezyVet.
Fetch Wellness plans
Fetches a list containing Wellness Plans
Sample Request: Get a
Wellness Plan
with ID = 1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplan/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "f2b14a7351b032d81588afe7ace8dc938ee3d630a95ecc12e5b0c3f975511717",
"timestamp": 1544663404
},
"items": [
{
"wellnessplan": {
"id": 1,
"created_at": 1544384995,
"modified_at": 1544491855,
"active": true,
"name": "Demo Wellness Plan",
"subscription_cycle_unit": "year",
"subscription_cycle_qty": 3,
"subscription_fee_product": 3,
"fixed_subscription_price": null,
"min_cycle_qty_on_signup": 3,
"term_qty": 12,
"pause_limit_qty": 6,
"extends_end_date": 1,
"portion_revenue_payable": "0.2000",
"enrollment_fee_product": null,
"replacement_wellness_plan": null,
"discontinued": false,
"cancellation_product": 1,
"default_renew": true,
"renewal_fee_product": 0,
"ownership_id": 1
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/wellnessplan
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan . |
created_at | num | - | The epoch time when the Wellness Plan was created. |
modified_at | num | - | The epoch time when the Wellness Plan was last modified. |
active | bool | - | If true, the Wellness Plan is active and usable in ezyVet. |
name | string | - | The name of the Wellness Plan . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan . |
created_at | num | - | The epoch time when the Wellness Plan was created. |
modified_at | num | - | The epoch time when the Wellness Plan was last modified. |
active | bool | true | If true, the Wellness Plan is active and usable in ezyVet. |
name | string | - | The name of the Wellness Plan . |
subscription_cycle_unit | enum | "month" | The unit for the period of time the Wellness Plan runs and how often the clients are billed. This field can be one of the following year , month , week or day . |
subscription_cycle_qty | num | 1 | The quantity of units for the period of time the Wellness Plan runs and how often the clients are billed. |
subscription_fee_product | num | - | The Product ID that is charged each cycle of the subscription_fee_product subscription. |
fixed_subscription_price | num | null | The override price of the subscription if this value is null the Wellness Plan will use the price of the subscription_fee_product Product . |
min_cycle_qty_on_signup | num | 3 | The amount of subscription cycles that must be paid in advance. |
term_qty | num | 12 | The term length of the Wellness Plan . |
pause_limit_qty | num | 6 | The amount of cycles that a Wellness Plan can be paused for. |
extends_end_date | bool | true | Whether pausing a Wellness Plan extends the plan's end date for the amount paused. |
portion_revenue_payable | string, num | 0.2 | The percentage of the the Wellness Plan Benefits discounting discounting that will be recorded as earnings. |
enrollment_fee_product | num | null | The ID of a Product that is a fixed charge for enrollment to a wellness plan. |
replacement_wellness_plan | num | null | The ID of the Wellness Plan that will replace the current plan once completed. |
discontinued | bool | false | If true, the Wellness Plan is discontinued and will not allow new clients to be subscribed to the Wellness Plan . |
cancellation_product | num | - | The ID of the Product that is charged when the Wellness Plan is cancelled. |
default_renew | bool | - | If true, the Wellness Plan will renew by default. |
renewal_fee_product | num | null | The ID of the Product that is charge when the Wellness Plan is renewed. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan belongs. |
Create a Wellness Plan
Creates a single Wellness Plan
.
Sample Request: Create a new
Wellness Plan
with the name Demo Wellness Plan.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplan",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data": {
"name": "Demo Wellness Plan",
"subscription_fee_product": 2,
"min_cycle_qty_on_signup": 1,
"cancellation_product": 2
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "707e6b24a258faea24e299d3baf628c9b75b9d9f2cd2829c17a363849227539e",
"timestamp": 1544413939
},
"items": [
{
"wellnessplan": {
"id": 20,
"created_at": 1544413939,
"modified_at": 1544413939,
"active": true,
"name": "Demo Wellness Plan",
"subscription_cycle_unit": "month",
"subscription_cycle_qty": 1,
"subscription_fee_product": 2,
"fixed_subscription_price": null,
"min_cycle_qty_on_signup": 1,
"term_qty": 12,
"pause_limit_qty": 6,
"extends_end_date": 1,
"portion_revenue_payable": "0.2000",
"enrollment_fee_product": null,
"replacement_wellness_plan": null,
"discontinued": false,
"cancellation_product": 2,
"default_renew": true,
"renewal_fee_product": null,
"ownership_id": 1
}
}
],
"messages": []
}
POST https://api.ezyvet.com/v2/wellnessplan
POST Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
name* | string | - | The name of the Wellness Plan . |
subscription_cycle_unit | enum | "month" | The unit for the period of time the Wellness Plan runs and how often the clients are billed. This field can be one of the following year , month , week or day . |
subscription_cycle_qty | num | 1 | The quantity of units for the period of time the Wellness Plan runs and how often the clients are billed. |
subscription_fee_product* | num | - | The Product ID that is charged each cycle of the subscription_fee_product subscription. |
fixed_subscription_price | num | null | The override price of the subscription if this value is null the Wellness Plan will use the price of the subscription_fee_product Product . |
min_cycle_qty_on_signup* | num | 3 | The amount of subscription cycles that must be paid in advance. |
term_qty | num | 12 | The term length of the Wellness Plan . |
pause_limit_qty | num | 6 | The amount of cycles that a Wellness Plan can be paused for. |
extends_end_date | bool | true | Whether pausing a Wellness Plan extends the plan's end date for the amount paused. |
portion_revenue_payable | string, num | 0.2 | The percentage of the the Wellness Plan Benefits discounting discounting that will be recorded as earnings. |
enrollment_fee_product | num | null | The ID of a Product that is a fixed charge for enrollment to a wellness plan. |
replacement_wellness_plan | num | null | The ID of the Wellness Plan that will replace the current plan once completed. |
cancellation_product | num | - | The ID of the Product that is charged when the Wellness Plan is cancelled. |
default_renew | bool | - | If true, the Wellness Plan will renew by default. |
renewal_fee_product | num | null | The ID of the Product that is charge when the Wellness Plan is renewed. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan belongs. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan . |
created_at | num | - | The epoch time when the Wellness Plan was created. |
modified_at | num | - | The epoch time when the Wellness Plan was last modified. |
active | bool | true | If true, the Wellness Plan is active and usable in ezyVet. |
name | string | - | The name of the Wellness Plan . |
subscription_cycle_unit | enum | "month" | The unit for the period of time the Wellness Plan runs and how often the clients are billed. This field can be one of the following year , month , week or day . |
subscription_cycle_qty | num | 1 | The quantity of units for the period of time the Wellness Plan runs and how often the clients are billed. |
subscription_fee_product | num | - | The Product ID that is charged each cycle of the subscription_fee_product subscription. |
fixed_subscription_price | num | null | The override price of the subscription if this value is null the Wellness Plan will use the price of the subscription_fee_product Product . |
min_cycle_qty_on_signup | num | 3 | The amount of subscription cycles that must be paid in advance. |
term_qty | num | 12 | The term length of the Wellness Plan . |
pause_limit_qty | num | 6 | The amount of cycles that a Wellness Plan can be paused for. |
extends_end_date | bool | true | Whether pausing a Wellness Plan extends the plan's end date for the amount paused. |
portion_revenue_payable | string, num | 0.2 | The percentage of the the Wellness Plan Benefits discounting discounting that will be recorded as earnings. |
enrollment_fee_product | num | null | The ID of a Product that is a fixed charge for enrollment to a wellness plan. |
replacement_wellness_plan | num | null | The ID of the Wellness Plan that will replace the current plan once completed. |
discontinued | bool | false | If true, the Wellness Plan is discontinued and will not allow new clients to be subscribed to the Wellness Plan . |
cancellation_product | num | - | The ID of the Product that is charged when the Wellness Plan is cancelled. |
default_renew | bool | - | If true, the Wellness Plan will renew by default. |
renewal_fee_product | num | null | The ID of the Product that is charge when the Wellness Plan is renewed. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan belongs. |
Update a Wellness Plan
Updates a single Wellness Plan
.
Sample Request: Update a
Wellness Plan
with the ID of 1 to have the name DemoName.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplan/1",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data": {
"name" : "DemoName"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "c4b48b068ee8cb1e7f44bbd79c338503ab87d46fd7685b8bff5e4f0fa7a26baf",
"timestamp": 1547678178
},
"items": [
{
"wellnessplan": {
"id": 1,
"created_at": 1539678065,
"modified_at": 1547678177,
"active": true,
"name": "temp name",
"subscription_cycle_unit": "month",
"subscription_cycle_qty": 1,
"subscription_fee_product": 893,
"fixed_subscription_price": null,
"min_cycle_qty_on_signup": 3,
"term_qty": 12,
"pause_limit_qty": 6,
"extends_end_date": 1,
"portion_revenue_payable": "0.2000",
"enrollment_fee_product": 893,
"replacement_wellness_plan": null,
"discontinued": false,
"cancellation_product": 2198,
"default_renew": false,
"renewal_fee_product": 0,
"ownership_id": 4
}
}
],
"messages": []
}
PATCH https://api.ezyvet.com/v2/wellnessplan
PATCH Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
name | string | - | The name of the Wellness Plan . |
subscription_cycle_unit | enum | "month" | The unit for the period of time the Wellness Plan runs and how often the clients are billed. This field can be one of the following year , month , week or day . |
subscription_cycle_qty | num | 1 | The quantity of units for the period of time the Wellness Plan runs and how often the clients are billed. |
subscription_fee_product | num | - | The Product ID that is charged each cycle of the subscription_fee_product subscription. |
fixed_subscription_price | num | null | The override price of the subscription if this value is null the Wellness Plan will use the price of the subscription_fee_product Product . |
min_cycle_qty_on_signup | num | 3 | The amount of subscription cycles that must be paid in advance. |
term_qty | num | 12 | The term length of the Wellness Plan . |
pause_limit_qty | num | 6 | The amount of cycles that a Wellness Plan can be paused for. |
portion_revenue_payable | string, num | 0.2 | The percentage of the the Wellness Plan Benefits discounting discounting that will be recorded as earnings. |
enrollment_fee_product | num | null | The ID of a Product that is a fixed charge for enrollment to a wellness plan. |
replacement_wellness_plan | num | null | The ID of the Wellness Plan that will replace the current plan once completed. |
discontinued | bool | false | If true, the Wellness Plan is discontinued and will not allow new clients to be subscribed to the Wellness Plan . |
cancellation_product | num | - | The ID of the Product that is charged when the Wellness Plan is cancelled. |
default_renew | bool | - | If true, the Wellness Plan will renew by default. |
renewal_fee_product | num | null | The ID of the Product that is charge when the Wellness Plan is renewed. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan belongs. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan . |
created_at | num | - | The epoch time when the Wellness Plan was created. |
modified_at | num | - | The epoch time when the Wellness Plan was last modified. |
active | bool | true | If true, the Wellness Plan is active and usable in ezyVet. |
name | string | - | The name of the Wellness Plan . |
subscriptionion_cycle_unit | enum | "month" | The unit for the period of time the Wellness Plan runs and how often the clients are billed. This field can be one of the following year , month , week or day . |
subscriptionion_cycle_qty | num | 1 | The quantity of units for the period of time the Wellness Plan runs and how often the clients are billed. |
subscriptionion_fee_product | num | - | The Product ID that is charged each cycle of the subscription_fee_product subscription. |
fixed_subscription_price | num | null | The override price of the subscription if this value is null the Wellness Plan will use the price of the subscription_fee_product Product . |
min_cycle_qty_on_signup | num | 3 | The amount of subscription cycles that must be paid in advance. |
term_qty | num | 12 | The term length of the Wellness Plan . |
pause_limit_qty | num | 6 | The amount of cycles that a Wellness Plan can be paused for. |
extends_end_date | bool | true | Whether pausing a Wellness Plan extends the plan's end date for the amount paused. |
portion_revenue_payable | string, num | 0.2 | The percentage of the the Wellness Plan Benefits discounting discounting that will be recorded as earnings. |
enrollment_fee_product | num | null | The ID of a Product that is a fixed charge for enrollment to a wellness plan. |
replacement_wellness_plan | num | null | The ID of the Wellness Plan that will replace the current plan once completed. |
discontinued | bool | false | If true, the Wellness Plan is discontinued and will not allow new clients to be subscribed to the Wellness Plan . |
cancellation_product | num | - | The ID of the Product that is charged when the Wellness Plan is cancelled. |
default_renew | bool | - | If true, the Wellness Plan will renew by default. |
renewal_fee_product | num | null | The ID of the Product that is charge when the Wellness Plan is renewed. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan belongs. |
Delete a Wellness Plan
Deletes a Wellness Plan
.
Sample Request: Delete a
Wellness Plan
with an ID of 2.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplan/2",
"method": "DELETE",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "06947fde44d559009475c5f81bff6a1d944dd7db6ebf54c46c7a611317c994cd",
"timestamp": 1547678388
},
"items": [
{
"wellnessplan": {
"id": 2,
"created_at": 1539678065,
"modified_at": 1547678388,
"active": false,
"name": "temp name",
"subscription_cycle_unit": "month",
"subscription_cycle_qty": 1,
"subscription_fee_product": 893,
"fixed_subscription_price": null,
"min_cycle_qty_on_signup": 3,
"term_qty": 12,
"pause_limit_qty": 6,
"portion_revenue_payable": "0.2000",
"enrollment_fee_product": 893,
"replacement_wellness_plan": null,
"discontinued": false,
"cancellation_product": 2198,
"default_renew": false,
"renewal_fee_product": 0,
"ownership_id": 4
}
}
],
"messages": []
}
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan . |
created_at | num | - | The epoch time when the Wellness Plan was created. |
modified_at | num | - | The epoch time when the Wellness Plan was last modified. |
active | bool | true | If true, the Wellness Plan is active and usable in ezyVet. |
name | string | - | The name of the Wellness Plan . |
subscription_cycle_unit | enum | "month" | The unit for the period of time the Wellness Plan runs and how often the clients are billed. This field can be one of the following year , month , week or day . |
subscription_cycle_qty | num | 1 | The quantity of units for the period of time the Wellness Plan runs and how often the clients are billed. |
subscription_fee_product | num | - | The Product ID that is charged each cycle of the subscription_fee_product subscription. |
fixed_subscription_price | num | null | The override price of the subscription if this value is null the Wellness Plan will use the price of the subscription_fee_product Product . |
min_cycle_qty_on_signup | num | 3 | The amount of subscription cycles that must be paid in advance. |
term_qty | num | 12 | The term length of the Wellness Plan . |
pause_limit_qty | num | 6 | The amount of cycles that a Wellness Plan can be paused for. |
extends_end_date | bool | true | Whether pausing a Wellness Plan extends the plan's end date for the amount paused. |
portion_revenue_payable | string, num | 0.2 | The percentage of the the Wellness Plan Benefits discounting discounting that will be recorded as earnings. |
enrollment_fee_product | num | null | The ID of a Product that is a fixed charge for enrollment to a wellness plan. |
replacement_wellness_plan | num | null | The ID of the Wellness Plan that will replace the current plan once completed. |
discontinued | bool | false | If true, the Wellness Plan is discontinued and will not allow new clients to be subscribed to the Wellness Plan . |
cancellation_product | num | - | The ID of the Product that is charged when the Wellness Plan is cancelled. |
default_renew | bool | - | If true, the Wellness Plan will renew by default. |
renewal_fee_product | num | null | The ID of the Product that is charge when the Wellness Plan is renewed. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan belongs. |
Wellness Plan Benefit
Represents a Wellness plan benefit within ezyVet.
Fetch Wellness Plan Benefit
Fetches a list containing Wellness Plan Benefits
.
Sample Request: Get a Fetches a list containing
Wellness Plan Benefits
(up to 50).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplanbenefit/20",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "2458f12aac67aa571b32fbf96590100053112a2e237a2a15fdcb5fd3aa5fe249",
"timestamp": 1566178529
},
"items": [
{
"wellnessplanbenefit": {
"id": 20,
"created_at": 1554381105,
"modified_at": 1554381105,
"active": true,
"name": "Free test",
"earn_method": "default",
"earn_amount": null,
"optional": false,
"benefit_type": null,
"benefit_config": {
"type": "percentage",
"allocation": "unit",
"type_value": 100,
"usages": 100,
"renewable": true,
"option_cost_exc_tax": 0,
"refresh_cycle_quantity": 12
},
"wellnessplan_id": 12
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/wellnessplanbenefit
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Benefit . |
created_at | num | - | The epoch time when the Wellness Plan Benefit was created. |
modified_at | num | - | The epoch time when the Wellness Plan Benefit was last modified. |
active | bool | - | If true, the Wellness Plan Benefit is active and usable in ezyVet. |
wellnessplan_id | num | - | The ID of the a Wellness Plan the Wellness Plan Benefit is associated with. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Benefit . |
created_at | num | - | The epoch time when the Wellness Plan Benefit was created. |
modified_at | num | - | The epoch time when the Wellness Plan Benefit was last modified. |
active | bool | true | If true, the Wellness Plan Benefit is active and usable in ezyVet. |
name | string | - | The name of the Wellness Plan Benefit . |
earn_method | string, enum | - | This value can be default , percent or value . If the value is default it means this benefit will use the associated Wellness Plan's portion_revenue_payable percentage value. |
earn_amount | num | null | Defines the value of the benefit item's discount, which is recorded as earnings. |
optional | bool | - | If true, the client can choose to opt in or out at the time of signing up. |
benefit_type | enum | - | This value can be either percentage or value |
benefit_config | Config |
- | This object defines how the Wellness Plan Benefit behaves. |
wellnessplan_id | num | - | The ID of the a Wellness Plan that the Wellness Plan Benefit is associated with. |
Benefit Config
Key | Description |
---|---|
type | The discount type of this benefit. This can be either percentage or value . |
type_value | If type is percentage , this will be the percentage value. If type is value , this will be the discount amount in your site's local currency. |
allocation | The allocation method of this benefit. This can be either unit or line . |
renewable | If true, the Wellness Plan Benefit is able to be renewed. |
option_cost_exc_tax | The cost of the Wellness Plan Benefit if optional is true. |
refresh_cycle_quantity | The number of subscription cycles that need to elapse before this benefit refreshes. |
Create a Wellness Plan Benefit
Creates a single Wellness Plan Benefit
.
Sample Request: Create a new
Wellness Plan Benefit
with the name Demo Wellness Plan Benefit.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplanbenefit",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data":{
"name": "api generated benefit",
"earn_amount": 10,
"earn_method": "default",
"optional": 1,
"benefit_type": "value",
"benefit_config": {
"type": "value",
"allocation": "unit",
"type_value": 10,
"usages": 100,
"renewable": true,
"option_cost_exc_tax": 0,
"refresh_cycle_quantity": 12
},
"wellnessplan_id": 12
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "c2e9690179c5b18ba88f806254d472a8eac540cb2146f311c59e596ce31798e2",
"timestamp": 1566181514
},
"items": [
{
"wellnessplanbenefit": {
"id": 29,
"created_at": 1566181513,
"modified_at": 1566181513,
"active": true,
"name": "api generated benefit",
"earn_method": "default",
"earn_amount": "10.00",
"optional": true,
"benefit_type": "value",
"benefit_config": {
"type": "value",
"allocation": "unit",
"type_value": 10,
"usages": 100,
"renewable": true,
"option_cost_exc_tax": 0,
"refresh_cycle_quantity": 12
},
"wellnessplan_id": 12
}
}
],
"messages": []
}
POST https://api.ezyvet.com/v2/wellnessplanbenefit
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
active | bool | true | If true, the Wellness Plan Benefit is active and usable in ezyVet. |
earn_method* | string, enum | - | This value can be default , percent or value . If the value is default it means this benefit will use the associated Wellness Plan's portion_revenue_payable percentage value. |
earn_amount* | num | null | Defines the value of the benefit items discount is recorded as earnings. |
optional* | bool | - | If true, The client can choose to opt in or out at the time of signing up. |
benefit_type | enum | - | This value can be either percentage or value |
benefit_config* | Config |
- | This object defines how the Wellness Plan Benefit behaves. |
wellnessplan_id* | num | - | The ID of the a Wellness Plan the Wellness Plan Benefit is associated with. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Benefit . |
created_at | num | - | The epoch time when the Wellness Plan Benefit was created. |
modified_at | num | - | The epoch time when the Wellness Plan Benefit was last modified. |
active | bool | true | If true, the Wellness Plan Benefit is active and usable in ezyVet. |
name | string | - | The name of the Wellness Plan Benefit . |
earn_method | string, enum | - | This value can be default , percent or value . If the value is default it means this benefit will use the associated Wellness Plan's portion_revenue_payable percentage value. |
earn_amount | num | null | Defines the value of the benefit item's discount, which is recorded as earnings. |
optional | bool | - | If true, the client can choose to opt in or out at the time of signing up. |
benefit_type | enum | - | This value can be either percentage or value |
benefit_config | Config |
- | This object defines how the Wellness Plan Benefit behaves. |
wellnessplan_id | num | - | The ID of the a Wellness Plan that the Wellness Plan Benefit is associated with. |
Benefit Config
Key | Description |
---|---|
type | The discount type of this benefit. This can be either percentage or value . |
type_value | If type is percentage , this will be the percentage value. If type is value , this will be the discount amount in your site's local currency. |
allocation | The allocation method of this benefit. This can be either unit or line . |
renewable | If true, the Wellness Plan Benefit is able to be renewed. |
option_cost_exc_tax | The cost of the Wellness Plan Benefit if optional is true. |
refresh_cycle_quantity | The number of subscription cycles that need to elapse before this benefit refreshes. |
Update a Wellness Plan Benefit
Updates a Wellness Plan Benefit
.
Sample Request: Update the
Wellness Plan Benefit
with ID of 10001.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplanbenefit/29",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data": {
"name": "api modified benefit",
"benefit_config": {
"usages": 10
}
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "11b7d120d2dab85c3af6ea19f5f3194b66dc68e96fbc0f7889c887233dff3098",
"timestamp": 1566182114
},
"items": [
{
"wellnessplanbenefit": {
"id": 29,
"created_at": 1566181513,
"modified_at": 1566182114,
"active": true,
"name": "api modified benefit",
"earn_method": "default",
"earn_amount": "10.00",
"optional": true,
"benefit_type": "value",
"benefit_config": {
"type": "value",
"allocation": "unit",
"type_value": 10,
"usages": 10,
"renewable": true,
"option_cost_exc_tax": 0,
"refresh_cycle_quantity": 12
},
"wellnessplan_id": 12
}
}
],
"messages": []
}
HTTP Request
PATCH https://api.ezyvet.com/v2/wellnessplanbenefit
PATCH Parameters
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
active | bool | true | If true, the Wellness Plan Benefit is active and usable in ezyVet. |
earn_method | string, enum | - | This value can be default , percent or value . If the value is default it means this benefit will use the associated Wellness Plan's portion_revenue_payable percentage value. |
earn_amount | num | null | Defines the value of the benefit items discount is recorded as earnings. |
optional | bool | - | If true, The client can choose to opt in or out at the time of signing up. |
benefit_config | Config |
- | This object defines how the Wellness Plan Benefit behaves. |
wellnessplan_id | num | - | The ID of the a Wellness Plan the Wellness Plan Benefit is associated with. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Benefit . |
created_at | num | - | The epoch time when the Wellness Plan Benefit was created. |
modified_at | num | - | The epoch time when the Wellness Plan Benefit was last modified. |
active | bool | true | If true, the Wellness Plan Benefit is active and usable in ezyVet. |
name | string | - | The name of the Wellness Plan Benefit . |
earn_method | string, enum | - | This value can be default , percent or value . If the value is default it means this benefit will use the associated Wellness Plan's portion_revenue_payable percentage value. |
earn_amount | num | null | Defines the value of the benefit item's discount, which is recorded as earnings. |
optional | bool | - | If true, the client can choose to opt in or out at the time of signing up. |
benefit_type | enum | - | This value can be either percentage or value |
benefit_config | Config |
- | This object defines how the Wellness Plan Benefit behaves. |
wellnessplan_id | num | - | The ID of the a Wellness Plan that the Wellness Plan Benefit is associated with. |
Benefit Config
Key | Description |
---|---|
type | The discount type of this benefit. This can be either percentage or value . |
type_value | If type is percentage , this will be the percentage value. If type is value , this will be the discount amount in your site's local currency. |
allocation | The allocation method of this benefit. This can be either unit or line . |
renewable | If true, the Wellness Plan Benefit is able to be renewed. |
option_cost_exc_tax | The cost of the Wellness Plan Benefit if optional is true. |
refresh_cycle_quantity | The number of subscription cycles that need to elapse before this benefit refreshes. |
Wellness Plan Benefit Item
Represents a Wellness plan benefit item within ezyVet.
Fetch Wellness Plan Benefit Items
Fetches a list containing Wellness Plan Benefit Items
.
Sample Request: Fetches a list containing
Wellness Plan Benefit Items
(up to 50) where thewellness_plan_benefit
= 6.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplanbenefititem?wellness_plan_benefit=6",
"method": "GET",
"headers": {
"authorization": "Bearer token12345",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"timestamp": 1543871011,
"items_page": 1,
"items_page_total": 1,
"items_page_size": 3,
"items_total": 3
},
"items": [
{
"wellnessplanbenefititem": {
"id": 14,
"created_at": 1543545369,
"modified_at": 1543545369,
"active": true,
"wellness_plan_benefit": 6,
"associated_type": "Product",
"associated_id": 1300,
"earn_method": "Percent",
"earn_amount": 123,
"consumption_rate": 999.99,
"consumption_rate_fixed": true
}
},
{
"wellnessplanbenefititem": {
"id": 15,
"created_at": 1543545393,
"modified_at": 1543545453,
"active": true,
"wellness_plan_benefit": 6,
"associated_type": "Product",
"associated_id": 384,
"earn_method": "Percent",
"earn_amount": 123,
"consumption_rate": 1,
"consumption_rate_fixed": false
}
},
{
"wellnessplanbenefititem": {
"id": 16,
"created_at": 1543546003,
"modified_at": 1543546065,
"active": true,
"wellness_plan_benefit": 6,
"associated_type": "TagName",
"associated_id": 20,
"earn_method": "Value",
"earn_amount": 0,
"consumption_rate": 1,
"consumption_rate_fixed": false
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/wellnessplanbenefititem
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Benefit Item . |
created_at | num | - | The epoch time when the Wellness Plan Benefit Item was created. |
modified_at | num | - | The epoch time when the Wellness Plan Benefit Item was last modified. |
active | bool | - | If true, the Wellness Plan Benefit Item is active and usable in ezyVet. |
wellness_plan_benefit | num | - | The ID of the Wellness Plan Benefit the Wellness Plan Benefit Item is associated with. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Benefit Item . |
created_at | num | - | The epoch time when the Wellness Plan Benefit Item was created. |
modified_at | num | - | The epoch time when the Wellness Plan Benefit Item was last modified. |
active | bool | - | If true, the Wellness Plan Benefit Item is active and usable in ezyVet. |
wellness_plan_benefit | num | - | The ID of the Wellness Plan Benefit the Wellness Plan Benefit Item is associated with. |
associated_type | string, enum | - | The type of record the Wellness Plan Benefit Item uses. This can be either product or tag name . |
associated_id | num | - | The ID of the associated_type record. |
earn_method | string, enum | - | This value can be default , percent or value . If the value is default it means this Wellness Plan Benefit Item will use the associated Wellness Plan 's portion_revenue_payable percentage value. |
earn_amount | num | - | Defines the value of the benefit items discount is recorded as earnings. |
consumption_rate | num | 0 | The rate at which this Wellness Plan Benefit Item consumes the Wellness Plan it is associated to. |
consumption_rate_fixed | bool | - | A fixed consumption rate that is independent of the invoiced amount, allowing an arbitrary quantity of the associated_type record to be consumed by the associated Animal . |
Wellness Plan Membership
Represents a Wellness Plan Membership within ezyVet.
Fetch Wellness Plan Membership
Fetches a list containing Wellness Plan Memberships
.
Sample Request: Fetch a list containing
Wellness Plan Memberships
(up to 50).
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplanmembership",
"method": "GET",
"headers": {
"authorization": "Bearer token12345"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 10,
"items_page_size": 2,
"items_total": 20,
"transaction_id": "d75b8b8a24d202dc80b72d8ee15b2b255a54ffa1c19b16ac41a892f229218225",
"timestamp": 1543890387
},
"items": [
{
"wellnessplanmembership": {
"id": 1,
"created_at": 1538697804,
"modified_at": 1538697804,
"active": true,
"wellness_plan": 1,
"animal_id": 442,
"renew_when_expired": false,
"start_date": 1538650800,
"end_date": 1570186799,
"status": "Cancelled",
"billing_interval": 1,
"resource_id": 344,
"previous_wellness_plan_membership": null,
"next_wellness_plan": null,
"reference": "RefNo:124585",
"ownership_id": 2
}
},
{
"wellnessplanmembership": {
"id": 2,
"created_at": 1539678230,
"modified_at": 1542044990,
"active": true,
"wellness_plan": 2,
"animal_id": 452,
"renew_when_expired": false,
"start_date": 1539601200,
"end_date": 1571137199,
"status": "cancelled",
"billing_interval": 1,
"resource_id": 344,
"previous_wellness_plan_membership": null,
"next_wellness_plan": 2,
"reference": "RefNo:24585",
"ownership_id": 2
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v2/wellnessplanmembership
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Membership . |
created_at | num | - | The epoch time when the Wellness Plan Membership was created. |
modified_at | num | - | The epoch time when the Wellness Plan Membership was last modified. |
active | bool | - | If true, the Wellness Plan Membership is active and usable in ezyVet. |
wellness_plan | num | - | The ID of the Wellness Plan this Wellness Plan Membership is associated with. |
animal_id | num | - | The ID of the Animal that is enrolled to this Wellness Plan Membership . |
resource_id | int | - | The ID of the Resource that enrolled the Animal into this Wellness Plan Membership . |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Membership . |
created_at | num | - | The epoch time when the Wellness Plan Membership was created. |
modified_at | num | - | The epoch time when the Wellness Plan Membership was last modified. |
active | bool | - | If true, the Wellness Plan Membership is active and usable in ezyVet. |
wellness_plan | num | - | The ID of the Wellness Plan this Wellness Plan Membership is associated with. |
animal_id | num | - | The ID of the Animal that is enrolled to this Wellness Plan Membership . |
resource_id | int | - | The ID of the Resource that enrolled the Animal into this Wellness Plan Membership . |
renew_when_expired | bool | - | If true, the Wellness Plan Membership will automatically renew. |
start_date | int | - | The epoch time when the Wellness Plan Membership started. |
end_date | int | - | The epoch time when the Wellness Plan Membership will end (or ended). |
status | null, string | - | The current status of the Wellness Plan Membership . |
billing_interval | int | - | The frequency at which the client will be billed for the Wellness Plan Membership (in cycles). |
previous_wellness_plan_membership | int | - | The ID of the Wellness Plan Membership preceding this membership. |
next_wellness_plan | int | - | The ID of an upcoming Wellness Plan . |
reference | null, string, max:50 | - | Free Text - max:50 characters. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan Membership belongs. |
Create New Wellness Plan Membership
Adds a new Wellness Plan Membership to an animal
Sample Request: Create a new Wellness Plan Membership for an existing Animal
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplanmembership",
"method": "POST",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data": {
"start_date": 1560394723,
"animal_id": 520,
"renew_when_expired": 0,
"billing_interval": 12,
"resource_id": 66,
"wellness_plan": 11,
"next_wellness_plan": 11,
"reference": "RefNo:124585",
"ownership_id": 2
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"transaction_id": "9fafc3afb3e5dae5ee8273b04d03975b6c5a877e40e71abe39487619b1c179e8",
"timestamp": 1561327058
},
"items": [
{
"wellnessplanmembership": {
"id": 144,
"created_at": 1561327052,
"modified_at": 1561327052,
"active": true,
"wellness_plan": 11,
"animal_id": 520,
"renew_when_expired": false,
"start_date": 1560394723,
"end_date": 1592017079,
"status": "Active",
"billing_interval": 12,
"resource_id": 66,
"previous_wellness_plan_membership": null,
"next_wellness_plan": 11,
"reference": "RefNo:124585",
"ownership_id": 2
}
}
],
"messages": []
}
POST https://api.ezyvet.com/v2/wellnessplanmembership
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
start_date* | num | - | The date that the new Wellness Plan Membership will take effect |
animal_id* | num | - | The animal that this Wellness Membership is for. Needs to be a valid, active animal |
renew_when_expired* | num, bool | - | Should the plan automatically renew when it expires? 1 - true, 0 - false |
billing_interval* | num | - | Needs to be a valid billing cycle as set up on the Wellness Plan configuration. |
wellness_plan* | num | - | The id of the Wellness Plan for this membership. Needs to be a valid, active Wellness Plan . |
resource_id* | num | - | The ID of the sales Resource that is enrolling the Animal into this Wellness Plan Membership . |
next_wellness_plan | num | current plan | Set the default plan to be assigned when this plan expires. If present, needs to be active and valid. |
reference | null, string, max:50 | - | Free Text Max: 50 characters |
ownership_id* | num | - | The ID of the ownership Separation to which this Wellness Plan Membership belongs. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Membership . |
created_at | num | - | The epoch time when the Wellness Plan Membership was created. |
modified_at | num | - | The epoch time when the Wellness Plan Membership was last modified. |
active | bool | - | If true, the Wellness Plan Membership is active and usable in ezyVet. |
wellness_plan | num | - | The ID of the Wellness Plan this Wellness Plan Membership is associated with. |
animal_id | num | - | The ID of the Animal that is enrolled to this Wellness Plan Membership . |
resource_id | int | - | The ID of the Resource that enrolled the Animal into this Wellness Plan Membership . |
renew_when_expired | bool | - | If true, the Wellness Plan Membership will automatically renew. |
start_date | int | - | The epoch time when the Wellness Plan Membership started. |
end_date | int | - | The epoch time when the Wellness Plan Membership will end (or ended). |
status | null, string | - | The current status of the Wellness Plan Membership . |
billing_interval | int | - | The frequency at which the client will be billed for the Wellness Plan Membership (in cycles). |
previous_wellness_plan_membership | int | - | The ID of the Wellness Plan Membership preceding this membership. |
next_wellness_plan | int | - | The ID of an upcoming Wellness Plan . |
reference | null, string, max:50 | - | Free Text - max:50 characters. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan Membership belongs. |
Update Wellness Plan Membership
Updates Wellness Plan Membership related to an animal
Sample Request: Update Wellness Plan Membership for an existing Animal (Cancel membership with custom cancellation fee)
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v2/wellnessplanmembership",
"method": "PATCH",
"headers": {
"authorization": "Bearer token12345",
"content-type": "application/json",
},
"data": {
"id" : 119,
"status" : "cancelled",
"cancellation_option" : "custom",
"cancellation_fee" : 123.45,
"reference": "RefNo:124585"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_processed": 1,
"transaction_id": "1f3ed57699a53182163672b5e6d03631812bb4bd02406763a28e6119e37354f0",
"timestamp": 1563225987
},
"items": [
{
"wellnessplanmembership": {
"id": 119,
"created_at": 1559262051,
"modified_at": 1563225986,
"active": true,
"wellness_plan": 15,
"animal_id": 549,
"renew_when_expired": false,
"start_date": 1559217600,
"end_date": 1590839999,
"status": "Cancelled",
"billing_interval": 1,
"resource_id": 66,
"previous_wellness_plan_membership": null,
"next_wellness_plan": null,
"reference": "RefNo:124585",
"ownership_id": 2
}
}
],
"messages": []
}
PATCH https://api.ezyvet.com/v2/wellnessplanmembership
Mandatory fields are marked with a *
.
Parameter | Type | Default | Description |
---|---|---|---|
id* | num | - | ID of the Wellness Plan Membership to update |
status* | string | - | Active, Paused, Cancelled - the new status for the Wellness Plan |
cancellation_option | string | - | savings_only, remaining, custom. How should the cancellation fee be invoiced? Options are: savings_only - invoice for any money saved during membership of this plan. remaining - invoice for the outstanding amount for the term of this plan. custom - invoice a custom cancellation fee. Required if status is set to 'Cancelled' |
cancellation_fee | num | - | Custom cancellation fee. Required if status is 'Cancelled' and cancellation_option is 'custom' |
pause_length | num | - | How long to pause the membership for. Set to 0 to unpause. Required if status is set to 'Paused' |
next_wellness_plan | num | current plan | Set the default plan to be assigned when this plan expires. If present, needs to be active and valid. |
renew_when_expired | bool | - | Should the plan automatically renew when it expires? 1 - true, 0 - false |
reference | null, string, max:50 | - | Free Text Max: 50 characters |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Membership . |
created_at | num | - | The epoch time when the Wellness Plan Membership was created. |
modified_at | num | - | The epoch time when the Wellness Plan Membership was last modified. |
active | bool | - | If true, the Wellness Plan Membership is active and usable in ezyVet. |
wellness_plan | num | - | The ID of the Wellness Plan this Wellness Plan Membership is associated with. |
animal_id | num | - | The ID of the Animal that is enrolled to this Wellness Plan Membership . |
resource_id | int | - | The ID of the Resource that enrolled the Animal into this Wellness Plan Membership . |
renew_when_expired | bool | - | If true, the Wellness Plan Membership will automatically renew. |
start_date | int | - | The epoch time when the Wellness Plan Membership started. |
end_date | int | - | The epoch time when the Wellness Plan Membership will end (or ended). |
status | null, string | - | The current status of the Wellness Plan Membership . |
billing_interval | int | - | The frequency at which the client will be billed for the Wellness Plan Membership (in cycles). |
previous_wellness_plan_membership | int | - | The ID of the Wellness Plan Membership preceding this membership. |
next_wellness_plan | int | - | The ID of an upcoming Wellness Plan . |
reference | null, string, max:50 | - | Free Text - max:50 characters. |
ownership_id | num | - | The ID of the ownership Separation to which this Wellness Plan Membership belongs. |
Wellness Plan Membership Option
Represents a Wellness plan membership option.
Fetch Wellness Plan Membership Options
Fetches a list containing Wellness Plan Membership Options
.
Sample Request: Get a
Wellness Plan Membership Option
with ID = 1.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/wellnessplanmembershipoption/1",
"method": "GET",
"headers": {
"authorization": "Bearer token12345"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "80643432840d3cbaa7f30aa99c0b212d2b6b43d1941e2fca2116329db000cf55",
"timestamp": 1543532241
},
"items": [
{
"wellnessplanmembershipoption": {
"id": 1,
"created_at": 1543531135,
"modified_at": 1543531135,
"active": true,
"wellness_plan_membership": 22,
"wellness_plan_benefit": 13,
"start_cycle": 1,
"auto_renew": false
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/wellnessplanmembershipoption
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Membership Option . |
created_at | num | - | The epoch time when the Wellness Plan Membership Option was created. |
modified_at | num | - | The epoch time when the Wellness Plan Membership Option was last modified. |
active | bool | - | If true, the Wellness Plan Membership Option is active and usable in ezyVet. |
wellness_plan_membership | num | - | The ID of the Wellness Plan Membership this Wellness Plan Membership Option is linked to. |
wellness_plan_benefit | num | - | The ID of the Wellness Plan Benefit this Wellness Plan Membership Option is linked to. |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Membership Option . |
created_at | num | - | The epoch time when the Wellness Plan Membership Option was created. |
modified_at | num | - | The epoch time when the Wellness Plan Membership Option was last modified. |
active | bool | - | If true, the Wellness Plan Membership Option is active and usable in ezyVet. |
wellness_plan_membership | num | - | The ID of the Wellness Plan Membership this Wellness Plan Membership Option is linked to. |
wellness_plan_benefit | num | - | The ID of the Wellness Plan Benefit this Wellness Plan Membership Option is linked to. |
start_cycle | num | - | The Wellness Plan Membership cycle at which this Wellness Plan Membership Option was commenced. |
auto_renew | bool | - | If true, the Wellness Plan Membership Option will renew each cycle (i.e. the option can be selected again in the upcoming cycles). |
Wellness Plan Membership Status Period
Represents a Wellness plan membership status period. A status period is a record showing the status of a wellness plan for a given start and end cycle.
Fetch Wellness Plan Membership Status Periods
Fetches a list containing Wellness Plan Membership Status Periods
.
Sample Request: Get a
Wellness Plan Membership Status Period
with ID = 25.
var settings = {
"crossDomain": true,
"url": "https://api.ezyvet.com/v1/wellnessplanmembershipstatusperiod/25",
"method": "GET",
"headers": {
"authorization": "Bearer token12345"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Response (JSON)
{
"meta": {
"items_page": 1,
"items_page_total": 1,
"items_page_size": 1,
"items_total": 1,
"transaction_id": "a4e3f56b9fb799c557aea40858d42310ec14c6e70563544390679647b510a01d",
"timestamp": 1543777752
},
"items": [
{
"wellnessplanmembershipstatusperiod": {
"id": 25,
"created_at": 1543541850,
"modified_at": 1543541850,
"active": true,
"wellness_plan_membership": 23,
"start_cycle": 1,
"end_cycle": 3,
"start_date": 1543489200,
"end_date": 1551265199,
"status": "active"
}
}
],
"messages": []
}
HTTP Request
GET https://api.ezyvet.com/v1/wellnessplanmembershipstatusperiod
Query Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Membership Status Period . |
created_at | num | - | The epoch time when the Wellness Plan Membership Status Period was created. |
modified_at | num | - | The epoch time when the Wellness Plan Membership Status Period was last modified. |
active | bool | - | If true, the Wellness Plan Membership Status Period is active and usable in ezyVet. |
wellness_plan_membership | num | - | The ID of the Wellness Plan Membership this Wellness Plan Membership Status Period is linked to. |
start_date | num | - | The epoch time at which this Wellness Plan Membership Status Period started (or will start). |
Response Fields
Parameter | Type | Default | Description |
---|---|---|---|
id | num | - | The ID number used by the system to uniquely identify a Wellness Plan Membership Status Period . |
created_at | num | - | The epoch time when the Wellness Plan Membership Status Period was created. |
modified_at | num | - | The epoch time when the Wellness Plan Membership Status Period was last modified. |
active | bool | - | If true, the Wellness Plan Membership Status Period is active and usable in ezyVet. |
wellness_plan_membership | num | - | The ID of the Wellness Plan Membership this Wellness Plan Membership Status Period is linked to. |
start_cycle | num | - | The Wellness Plan cycle at which this Wellness Plan Membership Status Period was commenced (or will be commencing). |
end_cycle | num | - | The Wellness Plan cycle at which this Wellness Plan Membership Status Period was ended (or will be ending). |
start_date | num | - | The epoch time at which this Wellness Plan Membership Status Period started (or will start). |
end_date | num | - | The epoch time at which this Wellness Plan Membership Status Period ended (or will end). |
status | enum | "active" | The Wellness Plan Membership Status Period can be in the following statuses: active , cancelled , paused or imported . The default status is active. |