Classification Accepted

This event triggers when a company accepts a worker classification on a hire.

The payload includes the classification outcome and the worker, so that you can record whether the worker was classified as an independent contractor or an employee without calling the API first. It is only sent to webhooks belonging to the company that owns the hire.

Webhook payload

The payload contains the following fields and objects:

{
    "event": "classificationAccepted",
    "data": {
        "worker": {},
        "classification": {}
    }
}

Event Identifier

The event field contains classificationAccepted as the identifier for this webhook.

Event Data

The data object contains the worker and classification objects for the event.

Classification Object

The classification object identifies the classification and carries its outcome.

Classification fields
id is the ID that refers to the classification in the Worksome platform. You can query the API for the full details using this ID, with the classification(id:) query.
accountId is the ID that refers to the company account in the Worksome platform, and you can query the API for the full details using this ID.
hireId is the ID that refers to the hire in the Worksome platform, and you can query the API for the full details using this ID.
status is the status of the classification. For this event, it will always be "accepted".
result.outcome is the outcome of the classification: INDEPENDENT (independent contractor), EMPLOYEE, or UNKNOWN. These are values of the ClassificationResult enum, the same values Classification.result.outcome returns in the API. It is null if the classification has no outcome.

Worker Object

The worker object has fields identifying the worker and most important details.

Fields named here are always present.

Worker fields
id is the ID that refers to the worker in the platform. You can query the API for the full details using this ID.
name is the full name of the worker.
firstName is the first name of the worker.
lastName is the last name of the worker.
middleName is the middle name of the worker.
email is the email for the worker.
phone is the phone number of the worker.
location is the location of the Worker as an object. The object includes name, address, city, zipcode, country, county, state.
businessEntity is details for the Worker’s business entity as an object. The object includes entity_type, label, company_no, company_name and tax_no.

Payload example

{
    "event": "classificationAccepted",
    "data": {
        "worker": {
            "id": "V29ya2VyOjIzNDU2",
            "name": "Peter Bishop",
            "firstName": "Peter",
            "lastName": "Bishop",
            "middleName": "",
            "email": "[email protected]",
            "phone": "+16955024",
            "location": {
                "name": "Home address",
                "address": "150 Maplewood Drive, Suite 200",
                "city": "Springfield",
                "zipcode": "62704",
                "country": "US",
                "county": "",
                "state": "IL"
            },
            "businessEntity": {
                "entity_type": "common_business",
                "label": "Bishop Ltd.",
                "company_no": "987654321",
                "company_name": "Bishop Ltd.",
                "tax_no": "ST-1234567890"
            }
        },
        "classification": {
            "id": "V2NyOjEyMzQ1",
            "accountId": "Q29tcGFueTo2Nzg5",
            "hireId": "SGlyZToxMjM0NQ==",
            "status": "accepted",
            "result": {
                "outcome": "INDEPENDENT"
            }
        }
    }
}