List all PeriodicalTreatments
1 min
GET
https://developer.digitail.io/api/v1/pets/{id}/periodical-treatments
Query Parameters
- filter[type]integerExampleDescriptionAllowed123456
- includestringExampleDescription
Responses
200
- object
- dataobject[]
- idintegerExample
- pet_idintegerExample
- file_idintegerExample
- product_idintegerExample
- treatment_mapping_idintegerExample
- fileCasedata
- treatmentobject
- idintegerExample
- typestring<Treatment | SoldServicePackageProduct | SoldServicePackage | HistoricalTreatment>ExampleAllowedTreatmentSoldServicePackageProductSoldServicePackageHistoricalTreatment
- product_namestringExample
- tag_numberstringExample
- batch_nostringExample
- expiration_datestringExample
- product_manufacturerstring
- administration_datestringExample
- due_datestringExample
- product_category_idintegerExample
- certificatesdata[]
- linkslinks
- metameta
curl
curl --request GET \
--url https://developer.digitail.io/api/v1/pets/{id}/periodical-treatments \
--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("https://developer.digitail.io/api/v1/pets/{id}/periodical-treatments", 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("https://developer.digitail.io/api/v1/pets/{id}/periodical-treatments")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://developer.digitail.io/api/v1/pets/{id}/periodical-treatments"
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": [
{
"id": 1,
"pet_id": 1,
"file_id": 1,
"product_id": 1,
"treatment_mapping_id": 1,
"fileCase": {},
"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": [
""
]
}
],
"links": {},
"meta": {}
}