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.
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
| Event | Triggered When |
|---|---|
| stock_lot.created | A new stock lot is created (inbound or production) |
| stock_lot.status_changed | Lot status changes (e.g., PENDING_QC → AVAILABLE) |
| stock_lot.low_stock | Lot quantity falls below the product's reorder point |
| stock_lot.expiring_soon | A lot is within 30 days of its expiry date |
| order.confirmed | A B2B order is confirmed |
| order.shipped | A shipment is marked as shipped |
| order.invoiced | An order is invoiced |
| production_batch.closed | A production batch is closed with output logged |
| qc_inspection.failed | A 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"
Planned Rate Limits
| Plan | Requests / Minute | Webhook Endpoints |
|---|---|---|
| BETA (all plans) | 60 req/min | 3 endpoints |
| Starter (GA) | 60 req/min | 3 endpoints |
| Growth (GA) | 200 req/min | 10 endpoints |
| Scale (GA) | 600 req/min | Unlimited |