Developers
Everything on GleBon is JSON-driven through https://glebon.shop/api/… — the same BFF pattern shoppin.app uses (Next.js route handlers). No auth needed while in demo.
API reference 25 routes
| Method | Route | Params | What it does | |
|---|---|---|---|---|
| GET | /api/v1/trending-feed |
q?, limit? | Homepage/feed of looks — 12 shuffled styles | try ↗ |
| GET | /api/v1/trending-feed-v2 |
q?, limit? | V2 feed — same payload, ranked by biggest discount first | try ↗ |
| GET | /api/v1/visual-search |
name | Image/“find similar” search — 4 visually-closest products (token-embedding stand-in) | try ↗ |
| GET | /api/v1/exact-match |
q | “Find this exact item” — full name equality | try ↗ |
| GET | /api/v1/get_query_suggestions |
q | Search autocomplete — up to 6 product names | try ↗ |
| GET | /api/v1/categories |
— | Category tree with live product counts | try ↗ |
| GET | /api/v1/query-curations |
— | Curated edits (denim, satin, corset, floral…) built from live queries | try ↗ |
| GET | /api/v1/get_flatlay_products |
category?, q?, sort?, page?, limit? | The full 44,218-product catalogue — paginated, filterable, sortable | try ↗ |
| GET+POST | /api/v1/wardrobes |
add | remove (id) | Saved-items closet, session-backed | try ↗ |
| GET | /api/v1/wardrobes-light |
— | Lightweight wardrobe (id + name only) | try ↗ |
| GET | /api/v1/fx |
— | Live USD FX rates (open.er-api.com) with cache + fallback — powers the currency switcher | try ↗ |
| GET | /api/v1/geo |
— | Region guess → default currency (server-side ipapi.co) | try ↗ |
| GET | /api/v2/flatlay/flatlays |
id | Single flat-lay product record | try ↗ |
| GET | /api/v2/flatlay/lookup |
name | Lookup a product by exact name | try ↗ |
| GET | /api/v2/flatlay/size-chart |
— | Generic garment size chart | try ↗ |
| POST | /api/v2/flatlay/generate |
id | name | On-demand flat-lay generation — gpt-image-1 when keyed, demo replay otherwise | |
| GET+POST | /api/v2/flatlay/ratings |
product_id, stars | Engagement: rate products 1–5, averages computed live | try ↗ |
| GET | /api/v2/flatlay/recently-viewed |
— | Personalization: this session’s recently viewed items | try ↗ |
| GET | /api/v2/get_image_suggestions |
— | Pinterest-style look suggestions (8 random images) | try ↗ |
| GET | /api/v2/recommendation |
name | “You may also like” — top-3 similar products | try ↗ |
| POST | /api/v2/virtual-try-on |
personDataURL, garmentURL, garmentName? | Virtual try-on — hosted IDM-VTON with a REPLICATE token, overlay composite in demo | |
| POST | /api/v2/image-chat |
message | Chat-with-an-image assistant that searches the catalogue as it answers | |
| GET | /api/v2/testimonials |
— | Social proof for landing sections | try ↗ |
| POST | /api/v2/validate-images |
urls[] | Content QC — HEAD-probes each URL, returns content-type/size/ok | |
| GET | /api/metadata-hash |
— | Deployment hash for cache busting | try ↗ |
Quick start (curl)
# 12 trending styles
curl -s https://glebon.shop/api/v1/trending-feed | json_pp
# paginate the 44,218-product catalogue, cheapest satin first
curl -s "https://glebon.shop/api/v1/get_flatlay_products?q=satin&sort=lo&limit=10&page=1" | json_pp
# search autocomplete
curl -s "https://glebon.shop/api/v1/get_query_suggestions?q=corset" | json_pp
# virtual try-on (demo composite)
curl -s -X POST https://glebon.shop/api/v2/virtual-try-on \
-H 'Content-Type: application/json' \
-d '{"personDataURL":"data:image/png;base64,iVBOR…","garmentURL":"https://d2fx8asl4640v1.cloudfront.net/i/…"}' | json_pp
# live FX powering the currency switcher
curl -s https://glebon.shop/api/v1/fx | json_pp
Integrations 4 LIVE 14 DEMO
Server-side status — blank key in config.php keeps a service in demo; adding the key flips it live.
| # | Service | Mode | Status |
|---|---|---|---|
| 1 | Pinterest (look sourcing) Content · Product-style images / look feed |
DEMO | catalogue itself is Pinterest-sourced (pinterest_scraper pipeline) — set token for board pulls |
| 2 | OpenAI Images (flat-lay gen) Content · AI product photography (gpt-image-1) |
DEMO | demo replay in AI Studio — set OPENAI_API_KEY for real gpt-image-1 calls |
| 3 | Virtual Try-On (VTON) Content · Try garments on a customer photo |
DEMO | CSS-overlay composite engine — set REPLICATE_API_TOKEN for hosted IDM-VTON |
| 4 | GleBon Backend API Content · /api/v1 & /api/v2 routes (trending, visual-search, recs…) |
LIVE | 25 JSON routes active on this server (MySQL/SQLite-backed) |
| 5 | PayPal Payments · Smart Buttons checkout |
DEMO | demo — paste sandbox client-id for real Smart Buttons |
| 6 | Razorpay Payments · UPI / cards checkout (India) |
DEMO | checkout.js wired — demo payment until rzp_test key is set |
| 7 | Stripe Payments · Card / wallet payments |
DEMO | demo — paste pk_test; charging needs a server-made Session |
| 8 | PostHog Analytics · Product analytics + session replay |
DEMO | demo — events logged server-side; set key to send |
| 9 | Meta Pixel Analytics · Ad tracking & retargeting |
DEMO | demo — set pixelId to fire for real |
| 10 | Google Tag Manager / Ads Analytics · Tags, conversions, Ads label |
DEMO | demo — set GTM-XXXXXXX to load the container |
| 11 | VigLink (Sovrn) Analytics · Affiliate monetization of outbound links |
DEMO | demo — set Sovrn key to monetize outbound links |
| 12 | AWS CloudFront Infra · Image CDN + on-the-fly resize |
LIVE | 44,218 images — HTTP 400 on live HEAD probe — serves all product images (?width=&format=auto transforms) |
| 13 | AWS S3 (us-west-2) Infra · Origin asset storage |
LIVE | category tiles + product masters served from S3-backed storage (read) |
| 14 | Sentry Infra · Error monitoring |
DEMO | demo — errors logged locally; set DSN to report |
| 15 | Crisp + Intercom Infra · Customer support chat |
DEMO | demo chat button — set Crisp / Intercom ids to launch |
| 16 | Firebase Infra · Auth / app backend |
DEMO | demo — paste Firebase config for anonymous auth |
| 17 | ipify (IP lookup) Infra · Region-aware greeting |
LIVE | real call api64.ipify.org from the browser on every page (see console) |
| 18 | locize (i18n) Infra · EN/हिंदी UI translations |
DEMO | local mode — built-in EN/हिंदी dictionaries; set projectId for locize cloud |