Work Market Developer Portal

WorkMarket Developer Portal

We are building the modern work market,
a frictionless exchange between businesses and workers.
See API Docs

    

Webhooks

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.

You could also create a webhook to push deliverable attachments from WorkMarket to an external system like Dropbox, Salesforce, Slack, Twilio or really anything with an API.

These are just a few ideas, but the possibilities are endless.

👍

Premium Feature

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

Illustrated webhook example (click to expand)

📘

See Webhooks in Action

There is a video on our product videos site that shows how Webhooks work.

Webhook Structure

A webhook consists of the following elements.

NameDescription
EventThe trigger event for the webhook. For example "Check In".
URLThe target URL for the webhook callout. Can use webhook variables in the URL.
HTTP MethodGET, POST, PUT, PATCH, DELETE
HeadersContent-Type header is required. You can add additional headers.
BodyThe request body. Often a JSON or XML payload (make sure Content-Type header is correct). Can use webhook variables.

Available Webhook Events

The following events can trigger webhooks.

EventDescription
AcceptedAssignment was accepted by a worker.
ApprovedAssignment was approved for payment.
Attachment Added
Attachment Removed
Bonus AddedBonus added by employer.
Bonus ApprovedBonus request approved.
Bonus DeclinedBonus request declined.
Bonus RequestedBonus requested by worker.
Budget Increase AddedBudget Increase added by employer.
Budget Increase ApprovedBudget Increase request approved.
Budget Increase DeclinedBudget Increase request declined.
Budget Increase RequestedBudget Increase requested by worker.
CancelAssignment cancelled.
Check InWorker checked in (or updated an existing check in).
Check OutWorker checked out (or updated an existing check out).
CompletedAssignment transitioned to "Pending Approval" status. Typically means worker submitted an assignment for approval.
ConfirmWorker confirmed intent to fulfill an assignment.
CreatedAssignment was created.
Custom Fields UpdatedCustom field values updated.
Expense Reimbursement AddedExpense Reimbursement added by employer.
Expense Reimbursement ApprovedExpense Reimbursement request approved.
Expense Reimbursement DeclinedExpense Reimbursement request declined.
Expense Reimbursement RequestedExpense Reimbursement requested by worker.
Label Added
Label Removed
Counteroffer ApprovedCounteroffer approved by employer.
Counteroffer DeclinedCounteroffer declined.
Counteroffer RequestedCounteroffer requested by worker. Includes when a worker applies for an assignment.
Note AddedMessage added to assignment.
PaidAssignment invoice paid.
Reschedule ApprovedReschedule request approved.
Reschedule DeclinedReschedule request declined.
Reschedule Requested
SentAssignment transitioned to Sent status.
VoidedAssignment voided.

📘

Retry

If a webhook callout fails, the system will attempt to retry it 1 time.

Webhook Variables

Event-related data is available to be included in webhooks and can be used in both the URL and the request body.

VariablesAvailable ForDescription
assignment_idAll EventsUnique identifier of the assignment within WorkMarket.
statusAll EventsAssignment status.
start_date_timeAll Events
pricing_typeAll Events
end_date_timeAll Events
pricing_flat_priceAll Events
pricing_per_hour_priceAll Events
pricing_max_number_of_hoursAll Events
pricing_max_number_of_unitsAll Events
pricing_per_unit_priceAll Events
pricing_additional_per_hour_priceAll Events
pricing_max_additional_number_of_hoursAll Events
resolutionAll EventsMessage summarizing work done, provided when submitting for approval.
hours_workedAll EventsTotal hours worked for hourly assignments. Can be overridden (i.e. may not necessarily match the total as calculated by check in / out times).
units_completedAll Events
expense_reimbursementAll Events
bonusAll Events
invoice_idAll Events
total_costAll Events
statement_idAll Events
owner_idAll Events
owner_emailAll Events
client_nameAll Events
client_idAll Events
client_customer_idAll Events
project_idAll Events
project_nameAll Events
nowAll EventsCurrent timestamp
customfield#####All EventsWhere ##### is the ID of the custom field. For example, custom_field_58134.
resource_idAccepted
resource_first_nameAccepted
resource_last_nameAccepted
resource_mobileAccepted
resource_phoneAccepted
resource_address1Accepted
resource_address2Accepted
resource_cityAccepted
resource_stateAccepted
resource_postal_codeAccepted
resource_countryAccepted
resource_emailAccepted
noteCheck In, Check Out, Label Add, Label Remove, and all negotiation events (Counteroffer, Reschedule, Budget Increase, Expense Reimbursement, Bonus)
checked_in_onCheck In
checked_out_onCheck Out
check_in_out_idCheck In, Check OutUseful for handling updates to existing check ins / outs. Each ID is associated with a check in / out pair.
label_nameLabel Added, Label Removed
label_idLabel Added, Label Removed
is_negotiationLabel Added, Label RemovedWhen 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.
amountExpense Reimbursement Requested, Expense Reimbursement Approved, Bonus Requested, Bonus Approved
proposed_flat_priceBudget Increase Requested
proposed_max_initial_number_of_hoursBudget Increase Requested
proposed_max_additional_number_of_hoursBudget Increase Requested
proposed_max_number_of_unitsBudget Increase Requested
proposed_start_date_timeReschedule Requested
proposed_end_date_timeReschedule Requested
file_nameAttachment Added, Attachment Removed
file_descriptionAttachment Added, Attachment Removed
file_uuidAttachment Added, Attachment Removed
file_data_base64Attachment Added
file_data (deprecated)Attachment AddedDeprecated. Use file_data_base64.
file_data_binaryAttachment Added
file_data_byte_lengthAttachment Added
negotiation_idAll negotiation events (Counteroffer, Reschedule, Budget Increase, Expense Reimbursement, Bonus)

📘

Date/Time Formats

You can specify whether Unix time or ISO 8601 format (YYY-MM-DDThh:mm:ssZ) should be used for date/time variable values.