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

# Orders & Takadas API

> Manage client orders and partial deliveries

## Client Orders

Client orders track jewelry orders with slip numbers, items, delivery dates, and making charges.

### `GET /client-orders`

Get all client orders. Supports filtering and pagination.

| Query Param | Type    | Description      |
| ----------- | ------- | ---------------- |
| `client_id` | integer | Filter by client |
| `page`      | integer | Page number      |
| `page_size` | integer | Results per page |

***

### `POST /client-order`

Create a new client order.

**Request Body**

```json theme={null}
{
  "client_id": 1,
  "slip_number": "SL-001",
  "date": "2025-01-15",
  "delivery_date": "2025-01-30",
  "items": [
    {
      "item_name": "Ring",
      "weight": 5.2,
      "making_charge": 500
    }
  ]
}
```

***

### `PUT /client-order/{order_id}`

Update an existing client order.

### `DELETE /client-order/{order_id}`

Delete a client order.

### `GET /client-orders/pdf`

Download all client orders as a PDF report. Supports same query filters as `GET /client-orders`.

***

## Takadas

Takadas are partial delivery records linked to client orders.

### `GET /takadas`

Get all takadas.

### `GET /takada/{takada_id}`

Get a specific takada.

### `POST /takada`

Create a takada.

**Request Body**

```json theme={null}
{
  "client_order_id": 1,
  "date": "2025-01-20",
  "items": [
    {
      "item_name": "Ring",
      "weight": 5.2,
      "karigar_id": 2
    }
  ]
}
```

### `PUT /takada/{takada_id}`

Update a takada.

### `DELETE /takada/{takada_id}`

Delete a takada.
