Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · Athenahealth API

Worlds / Healthcare and insurance

Athenahealth API

A local athenaOne practice with departments, providers, appointment slots, patient insurance and claims. Test the scheduling and front desk agent that books, reschedules, checks eligibility and cancels visits.

Base path
/v1/{practiceid}
Auth
OAuth 2.0 client credentials bearer token, the world key
Endpoints
18
Status
Active today

This reference previews the surface the Athenahealth world serves in the closed beta. Paths mirror the public Athenahealth API; the exact subset is confirmed when your workflow is scoped.

Connect

The run gives your agent these bindings. Keep your SDK; change only where it sends requests.

bindingmeaning
WORLDS_ATHENAHEALTH_URLThis world's origin followed by /v1/{practiceid}
WORLDS_API_KEYThe world key, accepted wherever Athenahealth expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
const base = process.env.WORLDS_ATHENAHEALTH_URL + "/v1/195900";
const headers = { Authorization: "Bearer " + process.env.WORLDS_API_KEY };

const res = await fetch(base + "/appointments/open?departmentid=1&appointmenttypeid=82", {
  headers,
});

const { appointments } = await res.json();
console.log(appointments[0].appointmentid);

API reference

Patients

Patient demographics and contact details.

  • GET/v1/{practiceid}/patientsSearch patients
  • GET/v1/{practiceid}/patients/{patientid}Get a patient
  • POST/v1/{practiceid}/patientsRegister a patient
  • PUT/v1/{practiceid}/patients/{patientid}Update a patient
Fields · 6
patientidintegerPatient id
firstnamestringGiven name
lastnamestringFamily name
dobstringDate of birth, MM/DD/YYYY
homephonestringHome phone
departmentidintegerPrimary department

Appointments

Open slots, bookings and cancellations.

  • GET/v1/{practiceid}/appointments/openList open appointment slots
  • GET/v1/{practiceid}/appointments/bookedList booked appointments
  • PUT/v1/{practiceid}/appointments/{appointmentid}Book an appointment slot
  • PUT/v1/{practiceid}/appointments/{appointmentid}/cancelCancel an appointment
  • PUT/v1/{practiceid}/appointments/{appointmentid}/checkinCheck in a patient
Fields · 6
appointmentidintegerAppointment id
appointmentstatusstringf (future), x (cancelled), 2 (checked in)
datestringAppointment date
starttimestringStart time, HH:MM
provideridintegerProvider id
appointmenttypeidintegerVisit type

Providers

Clinicians and their scheduling details.

  • GET/v1/{practiceid}/providersList providers
  • GET/v1/{practiceid}/providers/{providerid}Get a provider
  • GET/v1/{practiceid}/departmentsList departments
Fields · 5
provideridintegerProvider id
firstnamestringGiven name
lastnamestringFamily name
specialtystringSpecialty
npiintegerNational provider id

Insurance

Insurance packages on file for a patient.

  • GET/v1/{practiceid}/patients/{patientid}/insurancesList patient insurances
  • POST/v1/{practiceid}/patients/{patientid}/insurancesAdd a patient insurance
  • DELETE/v1/{practiceid}/patients/{patientid}/insurances/{insuranceid}Remove a patient insurance
Fields · 5
insuranceidintegerInsurance record id
insurancepackageidintegerPackage id
insurancepolicyholderstringPolicy holder
insuranceidnumberstringMember id
sequencenumberinteger1 primary, 2 secondary

Claims

Claims and their billing status.

  • GET/v1/{practiceid}/claimsList claims
  • GET/v1/{practiceid}/claims/{claimid}Get a claim
  • GET/v1/{practiceid}/patients/{patientid}/claimsList patient claims
Fields · 5
claimidstringClaim id
patientidintegerPatient id
statusstringClaim status
servicedatestringDate of service
chargenumberTotal charge

Test workflow

  1. Prepare. Select the Athenahealth setup for your workflow and review its starting records, including patients, appointments, providers.
  2. Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.

What to verify

  • No Wednesday appointments left for Dr. Sample
  • No two patients share a slot on Thursday
  • Each moved visit keeps its appointment type
  • Every new patient visit has an eligibility check run this week
  • The canceled Friday consult has a cancel reason

Test file

A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.

