# CloudRx OrderService API (v2)

This documentation is for external clinic and partner integrations using the `OrderService` API.

## Scope

* Public integration endpoints under `api/v2/*`
* Authentication and token usage
* Order create/status/cancel workflows
* Product and courier lookups
* Error contract expectations

## Audience

* Clinic platform teams integrating directly
* Middleware/integration partners submitting orders on behalf of clinics

## Environment setup checklist

1. Obtain your base URL and credentials from CloudRx.
2. Call your Identity Server token endpoint (`POST /connect/token`) with OAuth2 client credentials.
3. Use the returned bearer token for all secured endpoints.
4. For cancellation and supplier-style lookups, pass the correct `clinicCode`.

## API version policy

* Integration target is `v2`.
* Swagger is exposed for `v2` only.

## Interactive API

* API Reference (Interactive): <https://developer.cloudrx.co.uk/api-reference>

Continue with [Getting Started](https://developer.cloudrx.co.uk/getting-started).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.cloudrx.co.uk/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
