# Trendyol integration

> Connect your Trendyol store: barcode matching, bulk stock and price updates, order package import and encrypted recipient data.

Connect your Trendyol seller account with your API credentials. Approved products are matched to the Giyimport pool by barcode; stock and price are updated from the pool and orders are imported into the panel.

## Supported operations

| Operation | Support | How |
| --- | --- | --- |
| Product matching | ✓ | Approved product list matched to the pool by barcode |
| Stock update | ✓ | Bulk price-and-inventory request, up to 1,000 items per request |
| Price update | ✓ | Optional; pricing rule + per-store extra percentage/fixed amount |
| Order import | ✓ | Order packages by last modified date; lines and totals |
| Recipient data | ✓ | Name, phone, email, delivery address — stored encrypted with AES-256-GCM |
| Zero stock for sold-out items | ✓ | 0 is pushed for products passive at the source |

## Connecting a store

1. **Get API credentials** — In the Trendyol seller panel, copy your seller ID, API key and API secret from Account > Integration Information.
2. **Connect in the panel** — In Giyimport go to Marketplaces > Connect store, choose Trendyol and enter the credentials; they are stored encrypted.
3. **Match products** — 'Match products' links your approved products by barcode; unmatched barcodes are listed separately.
4. **Keep sync on** — Stock and order sync run automatically on your chosen interval; each run is logged.

## Technical details

- Authentication: Basic (API key:API secret) and the seller ID in the User-Agent header.
- Up to 3 retries with exponential back-off on 429 and 5xx; 30-second timeout.
- Order window starts from the last successful pull (at most 14 days back).
- Removing a store connection deletes its listings, orders and encrypted recipient data.
