Overview
The Patients API uses GraphQL to provide flexible access to patient demographics, medical records, medications, and visit history. GraphQL Endpoint:https://api.allcare.ai/graphql
Authentication: API Key or OAuth 2.0 required
Required Scope: read:patients (read), write:patients (write)
GraphQL vs REST
The Patients API uses GraphQL because:- Complex, nested patient data structures
- Flexible query capabilities
- Fetch only the data you need
- Strongly typed schema
- Single endpoint for all operations
Quick Start
Basic Query
Query with Nested Data
Schema
Patient Type
Queries
Get Single Patient
Search Patients
Get Patient Medications
Mutations
Create Patient
Update Patient
Add Allergy
Example Requests
Using cURL
Using JavaScript
Using Python
Pagination
For lists, use cursor-based pagination:Error Handling
GraphQL errors are returned in theerrors array:
HIPAA Compliance
GraphQL Schema Explorer
Use GraphQL introspection or GraphiQL interface to explore the full schema:Best Practices
Rate Limits
- Query operations: 100 requests/minute
- Mutation operations: 50 requests/minute
- Complex queries: Counted by query complexity points
Related Resources
Doctors API
Provider management
Pharmacy API
Prescription data
Authentication
API authentication
GraphQL Docs
Learn GraphQL