canonical: https://jentic.com/apis/swaggerhub.alayacare/care-plan-20

# Alayacare Care Plan 2.0

External Clinical API **Internal IDs** The following terms are used to reference IDs that identify resources in AlayaCare: - id - created_by - client_id - employee_id - plan_id - diagnosis_id - goal_id - intervention_id **External IDs** The following terms are used to reference IDs that identify resources systems external to AlayaCare: - external_employee_id - external_client_id - external_service. The API exposes 38 endpoints secured with basic authentication.

## For AI agents

Programmatically create a care plan using the client alayacare id, get a list of care plan base information using the client alayacare id. Covers 38 operations with basic authentication.

## Scope

Does not handle payments, communications, or crm - use for healthcare only.

## Capabilities

- Create a care plan using the client Alayacare ID
- Get a list of care plan base information using the client Alayacare ID
- Integrate Care Plan 2.0 into automated workflows
- Query and filter Care Plan 2.0 records by parameters
- Monitor Care Plan 2.0 operational status and events

## Use cases

### Healthcare Operations

Use the Care Plan 2.0 to perform healthcare operations programmatically. The API provides 38 endpoints covering core functionality including create a care plan using the client alayacare id, get a list of care plan base information using the client alayacare id, create a care plan using the client external id.

Example prompt: Call POST /client/{client_id}/careplans to create a care plan using the client alayacare id

### Automated Careplans Management

Automate careplans operations by combining multiple Care Plan 2.0 endpoints. Agents can get a list of care plan base information using the client alayacare id and then create a care plan using the client external id in a single workflow.

Example prompt: Call GET /client/{client_id}/careplans to get a list of care plan base information using the client alayacare id, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Care Plan 2.0 endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle basic tokens manually.

Example prompt: Search Jentic for 'create a care plan using the client alayacare id', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /client/{client_id}/careplans | Create a care plan using the client Alayacare ID |
| GET | /client/{client_id}/careplans | Get a list of care plan base information using the client Alayacare ID |
| POST | /client/by_id/{external_client_id}/careplans | Create a care plan using the client external ID |
| GET | /client/by_id/{external_client_id}/careplans | Get a list of care plan base information using the client external ID |
| GET | /client/{client_id}/careplans/active | Get the detailed information of the active care plan using Alayacare client ID |
| GET | /client/{client_id}/careplans/currently-active | Get the detailed information of the active care plan using Alayacare client ID |
| GET | /client/by_id/{external_client_id}/careplans/active | Get the detailed information of the active care plan using client external ID |
| GET | /client/by_id/{external_client_id}/careplans/currently-active | Get the detailed information of the active care plan using client external ID |

## Key resources

- **Careplans** — Operations for careplans
- **Client** — Operations for client
- **Forms** — Operations for forms

## Why Jentic

- **Setup:** Wiring Care Plan 2.0 by hand means setting up its HTTP basic auth over https and calling client care plan operations yourself against the AlayaCare Canada host, including the by-id lookups. Through Jentic you install once, import Care Plan 2.0 from the API Directory, store the basic credential once, and your agent calls it.
- **Permission scoping:** Care Plan 2.0 puts the client id in the URL path (/client/{client_id}/careplans), so a rule can pin your agent to one client: it can read that client's care plans and nothing else. You choose the operations it may call, so care plan creation is not included unless you add it.
- **Credential handling:** Your Care Plan 2.0 basic credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a care plan using the client AlayaCare id' or 'get the currently active care plan', and Jentic returns the matching Care Plan 2.0 operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Oystehr** — Alternative healthcare API
- **Athenahealth** — Alternative healthcare API

## FAQ

### What authentication does the Care Plan 2.0 use?

The Care Plan 2.0 uses HTTP Basic authentication with username and password. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I create a care plan using the client alayacare id with the Care Plan 2.0?

Yes. Use the POST /client/{client_id}/careplans endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Care Plan 2.0?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I create a care plan using the client alayacare id through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'create a care plan using the client alayacare id'. Jentic returns the matching Care Plan 2.0 operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Care Plan 2.0 have?

The Care Plan 2.0 exposes 38 endpoints covering careplans, client, forms operations.

### Can I limit what my agent is allowed to do with the Care Plan 2.0 API?

Yes. Because you run Jentic One yourself, your own rules decide which Care Plan 2.0 operations and credentials your agent can use. Care Plan 2.0 carries the client id in the URL path, such as /client/{client_id}/careplans, so a rule can pin your agent to a single client and let it only read that client's care plans. You also choose the exact operations it may call, so care plan creation via POST /client/{client_id}/careplans stays off unless you explicitly allow it.
