Get up and running with the Aton Health Patient Referrals API in minutes. This guide assumes you already have your API credentials. If not, see our Prerequisites first.


Step 1: Get Your Access Token

Use your OAuth 2.0 credentials to obtain an access token:

Bash
curl -X POST "https://login.microsoftonline.com/5178eeaf-1f56-44cb-940e-012fe79c2845/oauth2/v2.0/token"
  -H "Content-Type: application/x-www-form-urlencoded"
  -d "grant_type=client_credentials"
  -d "client_id={your_client_id}"
  -d "client_secret={your_client_secret}"
  -d "scope={your_api_scope}"``` 

Response:

JSON
{ "token_type": "Bearer", "expires_in": 3599, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIs..." }


Step 2: Test Your Connection

Verify your API access with a simple health check:

Bash
curl -X GET "https://api.aton.health/health/ping"
  -H "Authorization: Bearer {access_token}"``` 

Expected Response:

JSON
{ "message": "pong", "timestamp": "2025-10-15T10:30:00.000Z" }

Step 3: Get Available Trials

List active clinical trials accepting referrals:

Bash
curl -X GET "https://api.aton.health/api/v1/referrals/trials"
  -H "Authorization: Bearer {access_token}"


Step 4: Submit a Referral

Submit a patient referral to an active trial:

Bash
curl -X POST "https://api.aton.health/api/v1/referrals/"
  -H "Authorization: Bearer {access_token}"
  -H "Content-Type: application/json"
  -d '{ "outcomesId": "12345678-1234-1234-1234-123456789012", "trialId": "Aton_ColonoscopyPrep_20250930", "versionId": "Aton_ColonoscopyPrep_20250930v2", "firstName": "Jane", "lastName": "Doe", "phoneNumber": "+1-555-123-4567", "email": "jane.doe@example.com", "zipCode": "12345", "prescriberNPI": "1234567890", "referralTimestamp": "10/15/2025" }' 

Next Steps

  • API Reference - Learn about additional API capabilities and explore endpoint documentation

Need Help?

Contact our integration team at integration-support@atonhealth.com