> ## 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

> Public API for product catalogs and checkout creation

# Public API

The Public API provides access to product catalogs, prescription and treatment checkout creation, and order status queries. It is designed for customer-facing integrations such as storefronts and telemedicine platforms.

## Base Path

```
/v2/public-api
```

## Interactive API Documentation (Swagger)

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

```
https://api.rxscale.com/v2/public-api/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. See [Authentication](/authentication) for details.

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

<Note>
  The legacy `X-RxScale-Authorization` header and `Authorization: Bearer <api-key>` are also supported. `X-API-Key` is recommended unless your platform requires bearer-token authentication.
</Note>

## Available Endpoints

| Method | Endpoint                                  | Description                                      |
| ------ | ----------------------------------------- | ------------------------------------------------ |
| `GET`  | `/products/{shop_identifier}`             | List products for a shop                         |
| `POST` | `/products/{shop_identifier}/live-stock`  | Check product stock availability before checkout |
| `POST` | `/products/{shop_identifier}/reservation` | Reserve products in a Shopify draft order        |
| `GET`  | `/orders/{shop_identifier}`               | Get order status by prescription UIDs            |
| `POST` | `/prescriptions/{shop_identifier}`        | Create a prescription-based checkout             |
| `POST` | `/treatments/{shop_identifier}`           | Create a treatment-based checkout                |

## Required Permissions

| Endpoint                     | Required Permission            |
| ---------------------------- | ------------------------------ |
| List products                | `product:read`                 |
| Check live stock             | `product:read`                 |
| Reserve products             | `create_prescription_checkout` |
| Get order status             | `order:read`                   |
| Create prescription checkout | `create_prescription_checkout` |
| Create treatment checkout    | `create_treatment_checkout`    |

<Note>
  All Public API endpoints are scoped by `shop_identifier` in the URL path. The shop must belong to the organisation associated with your API key.
</Note>
