POST /v1/reseller_stores/{rst_id}/source_stores

Create a source store

Connects a new source supplier store.

Connects a new source supplier store to the active reseller store. The vendorTag is used to match line items from incoming orders — when a Shopify order contains line items with a matching vendor, those items are routed to this source store.

The accessToken is encrypted at rest using AES-256-GCM. The shopDomain must be a valid *.myshopify.com domain.

Pricing modes

Configure how prices are adjusted when orders are synced to the source store:

ModeConfigDescription
percentage{ type: "percentage", value: 15 }Markup as a percentage of product cost
field_rules{ type: "field_rules", productCost: 10, shippingCost: 5 }Fixed markup for product and shipping

Path parameters

rst_id string REQUIRED

Body parameters

name string REQUIRED
platform string REQUIRED

Possible enum values:

  • shopify
  • woocommerce
  • custom
shopDomain string REQUIRED
accessToken string REQUIRED

Shopify access token for this store

format: password
webhookSecret string REQUIRED

Webhook secret for verifying Shopify HMAC signatures

format: password
vendorTag string REQUIRED

Vendor tag used to match products

pricingMode string REQUIRED

Possible enum values:

  • percentage
  • field_rules
pricingConfig object REQUIRED

Pricing configuration. Shape depends on pricingMode.

Responses

201

400

Validation failed

Request

curl -X POST https://api.example.com/v1/reseller_stores/:id/source_stores \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example_name",
  "platform": "shopify",
  "shopDomain": "example_shopDomain",
  "accessToken": "example_accessToken",
  "webhookSecret": "example_webhookSecret"
}'

Response

201 201 Created
{
  "id": "example_id",
  "resellerStoreId": "example_resellerStoreId",
  "name": "example_name",
  "platform": "shopify",
  "shopDomain": "example_shopDomain",
  "vendorTag": "example_vendorTag",
  "pricingMode": "percentage",
  "pricingConfig": {},
  "createdAt": "example_createdAt",
  "deletedAt": "example_deletedAt",
  "request_id": "example_request_id"
}