Store Setup
Connect reseller and source Shopify stores to the platform.
The platform uses a two-tier store model: reseller stores (customer-facing storefronts) and source stores (supplier stores that fulfill orders).
Connect a reseller store
A reseller store is the Shopify storefront where your customers place orders. Create one with:
curl -X POST https://api.example.com/v1/reseller_stores
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
-H "Content-Type: application/json"
-d '{
"name": "My Reseller Store",
"platform": "shopify",
"shopDomain": "my-store.myshopify.com",
"accessToken": "shpat_...",
"webhookSecret": "whsec_..."
}' You’ll need a Shopify access token with order read/write permissions, and the webhook secret you configure in Shopify’s webhook settings.
Switch workspaces
If you manage multiple reseller stores, switch your active workspace:
curl -X POST https://api.example.com/v1/auth/switch-workspace
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
-H "Content-Type: application/json"
-d '{ "reseller_store_id": "rst_abc123" }' This returns a new token pair scoped to the selected store. All subsequent API calls operate within that workspace.
Connect source stores
Source stores are supplier stores nested under a reseller store. Each source store has a vendor tag that maps to the vendor field on Shopify line items:
curl -X POST https://api.example.com/v1/reseller_stores/rst_abc123/source_stores
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
-H "Content-Type: application/json"
-d '{
"name": "Supplier A",
"platform": "shopify",
"shopDomain": "supplier-a.myshopify.com",
"accessToken": "shpat_...",
"webhookSecret": "whsec_...",
"vendorTag": "supplier-a",
"pricingMode": "percentage",
"pricingConfig": { "type": "percentage", "value": 15 }
}' Pricing modes
When syncing orders to source stores, the platform adjusts prices according to the configured pricing mode:
| Mode | Config | Description |
|---|---|---|
percentage | { type: "percentage", value: 15 } | Applies a percentage markup to product cost |
field_rules | { type: "field_rules", productCost: 10, shippingCost: 5 } | Fixed markup for product and shipping costs |
What’s next?
- Configure Webhooks — Set up order and fulfillment webhooks
- Quickstart — Route your first order