Get a list of Pets
1 min
GET
/api/v1/pets
Query Parameters
- filter[clinic_id]integerrequiredDescription
- filter[vet_id]integerDescription
- filter[owner_id]integerExampleDescription
- filter[id]integerDescription
- filter[nickname]stringDescription
- filter[updated_from]string<date-time>Description
- filter[updated_to]string<date-time>Description
- includestringDescription
- sortstringDescription
- pageintegerDescription
Responses
200
- object
- dataPet[]
- idintegerExample
- nicknamestringExample
- species_idstringExample
- breed_idstringExample
- observationsstring
- genderstring<male | female | unknown>Example
- microchipstring
- crossbreedstring<0 | 1>Example
- crossbreed_details_idinteger
- colorstringExample
- distinctive_marksstring
- birthdaystring<date>Example
- gender_stringstring
- chip_numberstring
- microchip_locationstring
- insurance_numberstring
- passportstring
- profile_picturestringExample
- descriptionstringExample
- constitutionstring
- conformationstring
- weightnumber
- allergiesstring
- nr_recsinteger
- blood_typestring
- hormonal_statusintegerDescription
- agestringExample
- patientNumberstringExample
- is_verifiedstring<0 | 1>Example
- breederstring
- archiveArchiveDescription
- idintegerExample
- reasonstringExample
- typestring<Deceased | Moved away | Change of owner | Other>Example
- birthday_estimatedboolean
- rabic_tag_numberstringExample
- updated_atstring<date-time>Example
- linksobject
- firststring
- laststringExample
- prevstring
- nextstringExample
- metaobject
- current_pageintegerExample
- fromintegerExample
- last_pageintegerExample
- linksobject[]Example
[ { "url": null, "label": "« Previous", "active": false }, { "url": "https://developer.digitail.io/api/v1/entities?page=1", "label": "1", "active": true }, { "url": "https://developer.digitail.io/api/v1/entities?page=2", "label": "Next »", "active": true } ]- urlstringExample
- pathstringExample
- per_pageintegerExample
- tointegerExample
- totalintegerExample
400
401
403
429
curl
curl --request GET \
--url '/api/v1/pets?filter[clinic_id]=integer' \
--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?filter[clinic_id]=integer", 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?filter[clinic_id]=integer")
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?filter[clinic_id]=integer"
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,
"nickname": "Fritz",
"species_id": "1",
"breed_id": "1",
"observations": "",
"gender": "male",
"microchip": "",
"crossbreed": "0",
"crossbreed_details_id": 0,
"color": "NavajoWhite",
"distinctive_marks": "",
"birthday": "1983-03-29",
"gender_string": "",
"chip_number": "",
"microchip_location": "",
"insurance_number": "",
"passport": "",
"profile_picture": "https://dev-1-public-digitail.s3.eu-central-1.amazonaws.com/ionut/uploads/KXy8Rlv2vluiZYqwRCy2",
"description": "Lorem ipsum",
"constitution": "",
"conformation": "",
"weight": 0,
"allergies": "",
"nr_recs": 0,
"blood_type": "",
"hormonal_status": 0,
"age": "38 Years, 3 Months, 19 Days",
"patientNumber": "mxc-1 #jwq-1",
"is_verified": "1",
"breeder": "",
"archive": {
"id": 1,
"reason": "The patient was archived because...",
"type": "Deceased"
},
"birthday_estimated": false,
"rabic_tag_number": "12109384",
"updated_at": "2020-06-12 15:45:43"
}
],
"links": {
"first": "",
"last": "https://developer.digitail.io/api/v1/entities?page=10",
"prev": "",
"next": "https://developer.digitail.io/api/v1/entities?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 10,
"links": [
{
"url": "« Previous"
}
],
"path": "https://developer.digitail.io/api/v1/entities",
"per_page": 15,
"to": 10,
"total": 145
}
}400
// Bad Request
401
// Unauthorized
403
// Forbidden
429
// Too Many Requests