Docs

ERP Webhook API

Developer reference for ERP inbound webhooks, outbound events, authentication, and payload handling.

ERP Webhook API

Suitly exposes a versioned inbound contract that any ERP can call. The merchant generates a key in Store Manager → Integrations → ERP & data sync and shares it with their ERP vendor.

Endpoint

POST https://us-central1-jungo-b1a13.cloudfunctions.net/erpWebhook?v=1&op=<operation>

  • v — API version. Currently 1.
  • op — operation: stock or order_status.

Authentication

Send the generated key as a bearer token. The key uses the form {connectionId}.{secret}.

Authorization: Bearer <connectionId>.<secret>
Content-Type: application/json

Keys are shown once at generation. Regenerating the key invalidates the previous one.

Operations

stock

The ERP owns stock, so values are set rather than incremented. Products are matched by slug.

{
  "items": [
    { "slug": "kente-tote-bag", "stock": 42 },
    { "slug": "ankara-scarf", "stock": 0 }
  ]
}

Successful responses return {"ok": true, "op": "stock", "updated": 2, "unknown": []}.

order_status

Use this to update fulfillment status for an order matched by reference.

{ "reference": "SL-8F2A19", "fulfillmentStatus": "fulfilled" }

Supported values are new, processing, fulfilled, and cancelled.

Errors

  • 400 — unsupported version, unknown operation, or invalid body.
  • 401 — missing, malformed, or invalid API key.
  • 405 — non-POST method.
  • 500 — server error; safe to retry.

Outbound events

Suitly can also push events to your ERP. Configure a receiving URL in Integrations → ERP & data sync and Suitly will POST JSON events for order creation, payment confirmation, order fulfillment, shipment updates, and stock changes.

  • order.created
  • order.paid
  • order.fulfilled
  • shipment.dispatched
  • shipment.delivered
  • stock.changed

Each request includes X-Suitly-Event, X-Suitly-Event-Id, and X-Suitly-Signature headers. Verify the signature using the secret portion of your key and reject mismatches.