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

# APIs

> The eight sub-APIs ParmanaClient composes

Each sub-API is a small class over a shared `Transport`, one file per concern under `typescript/src/client/`. Every one of them documents, in its own header comment, what it explicitly does *not* do — a pattern worth reading literally, since it reflects real separation of concerns in this codebase, not just style.

<CardGroup cols={2}>
  <Card title="HealthApi">`health()` → `GET /health`</Card>
  <Card title="ExecutionApi">`health()`, `execute(transaction)` → `POST /execute`</Card>
  <Card title="VerificationApi">`verify(id)` → `GET /verification/:id`</Card>
  <Card title="ReplayApi">`replay(id)` → `POST /replay`</Card>
  <Card title="ReceiptApi">`generate(id)` → `POST /receipt`</Card>
  <Card title="TransactionApi">`get(id)`, `list(page, pageSize)` → `GET /transactions[/:id]`</Card>
  <Card title="TrustRecordApi">`get(id)` → `GET /trust-records/:id`</Card>
  <Card title="PolicyApi">`validate(policy)` → `POST /policies/validate`</Card>
</CardGroup>

## ExecutionApi

`typescript/src/client/ExecutionApi.ts`. Duplicates `health()` (also on `HealthApi`) alongside `execute()`:

```ts theme={null}
class ExecutionApi {
  health(): Promise<unknown>;
  execute(transaction: BusinessTransaction): Promise<ExecutionTrustRecord>;
}
```

## VerificationApi

`typescript/src/client/VerificationApi.ts`. Exactly one method, and it's a read, not a trigger:

```ts theme={null}
class VerificationApi {
  verify(businessTransactionId: string): Promise<Verification>;
  // sends GET /verification/${businessTransactionId}
}
```

## ReplayApi

`typescript/src/client/ReplayApi.ts`:

```ts theme={null}
class ReplayApi {
  replay(businessTransactionId: string): Promise<ReplayResult>;
  // sends POST /replay
}
```

See [REST API → Replay](/docs/api/replay) for what this endpoint actually checks (a trust-record hash, not a re-run of policy evaluation).

## ReceiptApi

`typescript/src/client/ReceiptApi.ts`. Its header comment explicitly disclaims verification, execution, and replay — and true to that, it also has no method for reading back a previously generated Receipt:

```ts theme={null}
class ReceiptApi {
  generate(businessTransactionId: string): Promise<Receipt>;
  // sends POST /receipt — there is no get()/latest()
}
```

## TransactionApi

`typescript/src/client/TransactionApi.ts`:

```ts theme={null}
class TransactionApi {
  get(businessTransactionId: string): Promise<BusinessTransaction>;
  list(page?: number, pageSize?: number): Promise<BusinessTransaction[]>;
  // list() builds its own query string: /transactions?page=${page}&pageSize=${pageSize}
}
```

## TrustRecordApi

`typescript/src/client/TrustRecordApi.ts`:

```ts theme={null}
class TrustRecordApi {
  get(businessTransactionId: string): Promise<ExecutionTrustRecord>;
}
```

## PolicyApi

`typescript/src/client/PolicyApi.ts`. Defines its own `PolicyValidationResult` interface locally rather than importing one from `models/`:

```ts theme={null}
interface PolicyValidationResult {
  readonly valid: boolean;
  readonly errors: readonly string[];
}

class PolicyApi {
  validate(policy: Policy): Promise<PolicyValidationResult>;
  // Policy is imported from @parmana/policy, not typescript/src/models
}
```

<Warning>
  `PolicyApi`'s export is commented out of `typescript/src/index.ts` (`// export { PolicyApi } from "./client/PolicyApi.js";`), so it's not part of the package's public surface for standalone use — construct it yourself from `typescript/src/client/PolicyApi.ts` if you need it outside of `ParmanaClient.validatePolicy()`.
</Warning>

## HealthApi

`typescript/src/client/HealthApi.ts`:

```ts theme={null}
interface HealthStatus {
  readonly status: string;
  readonly version?: string;
  readonly timestamp?: string;
}

class HealthApi {
  health(): Promise<HealthStatus>;
}
```

<Note>
  `HealthStatus` models optional `version` and `timestamp` fields that the real `GET /health` handler never returns — see [REST API → System](/docs/api/system) for what the server actually sends back (`{ "status": "UP" }` only).
</Note>

## Related

<CardGroup cols={2}>
  <Card title="ParmanaClient" href="/docs/typescript-sdk/parmana-client">The facade composing all of these.</Card>
  <Card title="Models" href="/docs/typescript-sdk/models">Request/response types used above.</Card>
  <Card title="Errors" href="/docs/typescript-sdk/errors">What each of these throws on failure — and what they don't.</Card>
  <Card title="REST API" href="/docs/api/overview">The HTTP surface these classes wrap.</Card>
</CardGroup>
