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#
Path A
REST API →
Five read-only HTTP endpoints with JSON responses, page-based pagination and date filters.
Path BDirect database →
A read-only PostgreSQL role through the transaction pooler, for full SQL flexibility.
Which should I use?#
| REST API | Direct PostgreSQL | |
|---|---|---|
| Setup | An HTTP client and an API key | A Postgres driver and a connection string |
| Query flexibility | Fixed endpoints and filters | Full SQL (joins, aggregates, windows) |
| Access | 5 resources | Read-only role, orders and order_items only |
| Limits | Rate-limited; max 1000 rows per page | 60 second statement timeout |
| Best for | Most integrations and getting started quickly | Incremental / 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_atvsupdated_atmatters. - Pagination — zero-indexed pages of up to 1000 rows.
- Known limitations — no change history and no delete tracking.
Available data
| Resource | REST API | Direct DB (student_ro) |
|---|---|---|
orders | Yes | SELECT |
order_items | Yes | SELECT |
shipments | Yes | No access |
products | Yes | No access |
users | Yes | No access |
© 2026 StyleHub · Developer Platform