# Stock in one warehouse: no filter = whole warehouse (page / page_size; X-Stock-Version header for incremental sync); sku= one variant; product_code= all variants of a style

`GET /api/v1/warehouses/{warehouse_code}/stock` — Token required · stock:read · Full warehouse 60 pts (paged 5)

Warehouses & stock

## Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `warehouse_code` **required** | string | Warehouse code: AU (Australia, all warehouses — aggregate view), AUSYD2 (Sydney main, Rosehill), AUSYD1 (Sydney accessories), CN (China, all warehouses — aggregate view), CHNZJ1 (Zhenjiang). Full list: GET /api/v1/warehouses. |

## Query parameters

| Name | Type | Description |
| --- | --- | --- |
| `sku` | string | SKU / barcode — the **colour + size** level, e.g. OB0021611. For the whole style use product_code instead. (max length 64 · format ^[A-Za-z0-9_./-]+$) |
| `product_code` | string | Style code — **one style** (every colour / size variant), e.g. OB002. For a single variant use sku. When querying prices, several can be comma-separated. (max length 64 · format ^[A-Za-z0-9_./-]+$) |
| `page` | number | Page number, from 1 (optional). Whole-warehouse stock returns everything when omitted — 30,000+ rows, paging recommended. (min 1) |
| `page_size` | number | Rows per page (optional), max 2000. (1–2000) |

## Response

The envelope is decided by the HTTP status alone: 2xx with `{ data: … }` (lists also carry `page / page_size / has_more` or `total_count`); 4xx / 5xx with `{ error: { code, message, hint, request_id, doc_url } }`.

Response headers: `X-Stock-Version: 51218`

```json
{
  "data": [
    { "warehouse_code": "AU", "sku": "OB0021611", "product_code": "OB002",
      "product_name": "CLASSIC SHORT", "color_code": "CHE", "color_name": "Chestnut", "size": "7", "brand": "UGG",
      "quantity_on_hand": 17, "quantity_available": 14,
      "price_wholesale": 62.7, "price_retail": 79, "currency": "AUD" }
  ],
  "total_count": 31408
}
```

A success response carries no human-readable text — no `code / result / msg`. `error.code` is the only field your code should branch on; `message` follows `Accept-Language`.

> A full pull is about 7.2 MB and 60 points. **Use `/Changes` for day-to-day sync**; pull the full warehouse only the first time or when the cursor is stale (`full=true`).

## Examples

### curl

```bash
curl "https://connect.everugg.net.au/api/v1/warehouses/AU/stock?sku=OB0021611&product_code=OB002" \
  -H "Authorization: Bearer $TOKEN"
```

### Python

```python
import requests

r = requests.get(
    "https://connect.everugg.net.au/api/v1/warehouses/AU/stock?sku=OB0021611&product_code=OB002",
    headers={"Authorization": "Bearer " + TOKEN},
)
data = r.json()
r.raise_for_status()  # 4xx/5xx: data["error"]["code"] / ["hint"]
```

### Node

```js
const res = await fetch("https://connect.everugg.net.au/api/v1/warehouses/AU/stock?sku=OB0021611&product_code=OB002", {
  headers: { Authorization: `Bearer ${TOKEN}` },
})
const data = await res.json()
if (!res.ok) throw new Error(`${data.error?.code}: ${data.error?.message}`)
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://connect.everugg.net.au/api/v1/warehouses/AU/stock?sku=OB0021611&product_code=OB002"))
    .header("Authorization", "Bearer " + token)
    .GET()
    .build();
HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
```

---
Markdown source: https://connect.everugg.net.au/reference/get-api-v1-warehouses-warehouse-code-stock.md?lang=en · Web page: https://connect.everugg.net.au/reference?op=get-api-v1-warehouses-warehouse-code-stock&lang=en
