API v1

Overview

StyleHub Developer Docs

StyleHub is an e-commerce data platform built for integration. Pull orders, order items, products, users and shipments into your own pipelines using a REST API or a direct PostgreSQL connection.

Two ways to integrate#

Which should I use?#

REST APIDirect PostgreSQL
SetupAn HTTP client and an API keyA Postgres driver and a connection string
Query flexibilityFixed endpoints and filtersFull SQL (joins, aggregates, windows)
Access5 resourcesRead-only role, orders and order_items only
LimitsRate-limited; max 1000 rows per page60 second statement timeout
Best forMost integrations and getting started quicklyIncremental / CDC-style ingestion with custom SQL

Rule of thumb

Start with the REST API. Reach for a direct connection when you need SQL you can't express with endpoint filters — typically incremental loads driven by updated_at.

Make your first request#

Get your key from GET /stylehub-api-keys (see Authentication). Every other endpoint requires it as a Bearer token, plus at least one date filter. This call fetches orders updated since March 1st:

cURL
curl -s "https://xqqpbuhqvbbgyevwmktp.supabase.co/functions/v1/stylehub-orders?updated_from=2026-03-01" \
  -H "Authorization: Bearer stylehub_fsUPPpnCdz44Ld5fPQSfP0sTA3JaAjYn"

Concepts to know first#

  • Date filtering — every request needs at least one date parameter, and created_at vs updated_at matters.
  • Pagination — zero-indexed pages of up to 1000 rows.
  • Known limitations — no change history and no delete tracking.

Available data

ResourceREST APIDirect DB (student_ro)
ordersYesSELECT
order_itemsYesSELECT
shipmentsYesNo access
productsYesNo access
usersYesNo access

© 2026 StyleHub · Developer Platform