beginner 5 min

Quickstart

Connect your first store and route an order in under 5 minutes.

Get up and running with the Reseller API in just a few steps.

1. Register an account

Create your account by calling the registration endpoint:

curl -X POST https://api.example.com/v1/auth/register 
  -H "Content-Type: application/json" 
  -d '{
    "email": "[email protected]",
    "password": "your-secure-password"
  }'

This returns an access token and sets a refresh token cookie:

{
  "accessToken": "eyJhbGciOiJIUzI1NiIs...",
  "expiresAt": 1708700000
}

2. Connect a reseller store

Add your Shopify reseller store — the storefront where customers place orders:

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_..."
  }'

3. Add a source store

Connect a supplier store that will fulfill orders:

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 }
  }'

4. Route an order

When a customer places an order on your reseller store, Shopify sends a webhook to POST /v1/orders/webhook. The platform automatically:

  1. Matches line items to source stores by vendor tag
  2. Creates sync jobs for each matched source store
  3. Places the corresponding order on the source store
  4. Syncs fulfillment and tracking info back to the reseller store

What’s next?