← back to Greenland Onboard

README.md

35 lines

# Greenland Wallcoverings — onboarding

Vendor: **Greenland** (greenlandwallcoverings.com). Feed-first crack of the Vue SPA's
open JSON API at `api.greenlandwallcoverings.com/api`.

- Category tree: `GET /api/category/index`
- Product list:  `GET /api/product/page?categoryId=<tab>&subCategoryIds=<leaf,leaf>&page=&pageSize=`
- Product detail:`GET /api/product/<ID>`
- Images:        `GET /api/downloadFile?fileName=...`

Cork line = Wallcovering(1) > Crafted(14) > Handmade(33) > **Cork(40)** = 100 SKUs.
GOTCHA: `name`/`code` fields are inconsistently swapped (SKU vs color name) per-record — normalized by regex.

Staging table: `greenland_catalog` in dw_unified. Shopify push is GATED.

## Internal employee tool (this repo's server)
`greenland.internal.designerwallcoverings.com` — an INTERNAL, basic-auth (`admin / DW2024!`)
cork-line lookup tool. Employees look up a `Cork-<n>` SKU and see specs + stock + pricing
(retail / net-cost / discount / margin) without leaving the page. Private-label brand is
**Phillipe Romano**; "Greenland" appears only here (auth-gated internal), never customer-facing.

- Run: `node server.js` → http://127.0.0.1:9973 (zero-dependency, built-in http).
- Data: `public/viewer.json` = merge of `greenland_catalog` + `data/enriched-cork.json`
  (hex/hue/city/tags) + `shopify_products` mirror (handle/id/status). Regenerate:
  `bash scripts/refresh-viewer.sh` (or `node scripts/build-viewer-snapshot.mjs`) — $0 local;
  server hot-reloads within 5s.
- Endpoints: `/healthz` (unauthed) · `/api/products` · `/api/product/:sku` ·
  `/api/stock/:sku` (live $0 open-API re-check of published/availability, no metered scrape).
- Images ALWAYS local (`public/img/*.jpg`), never hotlinked.
- Pricing reality: retail **$59.50/yd** (6-yd increments) is canonical; **net cost + trade
  discount are unconfirmed** (Greenland wholesale not supplied; vendor_registry discount unset)
  → shown honestly as "unconfirmed", margin computes automatically once a cost lands. These
  internal-only figures must NEVER appear on a customer-facing surface.
- Deploy/DNS is GATED → see `~/.claude/yolo-queue/pending-approval/greenland-internal-viewer-deploy.md`.