ShopAll · Developers

ShopAll API

Read a store's products, orders and customers, create orders from other channels and move them through their statuses. Get told the moment something happens with signed webhooks.

Getting started

  1. The store owner opens the API keys screen in ShopAll (type “API keys” in the search) and creates a key with only the scopes you need. Two-step login must be on.
  2. The key (sk_…) is shown once. Keep it on your server; never put it in a website or app.
  3. Call the API over HTTPS with the key in the Authorization header.
curl https://shopallapp.com/api/v2/open/products?limit=50 \
  -H "Authorization: Bearer sk_live_..."

Authentication, scopes and limits

Every request needs Authorization: Bearer sk_…. Cookies and sessions are never used by this API. A key belongs to one store and can only see that store.

Scopes (a key gets exactly the ones ticked when it was made; a write scope does not include the read scope of the same area). Every endpoint checks its scope on every call and answers 403 insufficient_scope without it:

Managing keys

Rate limit: 120 requests per minute per key. Over the limit you get 429 with Retry-After. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (unix time a slot frees up).

Lists return {"data": [...], "next": <id or null>}. Pass ?cursor=<next>&limit=50 (up to 100) for the next page; ?after= still works. Cursors are stable: new rows never shift a page. Money is in minor units (piasters, cents) as integers.

Endpoints

MethodPathScopeWhat it does
GET/api/v2/open/storeanyThe store this key belongs to: id, name, address slug, city, currency and the key's scopes.
GET/api/v2/open/appany
POST/api/v2/open/app/usageany
POST/api/v2/open/app/usage/{id}/reverseany
GET/api/v2/open/productsread_productsProducts, oldest first. Filters: status (active, draft, archived), q (name contains), sku. Paginated.
GET/api/v2/open/products/{id}read_productsOne product with its options (variants), prices in minor units and stock.
PATCH/api/v2/open/products/{id}write_productsChange a product's name, description, sku, status (active, archived), price_minor or sale_price_minor (null removes the sale). Stock and cost are not changed through the API. Any other field is refused with 422.
GET/api/v2/open/ordersread_ordersOrders, oldest first. Filters: status, since (YYYY-MM-DD). Paginated.
GET/api/v2/open/orders/{number}read_ordersOne order by its number, with items, totals, delivery and status.
POST/api/v2/open/orderswrite_ordersCreate an order (for example from another sales channel). Stock is taken exactly like a website order.
POST/api/v2/open/orders/{number}/statuswrite_ordersMove an order to a new status (confirmed, preparing, shipped, delivered, cancelled).
GET/api/v2/open/customersread_customersCustomers with their order count and total spent. Paginated.
GET/api/v2/open/customers/{id}read_customersOne customer.
POST/api/v2/open/orders/{number}/fulfillmentwrite_fulfillment

Webhooks

The store owner adds your HTTPS address on the Webhooks screen and chooses events:

Each delivery is a POST with a JSON body (id, event, created_at, store_id, data) and these headers:

Checking the signature

Compute the HMAC over the raw request body (before any JSON parsing), compare in constant time, and reject a t more than 5 minutes away from your clock: that is the replay window. Accept the delivery if any v1 matches.

Python

import hmac, hashlib, time

TOLERANCE = 300      # seconds; reject older (replayed) deliveries

def verify(secret: str, header: str, raw_body: bytes) -> bool:
    pairs = [p.split("=", 1) for p in header.split(",") if "=" in p]      # "t=1730800000,v1=ab12...[,v1=cd34...]"
    t = next((v for k, v in pairs if k == "t"), "")
    if not t.isdigit() or abs(time.time() - int(t)) > TOLERANCE:
        return False
    want = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(want, v) for k, v in pairs if k == "v1")

Node.js

const crypto = require("crypto");
const TOLERANCE = 300; // seconds

function verify(secret, header, rawBody) {
  const pairs = header.split(",").map(x => [x.slice(0, x.indexOf("=")), x.slice(x.indexOf("=") + 1)]);
  const t = (pairs.find(([k]) => k === "t") || [])[1] || "";
  if (!/^\d+$/.test(t) || Math.abs(Date.now() / 1000 - Number(t)) > TOLERANCE) return false;
  const want = Buffer.from(crypto.createHmac("sha256", secret).update(t + ".").update(rawBody).digest("hex"));
  return pairs.some(([k, v]) => k === "v1" && v.length === want.length && crypto.timingSafeEqual(want, Buffer.from(v)));
}

Rotating the secret

The owner can rotate the signing secret at any time. For the overlap they choose (default 24 hours, up to 72), every delivery carries two v1 values: one signed with the new secret and one with the old. Install the new secret on your server during that window; after it, only the new secret signs.

Retries, dead letters and switching off

Answer with any 2xx within 8 seconds; redirects are not followed. A failed attempt is retried 5 more times after 1 min, 5 min, 30 min, 2 h, 6 h. After the last attempt the delivery becomes a dead letter: it stays in the owner's delivery log (event, HTTP status, time taken, attempt, next retry) and can be redelivered one by one or all at once.

If 5 deliveries in a row end as dead letters, ShopAll switches the endpoint off and tells the owner (in their ShopAll inbox, and by email when email is set up). Nothing is sent to it until the owner turns it back on.

Allowed addresses

Only https:// addresses on ports 80 or 443, without a user name or password in the address, that resolve to public internet addresses. Private, loopback, link-local and internal names are refused when the webhook is saved and checked again at every delivery; ShopAll connects to the address it checked.

Testing

The Send test event button on the Webhooks screen sends a signed ping once (test events are never retried) and shows the HTTP status and time taken.

Errors

Errors are JSON: {"error": {"code": "…", "message": "…"}}.

Versions

This is version 2 (/api/v2/open/…). Fields may be added at any time; nothing is removed or renamed within v2. A breaking change would come as /api/v3, announced at least 6 months ahead on this page.

Building an app for many stores?

Use OAuth for apps: each store owner approves your app once on a ShopAll consent screen, and you get a token for that store only. Or join the ShopAll partner programme. You never ask for a password.