Get latest treatment for each type of Medication
1 min
GET
/api/v1/pets/{id}/medications
Responses
200
- object
- dataobject
- dietsTatusPeriodicalTreatment[]
- idintegerExample
- pet_idintegerExample
- file_idintegerExample
- product_idintegerExample
- treatment_mapping_idintegerExample
- fileCaseRecord
- idintegerExample
- numberstringExample
- statusintegerExampleDescription
- vet_idintegerExample
- clinic_idintegerExample
- pet_idintegerExample
- sale_idintegerExample
- datestringExample
- reasonstringExample
- template_idinteger
- commentsstring
- recommendationsstring
- rabic_tag_numberstring
- presumptive_diagnosisstring
- diagnosisstring
- treatmentstring
- treatmentobject
- idintegerExample
- typestring<Treatment | SoldServicePackageProduct | SoldServicePackage | HistoricalTreatment>Example
- product_namestringExample
- tag_numberstringExample
- batch_nostringExample
- expiration_datestringExample
- product_manufacturerstring
- administration_datestringExample
- due_datestringExample
- product_category_idintegerExample
- certificatesPrintedFileCertificate[]
- idintegerExample
- printed_filePrintedFile
- idintegerExample
- namestring
- titlestringExample
- real_namestringExample
- printable_file_idstringExample
- vet_idstringExample
- patient_idstringExample
- created_atstringExample
- created_atstringExample
curl
curl --request GET \
--url /api/v1/pets/{id}/medications \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/api/v1/pets/{id}/medications", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/api/v1/pets/{id}/medications")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/v1/pets/{id}/medications"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Successful operation
{
"data": {
"dietsTatus": [
{
"id": 1,
"pet_id": 1,
"file_id": 1,
"product_id": 1,
"treatment_mapping_id": 1,
"fileCase": {
"id": 1,
"number": "175",
"status": 1,
"vet_id": 1,
"clinic_id": 1,
"pet_id": 1,
"sale_id": 1,
"date": "2021-11-19",
"reason": "Routine checkup",
"template_id": 0,
"comments": "",
"recommendations": "",
"rabic_tag_number": "",
"presumptive_diagnosis": "",
"diagnosis": "",
"treatment": ""
},
"treatment": {
"id": 1,
"type": "Treatment",
"product_name": "Nobivac Rabies",
"tag_number": "123456789",
"batch_no": "tr22",
"expiration_date": "2022-01-01",
"product_manufacturer": "",
"administration_date": "2021-11-19",
"due_date": "2022-11-19",
"product_category_id": 1
},
"certificates": [
{
"id": 9,
"printed_file": {
"id": 9,
"name": "",
"title": "Rabies Certificate For Daisy",
"real_name": "Rabies Certificate For Daisy.pdf",
"printable_file_id": "1086",
"vet_id": "1568",
"patient_id": "316635",
"created_at": "2021-11-19T13:40:23.000000Z"
},
"created_at": "2021-11-19T13:40:23.000000Z"
}
]
}
]
}
}