Base URL
| Environment | URL |
|---|---|
| Production | https://stackfront-api-latest.onrender.com |
Authentication
Authentication depends on who is calling:SDK Endpoints (mobile app → Stackfront API)
X-SDK-Key: sf_mch_xxx
X-Shop-Domain: mystore.myshopify.com
X-Shop-Domain must match the store the key was issued for. See Getting your API key.
Merchant Endpoints (Shopify admin → Stackfront API)
Authenticated via Shopify session OAuth token (handled automatically by the Shopify app).Content-Type
All requests and responses useapplication/json.
Errors
Standard error response format:{
"message": "Human-readable error description"
}
| Code | Meaning |
|---|---|
200 | Success |
400 | Bad request (validation error) |
401 | Unauthorized (missing or invalid auth) |
403 | Forbidden (feature not enabled or merchant plan limit hit) |
404 | Not found |
422 | Unprocessable entity (business rule violation) |
429 | Rate limited |
500 | Internal server error |
Rate Limits
| Endpoint Group | Limit |
|---|---|
SDK endpoints (/api/v1/sdk/*, incl. config) | 300 requests/minute per merchant API key (per-key configurable) |
| SDK events | 1000 events/minute per merchant, in addition to the per-key request limit above |
Pagination
List endpoints usepage and pageSize query parameters:
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number (1-indexed) |
pageSize | 20 | Items per page |
Endpoints
SDK Configuration
| Method | Path | Description |
|---|---|---|
GET | /api/v1/sdk/config | Fetch SDK configuration (feature flags, storefront token, etc.) |
SDK Push Notifications
| Method | Path | Description |
|---|---|---|
POST | /api/v1/sdk/devices/register | Register a device for push notifications |
POST | /api/v1/sdk/devices/unsubscribe | Unsubscribe a device from push |
POST | /api/v1/sdk/devices/link-customer | Link a device to a customer account |
GET | /api/v1/sdk/notifications/preferences | Get notification preferences |
PUT | /api/v1/sdk/notifications/preferences | Update notification preferences |
POST | /api/v1/sdk/notifications/track-open | Track a push notification open |
SDK Events & Analytics
| Method | Path | Description |
|---|---|---|
POST | /api/v1/sdk/events | Track an analytics event |
SDK Social Proof
| Method | Path | Description |
|---|---|---|
POST | /api/v1/sdk/social-proof/product-view | Track a product view |
GET | /api/v1/sdk/social-proof/product/{productId} | Get social proof data for a product |
SDK Stories
| Method | Path | Description |
|---|---|---|
GET | /api/v1/sdk/stories | Get active story groups with stories |
POST | /api/v1/sdk/stories/viewed | Mark a story as viewed |
POST | /api/v1/sdk/stories/tapped | Track a story tap |
POST | /api/v1/sdk/stories/poll-response | Submit a story poll response |
SDK Integrations
| Method | Path | Description |
|---|---|---|
GET | /api/v1/sdk/integrations/{slug}/{dataType} | Get integration data. Accepts an optional entityId query parameter (for Judge.me, the numeric Shopify product id). Returns 422 when the integration is not connected and 503 when no unexpired cache exists |
Merchant Auth
| Method | Path | Description |
|---|---|---|
GET | /auth/shopify | Initiate Shopify OAuth |
GET | /auth/shopify/callback | Shopify OAuth callback |
Merchant Status & Setup
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/status | Get merchant setup status |
POST | /api/v1/merchants/me/register | Complete merchant registration |
POST | /api/v1/merchants/me/storefront-token | Save Shopify Storefront API token |
POST | /api/v1/merchants/me/reprovision | Re-run provisioning |
GET | /api/v1/merchants/me/api-key | List merchant API keys (plaintext included) |
POST | /api/v1/merchants/me/api-key/rotate | Rotate the API key (previous key stays valid 7 days) |
Merchant Billing
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/plans | List available merchant plans |
GET | /api/v1/merchants/me/plans/summary | Get plan summary |
GET | /api/v1/merchants/me/billing/status | Get billing status |
POST | /api/v1/merchants/me/billing/upgrade | Upgrade merchant plan |
GET | /billing/confirm | Billing confirmation callback |
Merchant Branding & Content
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/home-layout | Get home layout |
PUT | /api/v1/merchants/me/home-layout | Update home layout |
GET | /api/v1/merchants/me/banners | List banners |
POST | /api/v1/merchants/me/banners | Create banner |
PUT | /api/v1/merchants/me/banners/{id} | Update banner |
DELETE | /api/v1/merchants/me/banners/{id} | Delete banner |
POST | /api/v1/merchants/me/banners/{id}/image | Upload banner image |
PATCH | /api/v1/merchants/me/banners/reorder | Reorder banners |
GET | /api/v1/merchants/me/popups | List popups |
POST | /api/v1/merchants/me/popups | Create popup |
PUT | /api/v1/merchants/me/popups/{id} | Update popup |
DELETE | /api/v1/merchants/me/popups/{id} | Delete popup |
POST | /api/v1/merchants/me/popups/{id}/image | Upload popup image |
GET | /api/v1/merchants/me/announcements | List announcements |
POST | /api/v1/merchants/me/announcements | Create announcement |
PUT | /api/v1/merchants/me/announcements/{id} | Update announcement |
DELETE | /api/v1/merchants/me/announcements/{id} | Delete announcement |
PATCH | /api/v1/merchants/me/announcements/reorder | Reorder announcements |
GET | /api/v1/merchants/me/features | Get feature flags |
PATCH | /api/v1/merchants/me/features | Update feature flags |
Merchant Campaigns & Push
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/campaigns | List push campaigns |
GET | /api/v1/merchants/me/campaigns/{id} | Get campaign |
POST | /api/v1/merchants/me/campaigns | Create campaign |
PUT | /api/v1/merchants/me/campaigns/{id} | Update campaign |
POST | /api/v1/merchants/me/campaigns/{id}/publish | Publish campaign |
POST | /api/v1/merchants/me/campaigns/{id}/cancel | Cancel campaign |
GET | /api/v1/merchants/me/campaigns/{id}/analytics | Campaign analytics |
GET | /api/v1/merchants/me/campaigns/recurring | List recurring campaigns |
POST | /api/v1/merchants/me/campaigns/recurring | Create recurring campaign |
PATCH | /api/v1/merchants/me/campaigns/recurring/{id}/toggle | Toggle recurring campaign |
DELETE | /api/v1/merchants/me/campaigns/recurring/{id} | Delete recurring campaign |
GET | /api/v1/merchants/me/notifications/summary | Notification summary |
Merchant Analytics
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/analytics/overview | Overview dashboard data |
GET | /api/v1/merchants/me/analytics/sessions | Session analytics |
GET | /api/v1/merchants/me/analytics/revenue | Revenue analytics |
GET | /api/v1/merchants/me/analytics/funnel | Conversion funnel |
GET | /api/v1/merchants/me/analytics/push | Push notification analytics |
GET | /api/v1/merchants/me/analytics/stories | Stories analytics |
GET | /api/v1/merchants/me/analytics/devices | Device analytics |
GET | /api/v1/merchants/me/analytics/realtime | Real-time analytics |
GET | /api/v1/merchants/me/analytics/export | Export analytics CSV |
GET | /api/v1/merchants/me/analytics/conversion | Conversion analytics |
Merchant Abandoned Cart
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/abandoned-cart/config | Get abandoned cart config |
PUT | /api/v1/merchants/me/abandoned-cart/config | Update abandoned cart config |
PATCH | /api/v1/merchants/me/abandoned-cart/config/toggle | Toggle abandoned cart |
GET | /api/v1/merchants/me/abandoned-cart/analytics | Abandoned cart analytics |
GET | /api/v1/merchants/me/abandoned-cart/carts | List abandoned carts |
Merchant Segments
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/segments | List customer segments |
POST | /api/v1/merchants/me/segments | Create segment |
GET | /api/v1/merchants/me/segments/{id}/estimate | Estimate segment size |
PUT | /api/v1/merchants/me/segments/{id} | Update segment |
DELETE | /api/v1/merchants/me/segments/{id} | Delete segment |
Merchant Social Proof
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/social-proof/config | Get social proof config |
PUT | /api/v1/merchants/me/social-proof/config | Update social proof config |
Merchant Stories
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/story-groups | List story groups |
POST | /api/v1/merchants/me/story-groups | Create story group |
GET | /api/v1/merchants/me/story-groups/{id} | Get story group |
PUT | /api/v1/merchants/me/story-groups/{id} | Update story group |
DELETE | /api/v1/merchants/me/story-groups/{id} | Delete story group |
POST | /api/v1/merchants/me/story-groups/{id}/cover | Upload story group cover image |
PATCH | /api/v1/merchants/me/story-groups/reorder | Reorder story groups |
GET | /api/v1/merchants/me/story-groups/{groupId}/stories | List stories in group |
POST | /api/v1/merchants/me/story-groups/{groupId}/stories | Create story |
PUT | /api/v1/merchants/me/story-groups/{groupId}/stories/{id} | Update story |
DELETE | /api/v1/merchants/me/story-groups/{groupId}/stories/{id} | Delete story |
POST | /api/v1/merchants/me/story-groups/{groupId}/stories/{id}/media | Upload story media |
PATCH | /api/v1/merchants/me/story-groups/{groupId}/stories/reorder | Reorder stories |
GET | /api/v1/merchants/me/story-groups/{id}/analytics | Story group analytics |
GET | /api/v1/merchants/me/stories/{id}/analytics | Individual story analytics |
GET | /api/v1/merchants/me/stories/summary | Stories summary |
Merchant Integrations
| Method | Path | Description |
|---|---|---|
GET | /api/v1/merchants/me/integrations | List available integrations |
GET | /api/v1/merchants/me/integrations/{slug} | Get integration detail |
POST | /api/v1/merchants/me/integrations/{slug}/connect | Connect integration |
GET | /api/v1/merchants/me/integrations/{slug}/status | Check integration status |
POST | /api/v1/merchants/me/integrations/{slug}/sync | Trigger manual sync |
DELETE | /api/v1/merchants/me/integrations/{slug}/disconnect | Disconnect integration |
Webhooks (Shopify → Stackfront)
| Method | Path | Description |
|---|---|---|
POST | /webhooks/{*topic} | Shopify webhook receiver |
POST | /api/v1/webhooks/onesignal | OneSignal delivery webhook |
POST | /webhooks/bachs | Bachs billing webhook |

