# Sales API October 2026 live-data samples

These values were returned by read-only GET requests to the connected Oracle
database for October 2026. To keep the examples compact, list responses show
one representative row; summaries and totals are from the actual responses.

## Paani

### `GET /sales_paani_dashboard.php?year=2026&month=10`

```json
{
  "error": 0,
  "error_msg": "Monthly sales dashboard retrieved successfully",
  "data": {
    "kpis": {
      "sales_amount": 125485,
      "sales_quantity": 943,
      "sale_amount": 125795,
      "return_amount": -310,
      "order_count": 239
    },
    "client_type_comparison": {
      "internal": {"sales_amount": 13785},
      "external": {"sales_amount": 111700}
    },
    "top_salespersons": [
      {"id": "70", "name": "AHMAD.USMANI", "sales_amount": 125485, "sales_quantity": 943}
    ],
    "top_clients": [
      {"id": "CUS-0245", "name": "CARREFOUR (CANAL ROAD)", "sales_amount": 10875, "sales_quantity": 87}
    ],
    "top_skus": [
      {"id": "1828", "name": "WATER BOTTLE 19L(PAANI76)", "sales_amount": 108425, "sales_quantity": 795}
    ]
  }
}
```

### `GET /sales_paani_client_ledger.php?grain=month&year=2026&month=10&months=1&per_page=1`

```json
{
  "error": 0,
  "error_msg": "Client ledger retrieved successfully",
  "data": [{
    "client_id": "CUS-0592",
    "client_name": " SYED ZAHID HUSSAIN- BAHARE MADINA",
    "client_type": "EXTERNAL",
    "client_status": 1,
    "orderbooker_id": null,
    "orderbooker_name": "Unassigned",
    "salesperson_id": null,
    "rows": [{
      "period": "2026-10",
      "sales_amount": 900,
      "sales_quantity": 5,
      "return_amount": 0,
      "order_count": 3
    }]
  }],
  "summary": {
    "total_clients": 82,
    "sales_amount": 125485,
    "sales_quantity": 943,
    "return_amount": -310
  },
  "meta": {"current_page": 1, "per_page": 1, "total": 82, "last_page": 82}
}
```

### `GET /sales_paani_internal_clients.php?year=2026&month=10&per_page=1`

```json
{
  "error": 0,
  "error_msg": "Internal-client sales report retrieved successfully",
  "data": [{
    "client_id": "CUS-0664",
    "client_name": "MTM PEACOCK SATIYANA ROAD",
    "client_status": 1,
    "sales_amount": 9765,
    "sales_quantity": 63,
    "gross_sales_amount": 9765,
    "discount_amount": 0,
    "tax_amount": 0,
    "sale_amount": 9765,
    "return_amount": 0,
    "order_count": 8
  }],
  "summary": {"total_clients": 7, "sales_amount": 13785, "sales_quantity": 170}
}
```

### `GET /sales_paani_external_bookers.php?year=2026&month=10&per_page=1`

```json
{
  "error": 0,
  "error_msg": "External-client sales report retrieved successfully",
  "data": [{
    "client_id": "CUS-0245",
    "client_name": "CARREFOUR (CANAL ROAD)",
    "client_status": 1,
    "orderbooker_id": "41",
    "orderbooker_name": "USAMA",
    "sales_amount": 10875,
    "sales_quantity": 87,
    "order_count": 4
  }],
  "order_bookers": [{
    "orderbooker_id": null,
    "orderbooker_name": "Unassigned",
    "client_count": 60,
    "sales_amount": 85535,
    "sales_quantity": 601,
    "order_count": 180
  }],
  "summary": {"total_clients": 75, "sales_amount": 111700, "sales_quantity": 773}
}
```

### `GET /sales_paani_client_skus.php?client_id=CUS-0245&year=2026&month=10`

```json
{
  "error": 0,
  "error_msg": "Client SKU sales report retrieved successfully",
  "client": {
    "client_id": "CUS-0245",
    "client_name": "CARREFOUR (CANAL ROAD)",
    "client_type": "EXTERNAL"
  },
  "data": [{
    "sku": "1828",
    "product_name": "WATER BOTTLE 19L(PAANI76)",
    "sales_amount": 10875,
    "sales_quantity": 87,
    "order_count": 4
  }],
  "summary": {"total_skus": 1, "sales_amount": 10875, "sales_quantity": 87}
}
```

### `GET /sales_paani_salespersons.php?year=2026&month=10&per_page=1`

```json
{
  "error": 0,
  "error_msg": "Salesperson performance retrieved successfully",
  "data": [{
    "salesperson_id": 70,
    "employee_code": "216",
    "salesperson_name": "AHMAD USMANI",
    "department": "Sales",
    "linked_orderbooker_id": null,
    "sales_group": "SALE",
    "user_status": "A",
    "sales_amount": 125485,
    "sales_quantity": 943,
    "client_coverage": 82,
    "order_count": 239,
    "target_amount": null,
    "target_available": false
  }],
  "summary": {"total_salespersons": 1, "sales_amount": 125485, "order_count": 239}
}
```

### `GET /sales_paani_directory.php?year=2026&month=10`

```json
{
  "error": 0,
  "error_msg": "Directory retrieved successfully",
  "data": {
    "salespersons": [{
      "salesperson_id": 70,
      "employee_code": "216",
      "salesperson_name": "AHMAD USMANI",
      "department": "Sales",
      "sales_group": "SALE",
      "user_status": "A",
      "linked_orderbooker_id": null
    }],
    "order_bookers": [{
      "orderbooker_id": "151",
      "orderbooker_name": "UMAR ARIF",
      "client_count": 11,
      "is_active": true,
      "linked_user_id": 45
    }]
  }
}
```

## Corporate Canteen (CC)

The scoped October 2026 responses were empty for CC: the dashboard sales
amount was `0`; the client ledger, internal-client report, external-client
report, salesperson report, and directory returned empty lists and zero
summaries. The CC client-SKU endpoint returned `404 Client not found` when
passed the Paani client above, as expected for a client outside CC's scope.

This follows the specified department-plus-group rule. The connected Oracle
data currently has no `CCSALE` users linked to an employee in the `SALES`
department; see the live-data note in
[Sales_Reports_API_Documentation.md](./Sales_Reports_API_Documentation.md).
