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)

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.

Name
Description

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.

Available Webhook Events

The following events can trigger webhooks.

Event
Description

Accepted

Assignment was accepted by a worker.

Approved

Assignment was approved for payment.

Attachment Added

Attachment Removed

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.

Cancel

Assignment cancelled.

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.

Label Added

Label Removed

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.

Reschedule Requested

Sent

Assignment transitioned to Sent status.

Voided

Assignment 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.

Variables
Available For
Description

assignment_id

All Events

Unique identifier of the assignment within WorkMarket.

status

All Events

Assignment status.

start_date_time

All Events

pricing_type

All Events

end_date_time

All Events

pricing_flat_price

All Events

pricing_per_hour_price

All Events

pricing_max_number_of_hours

All Events

pricing_max_number_of_units

All Events

pricing_per_unit_price

All Events

pricing_additional_per_hour_price

All Events

pricing_max_additional_number_of_hours

All Events

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).

units_completed

All Events

expense_reimbursement

All Events

bonus

All Events

invoice_id

All Events

total_cost

All Events

statement_id

All Events

owner_id

All Events

owner_email

All Events

client_name

All Events

client_id

All Events

client_customer_id

All Events

project_id

All Events

project_name

All Events

now

All Events

Current timestamp

customfield#####

All Events

Where ##### is the ID of the custom field. For example, custom_field_58134.

resource_id

Accepted

resource_first_name

Accepted

resource_last_name

Accepted

resource_mobile

Accepted

resource_phone

Accepted

resource_address1

Accepted

resource_address2

Accepted

resource_city

Accepted

resource_state

Accepted

resource_postal_code

Accepted

resource_country

Accepted

resource_email

Accepted

note

Check In, Check Out, Label Add, Label Remove, and all negotiation events (Counteroffer, Reschedule, Budget Increase, Expense Reimbursement, Bonus)

checked_in_on

Check In

checked_out_on

Check Out

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

proposed_start_date_time

Reschedule Requested

proposed_end_date_time

Reschedule Requested

file_name

Attachment Added, Attachment Removed

file_description

Attachment Added, Attachment Removed

file_uuid

Attachment Added, Attachment Removed

file_data_base64

Attachment Added

file_data (deprecated)

Attachment Added

Deprecated. Use file_data_base64.

file_data_binary

Attachment Added

file_data_byte_length

Attachment Added

negotiation_id

All 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.