Skip to main content

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 ObjectPurpose
supplierCreate or sync supplier records.
inventoryItemCreate or sync procurement inventory inputs.
orderCreate a procurement order.
quoteDeprecated. Quote creation through inbound webhook is disabled; use supplier email replies.

Recommended event names:

EventPurpose
supplier.createdSupplier record created in source system.
supplier.updatedSupplier record changed.
inventory.createdProcurement inventory item created.
inventory.updatedProcurement inventory item changed.
inventory.reorder.requestedSource system requests a reorder workflow.
quote.receivedDeprecated for inbound webhook quote creation. Supplier quotes should arrive by email reply.
procurement.order.createdPurchase order created externally.
procurement.order.confirmedSupplier 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:

  1. Create an order request with status=requested, or let the configured procurement workflow create one from an inventory policy.
  2. Thyris prepares the supplier quote request.
  3. The supplier replies to that email with prices, lead time, and notes.
  4. 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.

EventTrigger
supplier.outbound.createdSupplier created in Thyris.
supplier.outbound.updatedSupplier updated in Thyris.
supplier.outbound.email.queuedSupplier email queued by dashboard, MCP/API, or the configured procurement workflow.
supplier.outbound.purchase_order.sentSupplier order/request email sent.
supplier.outbound.email.failedSupplier email delivery failed.
inventory.outbound.createdProcurement inventory item created.
inventory.outbound.updatedProcurement inventory item updated.
inventory.policy.enrichedStructured reorder policy generated for an inventory item.
inventory.policy.custom_enrichedCustom order policy converted into a structured reorder policy.
inventory.outbound.reorder.requestedReorder requested for an inventory item.
procurement.order.createdProcurement order created.
procurement.order.requestedOrder request created and ready for supplier quote email.
procurement.order.email_queuedEmail for an order was queued.
procurement.order.email_sentEmail for an order was sent.
procurement.order.email_failedEmail for an order failed.
procurement.order.quote_receivedSupplier quote received from inbound email and applied to the order.
procurement.order.inbound_quote_processedSupplier reply was converted into quote details.
procurement.order.inbound_quote_ignoredSupplier email reply was ignored because no matching order was found.
procurement.quote.revision_requestedA quote was sent back to the supplier with requested changes.
procurement.order.updatedOrder/request details were edited.
procurement.order.approvedOrder approved.
procurement.order.payment_requestedApproved quote moved to payment request.
procurement.order.paidPayment ID recorded and order marked paid.
procurement.payment.completedProcurement payment completed after passkey or provider verification.
procurement.order.sentOrder sent to supplier.
procurement.order.confirmedSupplier confirmed the order.
procurement.order.in_transitSupplier shipment is in transit.
procurement.order.receivedProcurement order was received.
procurement.order.completedDelivery was confirmed, inventory was increased, and the order was completed.
procurement.order.cancelledProcurement order was cancelled.
procurement.order.blockedOrder 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 2xx quickly and process heavier work asynchronously.
  • Validate x-webhook-secret if configured.
  • Keep the endpoint public HTTPS.
  • Do not assume catalog and procurement webhook events arrive at the same destination; they are separate configurations.