Procurement Webhooks
Thyris supports both inbound and outbound procurement webhooks.
- Inbound procurement webhooks let supplier, ERP, warehouse, or purchasing systems push supplier, inventory, shipment, and order updates into Thyris.
- Supplier quotes can be received through supplier email replies and reflected as procurement quote/order events.
- Outbound procurement webhooks let Thyris notify merchant or supplier systems when procurement supplier, inventory, email, policy, quote, purchase order, or shipment events happen.
Catalog destinations receive catalog events. Procurement destinations are configured separately and receive procurement events.
Inbound Webhook Endpoint
POST /webhooks/procurement
Authorization: Bearer tr_live_your_key_here
Content-Type: application/json
Production URL:
https://webhooks.thyris.cloud/webhooks/procurement
Alternative explicit header:
X-Procurement-API-Key: tr_live_your_key_here
Thyris validates the developer API key, enforces merchant/store scope, and processes accepted procurement payloads according to the documented webhook contract.
Inbound Events
Inbound accepts a flexible event name and one or more supported payload objects:
| Payload Object | Purpose |
|---|---|
supplier | Create or sync supplier records. |
inventoryItem | Create or sync procurement inventory inputs. |
order | Create a procurement order. |
quote | Deprecated. Quote creation through inbound webhook is disabled; use supplier email replies. |
Recommended event names:
| Event | Purpose |
|---|---|
supplier.created | Supplier record created in source system. |
supplier.updated | Supplier record changed. |
inventory.created | Procurement inventory item created. |
inventory.updated | Procurement inventory item changed. |
inventory.reorder.requested | Source system requests a reorder workflow. |
quote.received | Deprecated for inbound webhook quote creation. Supplier quotes should arrive by email reply. |
procurement.order.created | Purchase order created externally. |
procurement.order.confirmed | Supplier confirmed a purchase order. |
Inbound Supplier Payload
{
"event": "supplier.updated",
"source": "erp",
"supplier": {
"storeId": "STORE_UUID",
"name": "Example Brand Components",
"domain": "supplier.example.com",
"logoUrl": "https://supplier.example.com/logo.png",
"websiteUrl": "https://supplier.example.com",
"externalId": "supplier_001",
"channel": "webhook",
"status": "connected",
"reliabilityScore": 92,
"leadTimeDays": 7,
"capabilities": ["inventory_feed", "quote_api"],
"contact": {
"email": "ops@supplier.example.com"
}
}
}
Inbound Inventory Payload
{
"event": "inventory.updated",
"source": "warehouse",
"inventoryItem": {
"storeId": "STORE_UUID",
"preferredSupplierId": "SUPPLIER_UUID",
"sku": "BOX-12X10",
"externalId": "erp_item_001",
"name": "Shipping Box 12x10",
"description": "Corrugated box used for apparel orders.",
"imageUrl": "https://cdn.example.com/boxes/12x10.png",
"imageUrls": [
"https://cdn.example.com/boxes/12x10.png",
"https://cdn.example.com/boxes/12x10-side.png"
],
"itemUrl": "https://supplier.example.com/items/box-12x10",
"category": "Packaging",
"targetProduct": "Apparel fulfillment",
"status": "low_stock",
"quantityOnHand": 180,
"reorderPoint": 250,
"leadTimeDays": 5,
"unitCost": 0.42,
"currency": "USD"
}
}
Supplier Quote By Email
Supplier quotes are not accepted as manual inbound quote payloads. The supported flow is:
- Create an order request with
status=requested, or let the configured procurement workflow create one from an inventory policy. - Thyris prepares the supplier quote request.
- The supplier replies to that email with prices, lead time, and notes.
- Thyris links the supplier response to the related procurement order and emits the appropriate quote/order events.
Inbound Response
{
"success": false,
"error": "Quotes can only be created from supplier email replies"
}
Outbound Webhook Destinations
Outbound destinations are configured in the Merchant Dashboard:
Store > Procurement > Integrations > Webhooks
Required fields:
- Name
- Public HTTPS destination URL
- Selected events
Optional field:
- Secret header
Private network targets and non-HTTPS URLs are rejected.
Outbound Events
Procurement MCP writes also trigger outbound events when subscribed. Supplier and inventory creation currently travel through the procurement REST create routes and therefore carry source: "api"; MCP order creation defaults to source: "mcp". MCP order-status updates currently carry source: "api". These source labels do not suppress delivery.
| Event | Trigger |
|---|---|
supplier.outbound.created | Supplier created in Thyris. |
supplier.outbound.updated | Supplier updated in Thyris. |
supplier.outbound.email.queued | Supplier email queued by dashboard, MCP/API, or the configured procurement workflow. |
supplier.outbound.purchase_order.sent | Supplier order/request email sent. |
supplier.outbound.email.failed | Supplier email delivery failed. |
inventory.outbound.created | Procurement inventory item created. |
inventory.outbound.updated | Procurement inventory item updated. |
inventory.policy.enriched | Structured reorder policy generated for an inventory item. |
inventory.policy.custom_enriched | Custom order policy converted into a structured reorder policy. |
inventory.outbound.reorder.requested | Reorder requested for an inventory item. |
procurement.order.created | Procurement order created. |
procurement.order.requested | Order request created and ready for supplier quote email. |
procurement.order.email_queued | Email for an order was queued. |
procurement.order.email_sent | Email for an order was sent. |
procurement.order.email_failed | Email for an order failed. |
procurement.order.quote_received | Supplier quote received from inbound email and applied to the order. |
procurement.order.inbound_quote_processed | Supplier reply was converted into quote details. |
procurement.order.inbound_quote_ignored | Supplier email reply was ignored because no matching order was found. |
procurement.quote.revision_requested | A quote was sent back to the supplier with requested changes. |
procurement.order.updated | Order/request details were edited. |
procurement.order.approved | Order approved. |
procurement.order.payment_requested | Approved quote moved to payment request. |
procurement.order.paid | Payment ID recorded and order marked paid. |
procurement.payment.completed | Procurement payment completed after passkey or provider verification. |
procurement.order.sent | Order sent to supplier. |
procurement.order.confirmed | Supplier confirmed the order. |
procurement.order.in_transit | Supplier shipment is in transit. |
procurement.order.received | Procurement order was received. |
procurement.order.completed | Delivery was confirmed, inventory was increased, and the order was completed. |
procurement.order.cancelled | Procurement order was cancelled. |
procurement.order.blocked | Order blocked. |
Outbound Headers
Content-Type: application/json
x-webhook-secret: optional_shared_secret
x-webhook-secret is sent only when a secret is configured for the destination.
Receiver Recommendations
- Make receivers idempotent by event type and supplier, inventory, or order identifier.
- Return
2xxquickly and process heavier work asynchronously. - Validate
x-webhook-secretif configured. - Keep the endpoint public HTTPS.
- Do not assume catalog and procurement webhook events arrive at the same destination; they are separate configurations.