# Product XML feed

> Get supplier products at a single XML URL: variants, barcodes, size/colour, cost and sale price, stock and images. Streamed fresh on every request.

Get every active product in your plan from one URL with a standard XML schema. The feed is streamed from live data on every request; there is no file to generate.

## Crawling supplier sites

### Scheduled crawling

- What it does: Each supplier site is crawled automatically on its own interval; the default is 4 hours.
- How it works: The scheduler starts due sites every minute. An interrupted crawl resumes where it stopped when the service restarts.
- Problem solved: Price or stock changes reaching the feed late.
- Technical detail: Interval, concurrency and request delay are configurable per site; every crawl is listed with duration and changed product count.

### Price history

- What it does: When a cost price changes, old and new price, direction and time are recorded.
- How it works: If a price difference is detected during a crawl or live check, a price history row is added.
- Problem solved: Selling with an old margin after a supplier price increase.
- Technical detail: Per-product price history chart and a 'Price monitoring' screen of recent changes.

## Field mapping

Each product in the feed carries the fields below. Empty fields are omitted.

| XML field | Description |
| --- | --- |
| product@id | Giyimport product ID (UUID) — stable |
| title, brand | Product name and brand |
| category, categoryPath | Category and full category path on the source site |
| barcode | Product barcode |
| variants/variant | type (e.g. size), value, barcode, stock, price, image |
| color, groupKey | Colour and the group key that ties colours of the same model |
| costPrice, listPrice | Price on the source site (your cost) and list price |
| salePrice | Suggested sale price computed by pricing rules |
| vatRate, currency | VAT rate (if available at source) and currency |
| stock, inStock | Total stock and stock status |
| images/image | Ordered image URLs (hosted on Giyimport servers) |
| attributes/attribute | Attributes such as fabric, fit, collar type |
| description | Product description (CDATA) |
| updatedAt | Last crawl time (ISO 8601) |

## Sample XML

A shortened product record (sample data):

```xml
<?xml version="1.0" encoding="UTF-8"?>
<catalog generator="giyimport" generatedAt="2026-11-07T09:00:00.000Z" version="1">
<products>
<product id="8f1c2d3e-…">
  <title>Sample Linen Shirt</title>
  <brand>Sample Brand</brand>
  <category>Shirt</category>
  <barcode>8690000000017</barcode>
  <costPrice>450</costPrice>
  <salePrice>799.9</salePrice>
  <currency>TRY</currency>
  <stock>24</stock>
  <inStock>true</inStock>
  <variants>
    <variant><type>Size</type><value>S</value><barcode>8690000000024</barcode><stock>8</stock></variant>
    <variant><type>Size</type><value>M</value><barcode>8690000000031</barcode><stock>16</stock></variant>
  </variants>
</product>
</products>
<count>1</count>
</catalog>
```

## Access, formats and freshness

| Topic | Detail |
| --- | --- |
| URL | https://api.giyimport.com/api/v1/feed.xml |
| Authentication | x-api-key header or Authorization: Bearer; ?key= query parameter accepted on the feed URL only |
| Formats | XML (feed), JSON (paginated product API) |
| Filters | supplier, category, changedSince (ISO date) |
| Scope | Active products only; in trial and product-limited plans, products from your selected categories |
| Freshness | Generated from live data on each request; source data refreshes on the crawl interval (default 4 h) |
| Caching | Response may be cached by the client for 5 minutes (Cache-Control: private, max-age=300) |

## Errors and warnings

### Passive products stay out

- What it does: Out-of-stock, manually blocked or image-pending products become passive automatically.
- How it works: The active rule is evaluated in the database on each query; passive products do not appear in XML or API.
- Problem solved: Unsellable products remaining live in your store.
- Technical detail: Rule: in stock && not blocked && (not placeholder-image under the site rule).

### Crawl and system logs

- What it does: Each crawl result, error and warning is visible in the 'Logs' and 'Crawls' screens.
- How it works: Crawler, image sync and scheduler events are written as structured logs.
- Problem solved: Not knowing why a product is missing from the feed.
- Technical detail: A 24-hour error/warning summary appears on the dashboard 'System' card.
