# Build a product feed (Google Merchant spec — this is also the bulk export): produces csv / xml / json in one go and stores them for scheduled fetch

`GET /api/v1/feeds/products` — Token required · product:read · 1 pt

Feeds

Build a product feed (Google Merchant spec — this is also the bulk export): produces csv / xml / json in one go and stores them for scheduled fetch. Requires an OMS account login: only an OMS session can return YOUR channel price, and a feed built from the master price would have you selling at the wrong price.

## Query 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. |
| `format` | string | csv（默认）/ xml / json (max length 8) |
| `link_template` | string | 你站上的商品页地址模板，里面用 {product_code} 或 {sku} 占位，我们替你拼。**不给就不出 link**，而 link 是必填项 (max length 300) |
| `image_base` | string | 图片链接的绝对前缀。不给用服务端配置。**必须走加密链接（TLS）**，明文图片链接各平台基本都会拒 (max length 200) |
| `rebuild` | boolean | 强制重拼。**不会再给你旧的那份** —— 回 202，拼好了再来取 |

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

```json
{
  "data": [ … ],
  "total_count": 12
}
```

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

## Examples

### curl

```bash
curl "https://connect.everugg.net.au/api/v1/feeds/products?warehouse_code=AU" \
  -H "Authorization: Bearer $TOKEN"
```

### Python

```python
import requests

r = requests.get(
    "https://connect.everugg.net.au/api/v1/feeds/products?warehouse_code=AU",
    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/feeds/products?warehouse_code=AU", {
  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/feeds/products?warehouse_code=AU"))
    .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-feeds-products.md?lang=en · Web page: https://connect.everugg.net.au/reference?op=get-api-v1-feeds-products&lang=en
