# POST /api/v1/inventory/reorder/cash-impact

> Preview the cash impact of a reorder

- **Tag:** inventory:reorder
- **Operation ID:** `reorder_cash_impact_api_v1_inventory_reorder_cash_impact_post`

## Description

Model the effect of placing one or more (not-yet-created) purchase orders on the 13-week cash forecast. Runs the live forecast with and without the proposed POs and returns the delta -- including how far the projected cash low point moves -- so the operator can see the cash impact of a reorder before committing to it.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Request body

Schema: `ReorderCashImpactRequest`

- `proposed_pos` (array · ProposedPurchaseOrder) → `ProposedPurchaseOrder`
  - `amount_cents` (integer · required) — Total PO cost in cents.
  - `week_number` (integer) — Forecast week the cash leaves (1-indexed). Default 1.
  - `expected_pay_date` (string) — ISO date the cash leaves (overrides week_number).
  - `variant_id` (string)
  - `label` (string)
- `weeks` (integer)

## Responses

### 201 — Successful Response

Schema: `ReorderCashImpactResponse`

- `proposed_total_cents` (integer)
- `proposed_po_count` (integer)
- `weeks` (integer)
- `baseline_ending_cash_cents` (integer)
- `scenario_ending_cash_cents` (integer)
- `ending_cash_delta_cents` (integer)
- `baseline_lowest_cash_cents` (integer)
- `scenario_lowest_cash_cents` (integer)
- `lowest_cash_delta_cents` (integer)
- `baseline_lowest_cash_week` (integer)
- `scenario_lowest_cash_week` (integer)
- `week_deltas` (array · ReorderCashImpactWeekDelta) → `ReorderCashImpactWeekDelta`
  - `week` (integer · required)
  - `start_date` (string · required)
  - `baseline_ending_cash_cents` (integer · required)
  - `scenario_ending_cash_cents` (integer · required)
  - `delta_cents` (integer · required)
- `headline` (string)

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/inventory/reorder/cash-impact' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "proposed_pos": [],
  "weeks": 0
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/inventory/reorder/cash-impact', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "proposed_pos": [],
  "weeks": 0
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "proposed_pos": [],
  "weeks": 0
}

response = httpx.post("https://api.ondayzero.com/api/v1/inventory/reorder/cash-impact", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/inventory-reorder/reorder-cash-impact
- OpenAPI slice: https://www.ondayzero.com/docs/reference/inventory-reorder/reorder-cash-impact/openapi.json
- Other endpoints in **inventory:reorder**: https://www.ondayzero.com/docs/reference/inventory-reorder
