Offers

Hirers and agencies can send offers of work to prospective hirers. You can use the API to initiate these actions and then use webhooks to be notified when workers respond to them.

Creating an Offer

1. Create Offer and Dispatch

A hirer or agency sends an offer to one or more workers. Create an Offer object which includes the name, location, workers required to be notified along with other options and submit it to the CreateOffer endpoint:

Example Request

POST /offer

Example Request Body

{
"createdByUserId" : "xxxx-xxxx-xxxx",
"title" : "English GCSE at Lowfield School",
"details" : "English teacher required for single day. Must bring set text.",
"locationPlaceId" : "xxxxxxxx",
"notifyEmailAddress" : "consultant@agency.com",
"workerIds" : [
"xxxx-xxxx-xxxx",
"yyyy-yyyy-yyyy",
"zzzz-zzzz-zzzz",
],
"events" : [
{
"start" : "2019-01-11T09:00:00Z",
"end" : "2019-01-11T17:00:00Z",
}
]
}

2. Notify Workers of Offer

The platform will notify the workers you specified in the workerIds array of the offer via a push notification to their iOS or Android device. Upon tapping the notification or opening the Notifications menu option on their updatedge app menu they will see the offer displayed.

The offer as presented to a worker

3. Workers Respond

Each worker then responds with Apply or Reject. Applying or rejecting triggers the Worker Offer Response webhook which you implement on your system to receive the response and act upon it in whatever way your system requires.

A worker may decide to simply close the offer display without performing either action, or may not respond at all.

4. Offer Completion

At some point after the offer was dispatched, you need to assign the work to one or more of the workers based on the responses you have. To do this, you call the call the Complete Offer endpoint with the id of the offer and send the id's of the worker(s) to which you wish to assign the work in the body of the request.

POST /offer/{id}/complete?api-version=1.0
[
"xxxx-xxxx-xxxx",
"yyyy-yyyy-yyyy"
]

5. Workers Notified of Decision

All workers are then notified as to whether they have been successful.

Get an Offer's Status

You can view the current status of an offer by calling the GetOffer endpoint with the id of the offer. The platform will return the offer details and the current state of each of the worker responses.

Example Request

GET /offer/{id}

Example Response

{
"id": "aaa-aaa-aaa",
"title": "English GCSE at Lowfield School",
"details": "English teacher required for single day. Must bring set text.",
"isHistoric": false,
"widthdrawn": false,
"complete": false,
"locationPlaceId": "xxxxxxxx",
"createdAt": "2019-11-04T14:00:32Z",
"events": [
{
"start" : "2019-01-11T09:00:00Z",
"end" : "2019-01-11T17:00:00Z",
}
],
"recipients": [
{
"id": 0,
"workerId": "xxxx-xxxx-xxxx",
"name": "Fred Smith",
"response": "applied",
"confirmation": ""
},
...
]
}

Withdrawing an Offer

To withdraw an offer once sent, call the WithdrawOffer endpoint with the id of the offer you wish to withdraw. The platform will notify all workers previously submitted with the offer when it was created that the offer has been withdrawn.

Example Request

GET /offer/{id}/withdraw

Example Response

200 OK