> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rxscale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Management API for organisation-level access

# Management API

The Management API provides organisation-level access to orders, prescriptions, products, doctors, patients, waiting room, wallet passes, and webhook subscriptions. It is designed for back-office integrations and internal tooling.

## Base Path

```
/v1/management
```

## Interactive API Documentation (Swagger)

A live Swagger UI is available for exploring and testing endpoints directly in your browser:

```
https://api.rxscale.com/v1/management/apidocs
```

<Tip>
  The Swagger UI lets you try out API calls interactively. Authenticate with your API key to test against real data.
</Tip>

## Authentication

All endpoints require an API key via the `X-API-Key` header. Management API keys are scoped to an **organisation** and can access data for all entities within that organisation. See [Authentication](/authentication) for details.

```bash theme={null}
curl -X GET "https://api.rxscale.com/v1/management/health/" \
  -H "X-API-Key: your-api-key-here"
```

## Available Endpoints

| Method   | Endpoint                                  | Description                        |
| -------- | ----------------------------------------- | ---------------------------------- |
| `GET`    | `/orders`                                 | List orders (paginated)            |
| `GET`    | `/orders/{order_uid}`                     | View order details                 |
| `GET`    | `/prescriptions/{prescription_uid}`       | View prescription details          |
| `GET`    | `/products`                               | List products with SKUs            |
| `GET`    | `/products/{product_uid}`                 | View product details               |
| `GET`    | `/doctors`                                | List doctors                       |
| `GET`    | `/doctors/{doctor_uid}/statistics`        | Get doctor prescription statistics |
| `GET`    | `/patients?email=...`                     | Search patient by email            |
| `GET`    | `/patients/{patient_uid}`                 | View patient profile               |
| `GET`    | `/patients/{patient_uid}/intent/{intent}` | Check patient intent               |
| `POST`   | `/waiting-room/register`                  | Register patient for waiting room  |
| `GET`    | `/waiting-room/{queue_uid}/status`        | Check queue status                 |
| `DELETE` | `/waiting-room/{queue_uid}`               | Cancel queue registration          |
| `GET`    | `/wallet-passes/templates`                | List wallet pass templates         |
| `GET`    | `/wallet-passes`                          | List wallet passes                 |
| `POST`   | `/wallet-passes/push-notifications`       | Send push notifications            |
| `GET`    | `/notification-subscriptions`             | List webhook subscriptions         |
| `POST`   | `/notification-subscriptions`             | Register webhook subscription      |
| `DELETE` | `/notification-subscriptions`             | Remove webhook subscription        |
| `POST`   | `/notification-subscriptions/test`        | Test webhook delivery              |

## Required Permissions

| Endpoint                       | Required Permission                   |
| ------------------------------ | ------------------------------------- |
| View orders                    | `order:read`                          |
| View prescriptions             | `prescription:read`                   |
| List products                  | `product:read`                        |
| List doctors                   | `doctor:read`                         |
| Doctor statistics              | `doctor_statistics:read`              |
| View patients                  | `patient:read`                        |
| Register / cancel waiting room | `waiting_room:write`                  |
| View waiting room status       | `waiting_room:read`                   |
| List wallet pass templates     | `wallet_pass_template:read`           |
| List wallet passes             | `wallet_pass:read`                    |
| Send push notifications        | `wallet_pass_push_notification:write` |

<Note>
  Webhook subscription endpoints (notification-subscriptions) do not require a specific permission beyond a valid Management API key.
</Note>
