Webhooks & API

Integrate IEMSuite with external systems. Today this happens through the native Shopify sync; a public REST API and outbound webhooks are on the roadmap and previewed here.

Today, IEMSuite integrates with external systems through its native Shopify sync. A public REST API and outbound webhooks are on the roadmap - this page previews what they will look like so you can plan ahead.

A public REST API, API keys, and outbound webhooks are not available yet. The events, payloads, and endpoints below are a design preview of planned functionality and will change before release - there is no Settings → API Keys screen today.

Available Today: Shopify

If you sell on Shopify, the built-in integration already keeps inventory and orders in sync in real time with no code. See Integrations → Shopify Deep Sync for setup and sync behavior.

Planned: Outbound Webhooks

Outbound webhooks send an HTTP POST to your endpoint when a specific event occurs in IEMSuite. Common use cases:

  • Notify an ERP system when a production batch closes
  • Trigger a reorder alert in Slack when stock falls below a threshold
  • Sync order data to an accounting system on invoice
  • Push lot expiry alerts to a food safety system

Planned Events

EventTriggered When
stock_lot.createdA new stock lot is created (inbound or production)
stock_lot.status_changedLot status changes (e.g., PENDING_QC → AVAILABLE)
stock_lot.low_stockLot quantity falls below the product's reorder point
stock_lot.expiring_soonA lot is within 30 days of its expiry date
order.confirmedA B2B order is confirmed
order.shippedA shipment is marked as shipped
order.invoicedAn order is invoiced
production_batch.closedA production batch is closed with output logged
qc_inspection.failedA QC inspection is failed; NCR created

Planned Payload Structure

All webhook payloads follow the same envelope structure:

{
  "event": "stock_lot.created",
  "organizationId": "org_abc123",
  "timestamp": "2024-11-15T14:32:00Z",
  "data": {
    "id": "lot_xyz789",
    "product": { "id": "prod_...", "sku": "RAW-SUGAR-001" },
    "quantity": 500,
    "unit": "kg",
    "location": { "id": "loc_...", "name": "Main Warehouse" },
    "status": "AVAILABLE",
    "receivedAt": "2024-11-15T14:30:00Z"
  }
}

Planned: Signatures

Each webhook delivery includes an X-IEMSuite-Signature header - an HMAC-SHA256 signature of the raw request body using your webhook secret. Verify this signature in your endpoint to confirm the request is genuine.

// Node.js example
const crypto = require('crypto');
const sig = req.headers['x-iemsuite-signature'];
const expected = 'sha256=' + crypto
  .createHmac('sha256', process.env.WEBHOOK_SECRET)
  .update(req.rawBody)
  .digest('hex');
if (sig !== expected) return res.status(401).send('Invalid signature');

Planned: Public API

A REST API is planned so you can read and write inventory, orders, and production data programmatically. When it ships, you will generate a key from your workspace settings and pass it as a Bearer token. This is the intended shape of a request:

curl https://app.iemsuite.com/api/v1/stock-lots \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
API keys have the same permissions as the user who created them. Create a dedicated service account with limited roles for API-only integrations.

Planned Rate Limits

PlanRequests / MinuteWebhook Endpoints
BETA (all plans)60 req/min3 endpoints
Starter (GA)60 req/min3 endpoints
Growth (GA)200 req/min10 endpoints
Scale (GA)600 req/minUnlimited