Webhooks make it easy to push data from WorkMarket to any external system as events happen. For example, you can create a webhook to send the details of the assigned worker to your system when they get assigned within WorkMarket.
These are just a few ideas, but the possibilities are endless.
Webhooks are a premium feature and must be enabled by your account manager.
Webhooks can be configured here: https://www.workmarket.com/mmw/integration/webhooks
See Webhooks in Action
There is a video on our product videos site that shows how Webhooks work.
A webhook consists of the following elements.
|Event||The trigger event for the webhook. For example "Check In".|
|URL||The target URL for the webhook callout. Can use webhook variables in the URL.|
|HTTP Method||GET, POST, PUT, PATCH, DELETE|
|Headers||Content-Type header is required. You can add additional headers.|
|Body||The request body. Often a JSON or XML payload (make sure Content-Type header is correct). Can use webhook variables.|
The following events can trigger webhooks.
|Accepted||Assignment was accepted by a worker.|
|Approved||Assignment was approved for payment.|
|Bonus Added||Bonus added by employer.|
|Bonus Approved||Bonus request approved.|
|Bonus Declined||Bonus request declined.|
|Bonus Requested||Bonus requested by worker.|
|Budget Increase Added||Budget Increase added by employer.|
|Budget Increase Approved||Budget Increase request approved.|
|Budget Increase Declined||Budget Increase request declined.|
|Budget Increase Requested||Budget Increase requested by worker.|
|Check In||Worker checked in (or updated an existing check in).|
|Check Out||Worker checked out (or updated an existing check out).|
|Completed||Assignment transitioned to "Pending Approval" status. Typically means worker submitted an assignment for approval.|
|Confirm||Worker confirmed intent to fulfill an assignment.|
|Created||Assignment was created.|
|Custom Fields Updated||Custom field values updated.|
|Expense Reimbursement Added||Expense Reimbursement added by employer.|
|Expense Reimbursement Approved||Expense Reimbursement request approved.|
|Expense Reimbursement Declined||Expense Reimbursement request declined.|
|Expense Reimbursement Requested||Expense Reimbursement requested by worker.|
|Counteroffer Approved||Counteroffer approved by employer.|
|Counteroffer Declined||Counteroffer declined.|
|Counteroffer Requested||Counteroffer requested by worker. Includes when a worker applies for an assignment.|
|Note Added||Message added to assignment.|
|Paid||Assignment invoice paid.|
|Reschedule Approved||Reschedule request approved.|
|Reschedule Declined||Reschedule request declined.|
|Sent||Assignment transitioned to Sent status.|
If a webhook callout fails, the system will attempt to retry it 1 time.
Event-related data is available to be included in webhooks and can be used in both the URL and the request body.
|assignment_id||All Events||Unique identifier of the assignment within WorkMarket.|
|status||All Events||Assignment status.|
|resolution||All Events||Message summarizing work done, provided when submitting for approval.|
|hours_worked||All Events||Total hours worked for hourly assignments. Can be overridden (i.e. may not necessarily match the total as calculated by check in / out times).|
|now||All Events||Current timestamp|
|customfield#####||All Events||Where ##### is the ID of the custom field. For example, custom_field_58134.|
|note||Check In, Check Out, Label Add, Label Remove, and all negotiation events (Counteroffer, Reschedule, Budget Increase, Expense Reimbursement, Bonus)|
|check_in_out_id||Check In, Check Out||Useful for handling updates to existing check ins / outs. Each ID is associated with a check in / out pair.|
|label_name||Label Added, Label Removed|
|label_id||Label Added, Label Removed|
|is_negotiation||Label Added, Label Removed||When negotiations are requested, a label is added to the assignments while it is pending. This flag indicates if the associated label is related to a negotiation.|
|amount||Expense Reimbursement Requested, Expense Reimbursement Approved, Bonus Requested, Bonus Approved|
|proposed_flat_price||Budget Increase Requested|
|proposed_max_initial_number_of_hours||Budget Increase Requested|
|proposed_max_additional_number_of_hours||Budget Increase Requested|
|proposed_max_number_of_units||Budget Increase Requested|
|file_name||Attachment Added, Attachment Removed|
|file_description||Attachment Added, Attachment Removed|
|file_uuid||Attachment Added, Attachment Removed|
|file_data (deprecated)||Attachment Added||Deprecated. Use file_data_base64.|
|negotiation_id||All negotiation events (Counteroffer, Reschedule, Budget Increase, Expense Reimbursement, Bonus)|
You can specify whether Unix time or ISO 8601 format (YYY-MM-DDThh:mm:ssZ) should be used for date/time variable values.