◆ BATCHLY API

Build on the store
that runs itself.

One REST API for your store's catalog, inventory, and orders — with a full test mode to build against safely, signed webhooks for every event, and a product feed that lists you on TikTok, Meta, and Google. Per-tenant scoped keys, and card data never touches our servers.

Test & live keys HMAC-signed webhooks Per-tenant scopes No card data, ever
terminal · catalog
# read your live catalog
curl https://app.batchly.shop/api/products \
  -H "Authorization: Bearer bly_live_…"

# -> storefront-safe fields only, never cost
{
  "products": [
    { "sku":"CB-04", "name":"Cold Brew 4-Pack",
      "price":30, "quantity":4 }
  ]
}
bly_test_
A real sandbox — build and trial against production without touching the books.
5 events
Signed webhooks for sales, orders, and membership payments.
1 feed
Lists your catalog on TikTok Shop, Meta, Google, and Pinterest.
$0
We’ll build a custom integration for you if you need one.
Quickstart

Live in three calls.

Create a key in Developers inside Batchly, pick a mode and scopes, and you’re selling through the API. The same endpoints power our own WooCommerce plugin.

  • 1
    Create a key & choose scopes
    read, inventory:write, orders:write — least privilege, revocable anytime. Only a hash is stored; the raw key is shown once.
  • 2
    Read the catalog
    GET /products returns storefront-safe fields — never wholesale cost, margin, or reorder point.
  • 3
    Record an order
    POST /orders with a stable externalRef. The total is computed server-side and the ref dedupes retries — engineered so a dropped connection doesn’t double a sale.
quickstart.sh
# adjust stock (needs inventory:write)
curl -X PATCH .../api/products/BD-35 \
  -H "Authorization: Bearer bly_live_…" \
  -d '{"quantity": 12}'

# record an online order (idempotent)
curl -X POST .../api/orders \
  -H "Authorization: Bearer bly_live_…" \
  -d '{"sku":"BD-35","quantity":1,
       "externalRef":"web-1042-1"}'
# re-send the same ref -> {"deduped": true}
Test mode · sandbox

A real sandbox.
Then go live — and keep testing.

Flip a key to Test and you get a bly_test_ credential. It reads your live catalog, but every write is sandboxed — test orders are tagged, inventory writes never change live stock, and none of it hits your books, reports, reconciliation, or webhooks. Build safely, then swap in bly_live_ and keep a test key around forever.

  • Same API, both modes
    Identical endpoints and scopes — only the key prefix differs.
  • Walled off from the money
    Test data is excluded from dashboard, analytics, reconciliation, QuickBooks, and live webhooks.
  • See it in the app
    A Live/Test switch shows your test traffic under a clear banner — never mixed into real numbers.
test-mode
# a test key never changes live stock
curl -X PATCH .../api/products/BD-35 \
  -H "Authorization: Bearer bly_test_…" \
  -d '{"quantity": 0}'
-> {"ok":true,"test":true,"applied":false}

# a test order is recorded, but sandboxed
curl -X POST .../api/orders \
  -H "Authorization: Bearer bly_test_…" \
  -d '{"sku":"BD-35","quantity":1}'
-> {"ok":true,"test":true}  # not in your books
API reference

A small, honest surface.

Bearer-authenticated REST over JSON. Keys are per-store and scoped; the base is https://app.batchly.shop/api.

GET/products
List the storefront-safe catalog (name, sku, price, quantity). Never cost or margin.
read
GET/products/{sku}
Fetch a single product by SKU.
read
PATCH/products/{sku}
Update stock or price for a SKU. In test mode, validated but never applied to live stock.
inventory:write
POST/orders
Record an online order. Server-computed total; externalRef dedupes retries.
orders:write
Webhooks

Every event,
pushed & signed.

Point a webhook at Zapier, Make, n8n, or your own endpoint and Batchly pushes events as they happen — each delivery HMAC-signed, retried with backoff, and logged. Test-mode events never reach a live endpoint.

  • Events
    sale.created, order.created, order.updated, membership.payment, membership.payment_failed.
  • Signed & verifiable
    Every POST carries X-Batchly-Signature = HMAC-SHA256(body, your secret).
  • Reliable
    Retried on failure (1/5/15/60/240 min) with a delivery log you can inspect.
verify.js
const expected = 'sha256=' + crypto
  .createHmac('sha256', SECRET)
  .update(rawBody).digest('hex');

const ok = crypto.timingSafeEqual(
  Buffer.from(req.headers['x-batchly-signature']),
  Buffer.from(expected)
);
// ok === true -> trust the payload
Product feed

One feed. Sell on TikTok, Meta & Google.

A live catalog feed in the standard shopping format (RSS/XML + CSV). Point any channel at the URL and your products appear there, kept in step automatically. Storefront-safe fields only — never cost or margin.

TikTok Shop

Scheduled catalog feed

Add the feed URL in Seller Center and TikTok pulls your live catalog.

Meta

Instagram & Facebook

A data source in Commerce/Catalog Manager — one feed, both surfaces.

Google · Pinterest

Merchant feeds

Scheduled fetch of the XML URL for Google Merchant and Pinterest catalogs.

Security

Built so the review is short.

The API is designed for security-conscious retail: least privilege, tenant isolation, and no card data on our servers.

#

Hashed, scoped keys

Only a SHA-256 hash of a key is stored; the raw value is shown once. Every key is per-store and scope-limited.

Per-tenant isolation

The API resolves the store from the key and fences every read and write to that tenant — enforced in the database.

No card data

The API only sees amounts and transaction IDs. Cards are read on the terminal and settled by the gateway.

Server-computed totals

Order totals are computed from your own catalog — a client can never post a forged amount into your books.

Idempotent writes

A stable externalRef makes retries safe; a re-fired webhook or dropped connection can’t double a sale.

SSRF-guarded webhooks

Deliveries only reach public HTTPS endpoints — internal and loopback targets are refused.

Start building

Get a key in two minutes.

Sign in, open Developers, and create a test key. Build against production safely, then flip to live. Need something custom? Our team will build the integration for you.