yaml · worlds/tasks.yaml
# worlds/tasks.yaml · Athenahealth
version: 2
connector: athenahealth
seed: athenahealth-starter
mode: isolated
policy: >
  Dr. Sample is out Wednesday. Move every Wednesday visit to the next open
  slot of the same length that week, check eligibility for each new patient,
  and cancel nothing without a reason code.
tasks:
  - id: reschedule-appointments-when-a-provider-s-day-is-blocked
    prompt: "Reschedule appointments when a provider's day is blocked"
  - id: run-an-eligibility-check-before-a-new-patient-visit
    prompt: Run an eligibility check before a new patient visit
  - id: cancel-no-longer-needed-visits-with-the-right-reason
    prompt: Cancel no longer needed visits with the right reason
expected:
  - No Wednesday appointments left for Dr. Sample
  - No two patients share a slot on Thursday
  - Each moved visit keeps its appointment type
  - Every new patient visit has an eligibility check run this week
  - The canceled Friday consult has a cancel reason
scenarios:
  - slot-taken
  - token-expires
  - rate-limited

See Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.

Failure conditions

Each one fires before the handler, at the same step on every run.

conditionwhat the agent sees
slot-takenThe booking call fails because another user just booked the slot
token-expiresThe OAuth access token returns 401 mid reschedule
rate-limitedCalls over the per second limit return 429
payer-timeoutThe eligibility check comes back with no response from the payer

Starting data

Start each run from the same records and relationships. The overview below describes the Athenahealth starter; use the setup supplied for your workflow when preparing your own snapshot.

RecordsStarting setup
departments3 clinics with their own hours
providers8, one with a blocked Wednesday
appointments120 open slots and 70 booked across five days
patients80 fake patients with primary insurance on file
claims45 across draft, submitted and paid

The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.

Patients records

Patients

Patient demographics and contact details.

FieldTypeMeaning / relationship
patientidintegerPatient id
firstnamestringGiven name
lastnamestringFamily name
dobstringDate of birth, MM/DD/YYYY
homephonestringHome phone
departmentidintegerPrimary department
json · illustrative record shape
{
  "patientid": 1,
  "firstname": "<Given name>",
  "lastname": "<Family name>",
  "dob": "<Date of birth, MM/DD/YYYY>",
  "homephone": "<Home phone>",
  "departmentid": 1
}

See patients operations

Appointments records

Appointments

Open slots, bookings and cancellations.

FieldTypeMeaning / relationship
appointmentidintegerAppointment id
appointmentstatusstringf (future), x (cancelled), 2 (checked in)
datestringAppointment date
starttimestringStart time, HH:MM
provideridintegerProvider id
appointmenttypeidintegerVisit type
json · illustrative record shape
{
  "appointmentid": 1,
  "appointmentstatus": "<f (future), x (cancelled), 2 (checked in)>",
  "date": "<Appointment date>",
  "starttime": "<Start time, HH:MM>",
  "providerid": 1,
  "appointmenttypeid": 1
}

See appointments operations

Providers records

Providers

Clinicians and their scheduling details.

FieldTypeMeaning / relationship
provideridintegerProvider id
firstnamestringGiven name
lastnamestringFamily name
specialtystringSpecialty
npiintegerNational provider id
json · illustrative record shape
{
  "providerid": 1,
  "firstname": "<Given name>",
  "lastname": "<Family name>",
  "specialty": "<Specialty>",
  "npi": 1
}

See providers operations

Insurance records

Insurance

Insurance packages on file for a patient.

FieldTypeMeaning / relationship
insuranceidintegerInsurance record id
insurancepackageidintegerPackage id
insurancepolicyholderstringPolicy holder
insuranceidnumberstringMember id
sequencenumberinteger1 primary, 2 secondary
json · illustrative record shape
{
  "insuranceid": 1,
  "insurancepackageid": 1,
  "insurancepolicyholder": "<Policy holder>",
  "insuranceidnumber": "<Member id>",
  "sequencenumber": 1
}

See insurance operations

Claims records

Claims

Claims and their billing status.

FieldTypeMeaning / relationship
claimidstringClaim id
patientidintegerPatient id
statusstringClaim status
servicedatestringDate of service
chargenumberTotal charge
json · illustrative record shape
{
  "claimid": "<Claim id>",
  "patientid": 1,
  "status": "<Claim status>",
  "servicedate": "<Date of service>",
  "charge": 1
}

See claims operations

See the Athenahealth world in the catalog