workorder.create and workorder.status_update as they happen, and keep polling only as a reconciliation fallback.
Set up an endpoint
Endpoints are registered per buyer company and cover every location and facility in it. There is no self-serve API for this yet: email support@useopenwrench.com with- the HTTPS URL that should receive deliveries,
- which of the three events you want (
workorder.create,workorder.status_update,workorder.new_note), and - whether the endpoint is for testing or production.
Events
Some detail on each:
workorder.createfires for every creation, whoever made it: your ownPOST /v1/buyer/work_order/work_orders, a user in the OpenWrench web or mobile apps, a planned-maintenance schedule, a site survey walkthrough, or a supplier opening a work order at one of your locations (SupplierInitiatedPendingApproval). The payload carries the initial status, so you can tell a service request awaiting approval from a work order that was dispatched on creation.workorder.status_updatefires on every transition in the status model, for statuses owned by either side. Edits that leavestatusuntouched (a priority change, a new estimated completion date, a reassignment while the work order is still pending confirmation) do not emit one. When a work order moves from one supplier to another you may receive an intermediate update whosenewStatusisRejected, which closes out the previous assignment, followed by the update for the new status.workorder.new_notefires for notes on the root buyer–supplier thread from either side, including notes posted by your own integration, bulk photo posts, and the note attached to a status action. Suppliers’ internal notes and sub-contractor threads never emit events.
Delivery payload
Every delivery is an HTTPPOST with a JSON body. The body has two fields: event_type and data.
Create and status events
workorder.create uses the same data shape with oldStatus omitted.
Note events
The payload does not include the rest of the thread. Read it with
GET /v1/buyer/work_order/work_order_notes/{woId} if you need context.
Verify deliveries
Every delivery is signed. The gateway computes an HMAC over the raw request body with your endpoint’s signing secret and sends it in a signature header. When support registers your endpoint they give you the secret, the header name, and the hash algorithm. Verify the signature against the raw bytes of the body before you parse it, and reject anything that does not match. Because the secret is per endpoint, rotating it is a support request: ask for a new secret, deploy it, then ask support to switch the endpoint over.Respond, retries, and duplicates
- Acknowledge fast. Return a
2xxas soon as you have stored the event, and do the follow-up work (fetching the work order, updating your system) asynchronously. A non-2xxresponse or a timeout counts as a failed delivery. - Failed deliveries are retried by the gateway with a backoff schedule. Make your handler idempotent so a retry after a partial success does no harm.
- Deliveries are at-least-once. The same event can arrive more than once even without a failure on your side. Deduplicate on
event_typeplusworkOrderIdpluschangedAt(oraddedAtfor notes). - Order is not guaranteed. Two events for the same work order can arrive out of order. Do not derive state from the sequence of events; fetch the work order and trust its
status. - Stale events are dropped, not delivered late. An event that has not been handed to the gateway within three hours of the change is discarded. After an outage on OpenWrench’s side, or if your endpoint was down for longer than the retry window, reconcile by polling
GET /v1/buyer/work_order/work_orders?statusChangedAt=...for the period you missed.
React to an event
The recommended handler is small: verify, store, acknowledge, then fetch.Putting it together
A dispatch integration driven by webhooks:- Register an endpoint for
workorder.createandworkorder.status_update(addworkorder.new_noteif you mirror the conversation). - On
workorder.create, fetch the work order, and create the matching record in your system. If you dispatch from your side,PATCHthesupplierFacilityIdas described in Work orders. - On
workorder.status_update, fetch the work order. WhennewStatusisWaitingForReview, run your review flow and postwork_reviewed_and_completedorwork_unsatisfactory. - Run a periodic poll on
statusChangedAtas a safety net for anything the webhook path missed.