API Reference Enterprise

Integrate ShopiSync with your own systems using our REST API. API access is exclusively available on the Enterprise plan.

i
API Keys
Generate API keys in your dashboard under Settings > API Keys. Each key has configurable permissions, rate limits, optional IP whitelisting, and an expiration date. The plaintext key is only shown once at creation — store it securely.

Authentication

All API requests require a Bearer token passed in the Authorization header:

Authorization: Bearer sk_live_your-api-key-here

Base URL

https://shopisync.io/api/external/v1

Permissions

Each API key is created with one or more permission levels. Endpoints require a minimum permission to access:

Permission Description
read Read-only access to products, competitors, price history, and statistics
write All read permissions plus updating products and testing webhooks
admin Full access including all read and write permissions

Endpoints

Products

Method Endpoint Permission Description
GET /v1/products read List all products with their competitors. Supports pagination and filtering.
GET /v1/products/:productId read Get a specific product with competitors and recent price history (last 10 entries).
PUT /v1/products/:productId write Update product settings: minPrice, maxPrice, costPrice, autoReprice, active.

GET /v1/products — Query Parameters

Parameter Type Default Description
page integer 1 Page number for pagination
limit integer 50 Number of products per page
active boolean Filter by active status (true or false)

PUT /v1/products/:productId — Request Body

All fields are optional. Only include the fields you want to update.

Field Type Description
minPrice number Minimum price floor
maxPrice number Maximum price ceiling
costPrice number Cost price for margin calculations
autoReprice boolean Enable or disable automatic repricing
active boolean Enable or disable price monitoring

Competitors

Method Endpoint Permission Description
GET /v1/competitors read List all competitors across all products, including linked product info (id, title, currentPrice).

Price History

Method Endpoint Permission Description
GET /v1/price-history/:productId read Get price change history for a specific product. Use the days query parameter to set the time range (default: 30).

Statistics

Method Endpoint Permission Description
GET /v1/stats read Get shop statistics: total products, active products, total competitors, price changes in the last 24 hours, current plan, and shop domain.

Webhooks

Method Endpoint Permission Description
POST /v1/webhooks/test write Test endpoint that echoes back the request body with a timestamp. Use this to verify your integration is working.

Example Requests

List products

curl -X GET "https://shopisync.io/api/external/v1/products?page=1&limit=20&active=true" \
  -H "Authorization: Bearer sk_live_your-api-key-here"

Update a product

curl -X PUT https://shopisync.io/api/external/v1/products/42 \
  -H "Authorization: Bearer sk_live_your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{"minPrice": 19.99, "autoReprice": true}'

Get price history (last 7 days)

curl -X GET "https://shopisync.io/api/external/v1/price-history/42?days=7" \
  -H "Authorization: Bearer sk_live_your-api-key-here"

Response Format

All responses are JSON. Successful responses include a success: true field. List endpoints include pagination info.

Paginated response example

{
  "success": true,
  "data": [ ... ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 127,
    "totalPages": 3
  }
}

Error response example

{
  "error": "Invalid or expired API key",
  "code": "INVALID_API_KEY"
}

Error Codes

HTTP Status Code Description
401 INVALID_API_KEY Missing, invalid, or expired API key
403 IP_NOT_ALLOWED Request from an IP address not on the key's whitelist
403 INSUFFICIENT_PERMISSIONS The API key does not have the required permission for this endpoint
404 Product not found or does not belong to your shop
429 RATE_LIMIT_EXCEEDED Too many requests — check the X-RateLimit-Reset header for when to retry

Rate Limits

The default rate limit is 1,000 requests per hour per API key. Rate limits are configurable per key when creating it.

Every response includes rate limit headers:

Header Description
X-RateLimit-Limit Maximum number of requests allowed in the current window
X-RateLimit-Remaining Number of requests remaining in the current window
X-RateLimit-Reset ISO 8601 timestamp when the rate limit window resets

API Key Management

Manage your API keys from the Settings page in your dashboard. You can: