# GET /api/v1/inventory/supply-chain

> Get inventory supply chain map

- **Tag:** inventory:supply_chain
- **Operation ID:** `get_supply_chain_map_api_v1_inventory_supply_chain_get`

## Description

Return a single payload of nodes (locations with on-hand + alerts) and edges (open POs + in-transit transfers) for the Supply Chain Map.

## Authentication

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

## Responses

### 200 — Successful Response

Schema: `SupplyChainResponse`

- `nodes` (array · SupplyChainNode) → `SupplyChainNode`
  - `id` (string · required) — Location ID.
  - `name` (string · required) — Display name of the location.
  - `code` (string) — Short code (e.g. 'WH1').
  - `location_type` (string · required) — LocationTypeEnum value.
  - `is_default` (boolean) — Whether this is the business default location.
  - `city` (string) — City for layout grouping.
  - `state` (string) — State/region for layout grouping.
  - `on_hand_units` (number) — Total units on hand at this location across all variants.
  - `on_hand_value_cents` (integer) — Total value of on-hand inventory at this location, in cents.
  - `open_po_count` (integer) — POs with this location as ship_from or ship_to and a non-terminal status.
  - `low_stock_count` (integer) — Variants at this location whose available <= reorder_point.
  - `vendor_id` (string) — Vendor whose default_location_id points here, if any.
- `edges` (array · SupplyChainEdge) → `SupplyChainEdge`
  - `id` (string · required) — Underlying PO or Transfer ID.
  - `kind` (string · required) — 'purchase_order' or 'transfer'.
  - `from_location_id` (string) — Source location ID.
  - `to_location_id` (string) — Destination location ID.
  - `label` (string) — Human-readable label (e.g. 'PO-123' or 'TRF-456').
  - `status` (string · required) — Current status of the PO or transfer.
  - `total_cents` (integer) — PO total (for PO edges) in cents. None for transfers.
  - `expected_arrival_date` (string · date-time) — When goods are expected to arrive.
- `generated_at` (string · date-time · required) — Server time the payload was computed.

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 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 GET 'https://api.ondayzero.com/api/v1/inventory/supply-chain' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/inventory/supply-chain', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

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

response = httpx.get("https://api.ondayzero.com/api/v1/inventory/supply-chain", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/inventory-supply-chain/get-supply-chain-map
- OpenAPI slice: https://www.ondayzero.com/docs/reference/inventory-supply-chain/get-supply-chain-map/openapi.json
- Other endpoints in **inventory:supply_chain**: https://www.ondayzero.com/docs/reference/inventory-supply-chain
