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

# Clients API

> Manage client accounts and ledgers

Clients are customers who place jewelry orders. Their ledger tracks cash and crystal (jewelry items) balances.

***

## `GET /clients`

Get all clients.

***

## `POST /client`

Create a new client.

**Request Body**

```json theme={null}
{ "name": "Priya Sharma" }
```

***

## `PUT /client/{client_id}`

Update a client's name.

***

## `DELETE /client/{client_id}`

Delete a client and all related ledger and order data.

***

## `GET /client-ledger/{client_id}`

Get the full ledger for a client.

***

## `POST /client-ledger/{client_id}`

Add a ledger row.

***

## `PUT /client-ledger/{client_id}`

Update an existing client ledger row.

***

## `GET /client-ledger/{client_id}/pdf/{side}`

Download client ledger as PDF.

| Parameter   | Type    | Values      |
| ----------- | ------- | ----------- |
| `client_id` | integer | —           |
| `side`      | string  | `in`, `out` |
