Files

96 lines
3.7 KiB
Markdown
Raw Permalink Normal View History

# Live export channels (Google Shopping / Meta / custom)
**When:** 2026-08-04T03:17+02:00
**Tenant:** Local Demo Co (`ee246275-dec0-4446-9e83-58d0c16c258a`)
**API:** http://127.0.0.1:8080
**Web:** http://127.0.0.1:5174/export-feeds
**Auth:** `Authorization: Bearer dk_demo_local_descrybe_test_key_v1`
## What shipped
Export Feeds create menu + dialog expose clear channel presets:
| Preset | Format | Purpose |
|--------|--------|---------|
| Google Shopping (CSV) | CSV | Merchant Center scheduled fetch |
| Google Shopping (XML) | XML (`g:*` elements) | Merchant Center XML feed |
| Meta catalog (CSV) | CSV | Meta Commerce Manager data feed |
| Custom CSV / XML | CSV or XML | Any partner / webhook |
UI copy explains where to paste the public URL (Merchant Center → Products → Feeds, or Meta Commerce Manager → Catalog → Data sources). Templates store `channel` (`google_shopping` | `meta` | `custom`) with field mappings.
**Aug-8:** Wrong extension on a valid public token → opaque **404** (was **400**). **BREAKING** for clients that branched on format-mismatch 400. Only the matching `.xml`/`.csv` URL is advertised.
## Live create + public curl (this run)
### Created feeds
| Name | ID | Token | Generate |
|------|-----|-------|----------|
| Google Shopping CSV (live) | `ae8bd969-4bff-4520-9572-bffda0ebc98a` | `c06f5f17afcf1f26a4295931947140ce` | **4328** products, `completed` |
| Google Shopping XML (live) | `799ba83a-6a7e-4e1d-b5de-c02182aacec5` | `9bf8905985e4c2bb2e5f6a0f89ddc1b6` | **4328** products, `completed` |
### Public URLs (no auth)
```text
http://127.0.0.1:8080/api/public/export-feeds/c06f5f17afcf1f26a4295931947140ce.csv
http://127.0.0.1:8080/api/public/export-feeds/9bf8905985e4c2bb2e5f6a0f89ddc1b6.xml
```
### curl results
| URL | HTTP | Content-Type | Size |
|-----|------|--------------|------|
| CSV | **200** | `text/csv; charset=utf-8` | ~9.1 MB |
| XML | **200** | `application/xml; charset=utf-8` | ~10.6 MB |
CSV header:
```csv
id,title,description,link,image_link,availability,price,brand,gtin,google_product_category,condition
```
XML sample (namespace elements preserved):
```xml
<?xml version="1.0" encoding="UTF-8"?>
<products feed="Google Shopping XML (live)">
<product>
<g:title>Sample Gadget</g:title>
<g:description>...</g:description>
<g:gtin>8700000000002</g:gtin>
<g:google_product_category>Gadgets</g:google_product_category>
</product>
...
```
## Reproduce
```powershell
$H = @{ Authorization = "Bearer dk_demo_local_descrybe_test_key_v1"; "Content-Type" = "application/json" }
$base = "http://127.0.0.1:8080"
# Create (template.channel + Google fields) → POST /api/v1/export-feeds
# Generate → POST /api/v1/export-feeds/{id}/generate
# Public → GET /api/public/export-feeds/{token}.csv|.xml
curl.exe -s -o NUL -w "CSV %{http_code}\n" "$base/api/public/export-feeds/c06f5f17afcf1f26a4295931947140ce.csv"
curl.exe -s -o NUL -w "XML %{http_code}\n" "$base/api/public/export-feeds/9bf8905985e4c2bb2e5f6a0f89ddc1b6.xml"
# Preview headers only (GET — HEAD returns 405):
curl.exe -s "$base/api/public/export-feeds/c06f5f17afcf1f26a4295931947140ce.csv" | Select-Object -First 2
curl.exe -s "$base/api/public/export-feeds/9bf8905985e4c2bb2e5f6a0f89ddc1b6.xml" | Select-Object -First 8
```
## UI path
1. Login as `demo@descrybe.local` / `DemoPass123!`
2. Open **Export Feeds**
3. **Create Export Feed** → pick Google Shopping / Meta / Custom
4. Save → **Refresh Feed****Copy** public URL
## Notes
- Missing store attributes (`link`, `price`, …) export as empty cells/elements until mapped on the product; Google/Meta still accept the feed shape.
- `gtin` / `ean` sources resolve from product attributes (not SKU/id).
- XML output keys may use a single namespace colon (`g:id`) for Merchant Center.