Vet Records
curl --request GET \
--url https://api.example.com/api/horses/:id/vet-records \
--header 'Content-Type: application/json' \
--data '
{
"review_date": "<string>",
"health_status": "<string>",
"certificates": [
{
"url": "<string>",
"title": "<string>"
}
],
"vaccines": [
{
"name": "<string>",
"applied_at": "<string>",
"next_due_at": "<string>",
"batch_number": "<string>"
}
],
"vet_id": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/api/horses/:id/vet-records"
payload = {
"review_date": "<string>",
"health_status": "<string>",
"certificates": [
{
"url": "<string>",
"title": "<string>"
}
],
"vaccines": [
{
"name": "<string>",
"applied_at": "<string>",
"next_due_at": "<string>",
"batch_number": "<string>"
}
],
"vet_id": "<string>",
"notes": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
review_date: '<string>',
health_status: '<string>',
certificates: [{url: '<string>', title: '<string>'}],
vaccines: [
{
name: '<string>',
applied_at: '<string>',
next_due_at: '<string>',
batch_number: '<string>'
}
],
vet_id: '<string>',
notes: '<string>'
})
};
fetch('https://api.example.com/api/horses/:id/vet-records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/horses/:id/vet-records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'review_date' => '<string>',
'health_status' => '<string>',
'certificates' => [
[
'url' => '<string>',
'title' => '<string>'
]
],
'vaccines' => [
[
'name' => '<string>',
'applied_at' => '<string>',
'next_due_at' => '<string>',
'batch_number' => '<string>'
]
],
'vet_id' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/horses/:id/vet-records"
payload := strings.NewReader("{\n \"review_date\": \"<string>\",\n \"health_status\": \"<string>\",\n \"certificates\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaccines\": [\n {\n \"name\": \"<string>\",\n \"applied_at\": \"<string>\",\n \"next_due_at\": \"<string>\",\n \"batch_number\": \"<string>\"\n }\n ],\n \"vet_id\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/horses/:id/vet-records")
.header("Content-Type", "application/json")
.body("{\n \"review_date\": \"<string>\",\n \"health_status\": \"<string>\",\n \"certificates\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaccines\": [\n {\n \"name\": \"<string>\",\n \"applied_at\": \"<string>\",\n \"next_due_at\": \"<string>\",\n \"batch_number\": \"<string>\"\n }\n ],\n \"vet_id\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/horses/:id/vet-records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"review_date\": \"<string>\",\n \"health_status\": \"<string>\",\n \"certificates\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaccines\": [\n {\n \"name\": \"<string>\",\n \"applied_at\": \"<string>\",\n \"next_due_at\": \"<string>\",\n \"batch_number\": \"<string>\"\n }\n ],\n \"vet_id\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"_id": "65f1a2b3c4d5e6f7g8h9i0j1",
"horse_id": "507f1f77bcf86cd799439011",
"vet_id": "507f191e810c19729de860eb",
"review_date": "2026-02-20T00:00:00Z",
"health_status": "Excellent condition",
"certificates": [
{
"_id": "65f1a2b3c4d5e6f7g8h9i0j2",
"url": "https://cdn.horsetrust.com/certs/health_cert.pdf",
"title": "Health Certificate",
"uploaded_at": "2026-02-20T10:00:00Z"
}
],
"vaccines": [
{
"name": "Influenza",
"applied_at": "2026-01-15T00:00:00Z",
"next_due_at": "2026-07-15T00:00:00Z",
"batch_number": "FLU2026-A123"
},
{
"name": "Tetanus",
"applied_at": "2026-01-15T00:00:00Z",
"next_due_at": "2027-01-15T00:00:00Z",
"batch_number": "TET2026-B456"
}
],
"validation_status": "validated",
"validated_by": "507f191e810c19729de860ec",
"validated_at": "2026-02-21T14:30:00Z",
"notes": "Annual check-up completed. Horse in excellent health.",
"created_at": "2026-02-20T10:00:00Z",
"updated_at": "2026-02-21T14:30:00Z"
}
]
}
Horses
Vet Records
Manage veterinary records for horse listings
GET
/
api
/
horses
/
:id
/
vet-records
Vet Records
curl --request GET \
--url https://api.example.com/api/horses/:id/vet-records \
--header 'Content-Type: application/json' \
--data '
{
"review_date": "<string>",
"health_status": "<string>",
"certificates": [
{
"url": "<string>",
"title": "<string>"
}
],
"vaccines": [
{
"name": "<string>",
"applied_at": "<string>",
"next_due_at": "<string>",
"batch_number": "<string>"
}
],
"vet_id": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.example.com/api/horses/:id/vet-records"
payload = {
"review_date": "<string>",
"health_status": "<string>",
"certificates": [
{
"url": "<string>",
"title": "<string>"
}
],
"vaccines": [
{
"name": "<string>",
"applied_at": "<string>",
"next_due_at": "<string>",
"batch_number": "<string>"
}
],
"vet_id": "<string>",
"notes": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
review_date: '<string>',
health_status: '<string>',
certificates: [{url: '<string>', title: '<string>'}],
vaccines: [
{
name: '<string>',
applied_at: '<string>',
next_due_at: '<string>',
batch_number: '<string>'
}
],
vet_id: '<string>',
notes: '<string>'
})
};
fetch('https://api.example.com/api/horses/:id/vet-records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/horses/:id/vet-records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'review_date' => '<string>',
'health_status' => '<string>',
'certificates' => [
[
'url' => '<string>',
'title' => '<string>'
]
],
'vaccines' => [
[
'name' => '<string>',
'applied_at' => '<string>',
'next_due_at' => '<string>',
'batch_number' => '<string>'
]
],
'vet_id' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/horses/:id/vet-records"
payload := strings.NewReader("{\n \"review_date\": \"<string>\",\n \"health_status\": \"<string>\",\n \"certificates\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaccines\": [\n {\n \"name\": \"<string>\",\n \"applied_at\": \"<string>\",\n \"next_due_at\": \"<string>\",\n \"batch_number\": \"<string>\"\n }\n ],\n \"vet_id\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/horses/:id/vet-records")
.header("Content-Type", "application/json")
.body("{\n \"review_date\": \"<string>\",\n \"health_status\": \"<string>\",\n \"certificates\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaccines\": [\n {\n \"name\": \"<string>\",\n \"applied_at\": \"<string>\",\n \"next_due_at\": \"<string>\",\n \"batch_number\": \"<string>\"\n }\n ],\n \"vet_id\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/horses/:id/vet-records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"review_date\": \"<string>\",\n \"health_status\": \"<string>\",\n \"certificates\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"vaccines\": [\n {\n \"name\": \"<string>\",\n \"applied_at\": \"<string>\",\n \"next_due_at\": \"<string>\",\n \"batch_number\": \"<string>\"\n }\n ],\n \"vet_id\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"_id": "65f1a2b3c4d5e6f7g8h9i0j1",
"horse_id": "507f1f77bcf86cd799439011",
"vet_id": "507f191e810c19729de860eb",
"review_date": "2026-02-20T00:00:00Z",
"health_status": "Excellent condition",
"certificates": [
{
"_id": "65f1a2b3c4d5e6f7g8h9i0j2",
"url": "https://cdn.horsetrust.com/certs/health_cert.pdf",
"title": "Health Certificate",
"uploaded_at": "2026-02-20T10:00:00Z"
}
],
"vaccines": [
{
"name": "Influenza",
"applied_at": "2026-01-15T00:00:00Z",
"next_due_at": "2026-07-15T00:00:00Z",
"batch_number": "FLU2026-A123"
},
{
"name": "Tetanus",
"applied_at": "2026-01-15T00:00:00Z",
"next_due_at": "2027-01-15T00:00:00Z",
"batch_number": "TET2026-B456"
}
],
"validation_status": "validated",
"validated_by": "507f191e810c19729de860ec",
"validated_at": "2026-02-21T14:30:00Z",
"notes": "Annual check-up completed. Horse in excellent health.",
"created_at": "2026-02-20T10:00:00Z",
"updated_at": "2026-02-21T14:30:00Z"
}
]
}
Get Vet Records
Get all validated veterinary records for a horse listing.Authentication
Not required - Public endpointPath Parameters
string
required
Horse unique identifier
Response
boolean
Indicates if the request was successful
array
Array of validated vet records, sorted by review date (newest first)
string
Vet record unique identifier
string
Horse ID
string
Veterinarian user ID (if applicable)
string
Date of veterinary review
string
Overall health status description
array
array
string
Status: validated (only validated records returned)
string
User ID of validator
string
Validation timestamp
string
Additional notes
string
Creation timestamp
string
Last update timestamp
Example
curl -X GET "https://api.horsetrust.com/api/horses/507f1f77bcf86cd799439011/vet-records"
const horseId = '507f1f77bcf86cd799439011';
const response = await fetch(`https://api.horsetrust.com/api/horses/${horseId}/vet-records`);
const data = await response.json();
console.log(data);
import requests
horse_id = '507f1f77bcf86cd799439011'
response = requests.get(
f'https://api.horsetrust.com/api/horses/{horse_id}/vet-records'
)
data = response.json()
print(data)
{
"success": true,
"data": [
{
"_id": "65f1a2b3c4d5e6f7g8h9i0j1",
"horse_id": "507f1f77bcf86cd799439011",
"vet_id": "507f191e810c19729de860eb",
"review_date": "2026-02-20T00:00:00Z",
"health_status": "Excellent condition",
"certificates": [
{
"_id": "65f1a2b3c4d5e6f7g8h9i0j2",
"url": "https://cdn.horsetrust.com/certs/health_cert.pdf",
"title": "Health Certificate",
"uploaded_at": "2026-02-20T10:00:00Z"
}
],
"vaccines": [
{
"name": "Influenza",
"applied_at": "2026-01-15T00:00:00Z",
"next_due_at": "2026-07-15T00:00:00Z",
"batch_number": "FLU2026-A123"
},
{
"name": "Tetanus",
"applied_at": "2026-01-15T00:00:00Z",
"next_due_at": "2027-01-15T00:00:00Z",
"batch_number": "TET2026-B456"
}
],
"validation_status": "validated",
"validated_by": "507f191e810c19729de860ec",
"validated_at": "2026-02-21T14:30:00Z",
"notes": "Annual check-up completed. Horse in excellent health.",
"created_at": "2026-02-20T10:00:00Z",
"updated_at": "2026-02-21T14:30:00Z"
}
]
}
Add Vet Record
Add a new veterinary record to a horse listing (owner only).Authentication
Required - JWT Bearer token withseller or admin role
Authorization: Bearer YOUR_JWT_TOKEN
Authorization
Only the horse owner can add vet records to their listing.Path Parameters
string
required
Horse unique identifier
Request Body
string
required
Date of veterinary review (ISO 8601 format)
string
required
Overall health status description
array
array
string
Veterinarian user ID (if applicable)
string
Additional notes about the health review
Response
boolean
Indicates if the request was successful
object
Notes
- New vet records are created with
validation_status: "pending" - Records must be validated by an admin before appearing in public listings
- Only the horse owner can add vet records
horse_idis automatically set from the URL parameter
Example
curl -X POST "https://api.horsetrust.com/api/horses/507f1f77bcf86cd799439011/vet-record" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"review_date": "2026-03-01T00:00:00Z",
"health_status": "Excellent condition, ready for competition",
"certificates": [
{
"url": "https://cdn.horsetrust.com/certs/health_2026.pdf",
"title": "Annual Health Certificate 2026"
}
],
"vaccines": [
{
"name": "Influenza",
"applied_at": "2026-02-15T00:00:00Z",
"next_due_at": "2026-08-15T00:00:00Z",
"batch_number": "FLU2026-C789"
},
{
"name": "Rabies",
"applied_at": "2026-02-15T00:00:00Z",
"next_due_at": "2027-02-15T00:00:00Z",
"batch_number": "RAB2026-D012"
}
],
"notes": "Annual check-up. All vital signs normal. No issues detected."
}'
const horseId = '507f1f77bcf86cd799439011';
const response = await fetch(`https://api.horsetrust.com/api/horses/${horseId}/vet-record`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
body: JSON.stringify({
review_date: '2026-03-01T00:00:00Z',
health_status: 'Excellent condition, ready for competition',
certificates: [
{
url: 'https://cdn.horsetrust.com/certs/health_2026.pdf',
title: 'Annual Health Certificate 2026'
}
],
vaccines: [
{
name: 'Influenza',
applied_at: '2026-02-15T00:00:00Z',
next_due_at: '2026-08-15T00:00:00Z',
batch_number: 'FLU2026-C789'
},
{
name: 'Rabies',
applied_at: '2026-02-15T00:00:00Z',
next_due_at: '2027-02-15T00:00:00Z',
batch_number: 'RAB2026-D012'
}
],
notes: 'Annual check-up. All vital signs normal. No issues detected.'
})
});
const data = await response.json();
console.log(data);
import requests
horse_id = '507f1f77bcf86cd799439011'
response = requests.post(
f'https://api.horsetrust.com/api/horses/{horse_id}/vet-record',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
json={
'review_date': '2026-03-01T00:00:00Z',
'health_status': 'Excellent condition, ready for competition',
'certificates': [
{
'url': 'https://cdn.horsetrust.com/certs/health_2026.pdf',
'title': 'Annual Health Certificate 2026'
}
],
'vaccines': [
{
'name': 'Influenza',
'applied_at': '2026-02-15T00:00:00Z',
'next_due_at': '2026-08-15T00:00:00Z',
'batch_number': 'FLU2026-C789'
},
{
'name': 'Rabies',
'applied_at': '2026-02-15T00:00:00Z',
'next_due_at': '2027-02-15T00:00:00Z',
'batch_number': 'RAB2026-D012'
}
],
'notes': 'Annual check-up. All vital signs normal. No issues detected.'
}
)
data = response.json()
print(data)
{
"success": true,
"data": {
"_id": "65f1a2b3c4d5e6f7g8h9i0j6",
"horse_id": "507f1f77bcf86cd799439011",
"review_date": "2026-03-01T00:00:00Z",
"health_status": "Excellent condition, ready for competition",
"certificates": [
{
"_id": "65f1a2b3c4d5e6f7g8h9i0j7",
"url": "https://cdn.horsetrust.com/certs/health_2026.pdf",
"title": "Annual Health Certificate 2026",
"uploaded_at": "2026-03-05T16:00:00Z"
}
],
"vaccines": [
{
"name": "Influenza",
"applied_at": "2026-02-15T00:00:00Z",
"next_due_at": "2026-08-15T00:00:00Z",
"batch_number": "FLU2026-C789"
},
{
"name": "Rabies",
"applied_at": "2026-02-15T00:00:00Z",
"next_due_at": "2027-02-15T00:00:00Z",
"batch_number": "RAB2026-D012"
}
],
"validation_status": "pending",
"notes": "Annual check-up. All vital signs normal. No issues detected.",
"created_at": "2026-03-05T16:00:00Z",
"updated_at": "2026-03-05T16:00:00Z"
}
}
Error Responses
401 - Unauthorized
{
"success": false,
"message": "Authentication required"
}
403 - Forbidden
{
"success": false,
"message": "Seller role required"
}
404 - Horse Not Found or Unauthorized
{
"success": false,
"message": "Horse not found or unauthorized"
}
500 - Server Error
{
"success": false,
"message": "Server error"
}
⌘I

