Skip to main content

Introduction

The Paw & Care API provides comprehensive endpoints for managing veterinary practice operations, including patient records, appointments, medical documentation, voice calls, and billing.

Base URL

All API requests should be made to:
http://localhost:3000/api
In production, replace with your deployed API URL.

Authentication

The API uses Supabase authentication with JWT tokens. See Authentication for details.

Response Format

All API responses return JSON with the following structure: Success Response:
{
  "id": "pet-123",
  "name": "Buddy",
  "species": "dog",
  ...
}
Error Response:
{
  "error": "Resource not found",
  "status": 404
}

HTTP Status Codes

200 OK

Request succeeded

201 Created

Resource created successfully

400 Bad Request

Invalid request parameters

404 Not Found

Resource not found

500 Server Error

Internal server error

Rate Limiting

The API implements rate limiting to ensure fair usage:
  • Standard endpoints: 100 requests per minute per IP
  • AI endpoints (transcription, SOAP generation): 10 requests per minute
  • Voice calls: 5 concurrent calls per practice
Rate limit headers are included in responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200

API Categories

Core Resources

Pets, owners, appointments, medical records

AI Services

Transcription, SOAP generation, clinical insights

Voice Calls

Retell AI voice calls and triage

Templates

SOAP templates and email templates

Billing

Billing records and invoice generation

Notifications

System notifications and reminders

SDK Support

Official SDKs are available for:
  • JavaScript/TypeScript: @paw-care/api-client
  • Python: paw-care-api
  • REST: Direct HTTP calls (documented here)

Common Headers

Include these headers in all requests:
Content-Type: application/json
Authorization: Bearer <your-jwt-token>

Pagination

List endpoints support pagination using query parameters:
limit
number
default:"50"
Maximum number of results to return (1-100)
offset
number
default:"0"
Number of results to skip
Example:
GET /api/pets?limit=20&offset=40

Filtering

Filter results using query parameters:
GET /api/appointments?status=confirmed&date=2024-12-15
Available filters vary by endpoint. See individual endpoint documentation for details.

Webhooks

Subscribe to events using webhooks:
  • call.completed - Voice call ended
  • appointment.created - New appointment scheduled
  • record.finalized - Medical record finalized
See Notifications for webhook configuration.

Error Handling

Handle errors gracefully:
try {
  const pet = await petsApi.getById('pet-123');
} catch (error) {
  if (error.status === 404) {
    console.error('Pet not found');
  } else {
    console.error('API error:', error.message);
  }
}

Need Help?

Support

Email our support team

Community

Join developer discussions

Build docs developers (and LLMs) love