API Documentation

HealthCloud API Reference

Comprehensive REST API documentation with FHIR R4 support

RESTful API

JSON-based REST endpoints

FHIR R4 Native

HL7 FHIR R4 compliant

Secure

JWT authentication

Fast

Low latency responses

Authentication

All API requests require JWT authentication

// Example: Authenticating API requests

// 1. Obtain JWT token from login
const response = await fetch('/api/v1/auth/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: 'developer@example.com',
    password: 'your-password'
  })
});

const { token } = await response.json();

// 2. Use token in subsequent requests
const appsResponse = await fetch('/api/v1/apps', {
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  }
});

Base URL: https://health-cloud.replit.app/api/v1

GET
/api/v1/apps

List all marketplace applications

Query Parameters

category
string
optional
Filter by category
verified
boolean
optional
Filter verified apps only
limit
number
optional
Number of results (default: 20)

Response Example

{
  "apps": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "DiabetesAI Predictor",
      "category": "AI Models",
      "publisher": "HealthTech Labs",
      "rating": 4.8,
      "verified": true,
      "fhir_resources": ["Patient", "Observation"],
      "pricing": {
        "type": "usage",
        "price_per_call": 0.05
      }
    }
  ],
  "total": 124
}
GET
/api/v1/apps/:id

Get detailed information about a specific app

Response Example

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "DiabetesAI Predictor",
  "description": "ML model for diabetes risk prediction",
  "publisher_id": "pub-123",
  "category": "AI Models",
  "fhir_resources": ["Patient", "Observation"],
  "compliance_score": 98,
  "total_calls": 45231,
  "created_at": "2024-01-15T10:30:00Z"
}
POST
/api/v1/apps

Publish a new application

Request Body

{
  "name": "My Healthcare App",
  "description": "Description of the app",
  "category": "AI Models",
  "fhir_resources": ["Patient"],
  "documentation_url": "https://example.com/docs",
  "pricing": {
    "type": "subscription",
    "monthly_price": 99.00
  }
}

Response Example

{
  "id": "app-456",
  "status": "pending_review",
  "message": "Application submitted for review"
}

Rate Limits

API usage limits by tier

Free Tier: 100 requests/hour
Default
Developer Tier: 1,000 requests/hour
$29/month
Enterprise: Unlimited
Custom