GuidesAPI ReferenceChangelog
Changelog

In this release, we are introducing Accounting API (beta).

Accounting API

Accounting API endpoints enable you to retrieve accounting-related information from Deel. The following endpoints are available:

  1. Retrieve paid invoices.
  2. Retrieve the payment summary of payments made to Deel.
  3. Retrieve a full breakdown of a payment made to Deel.

Accounting API is currently in (beta) and only available upon request. Please reach other to support to request access.

Country fields

We have added the following new fields in the 'retrieve a single contract' response body.

  1. nationality in the worker object.
  2. country in the employment_details object.
  3. state in the employment_details object.

Timesheets improvements

We have improved the timesheets API so that it returns the created resource information.

Previously, upon creating a timesheet, you would have gotten the following response from Deel API:

{
    "data": {
        "created": true
    }
}

Now, you will get more information about the created resource. Id, status, and created date fields will be returned.

{
    "data": {
        "created": true,
        "created_at": "2022-12-23T09:03:01.267Z",
        "status": "pending",
        "id": 15629734
    }
}

Invocie adjustment improvements

We have improved the invoice adjustment API so that it returns the created resource information.

Previously, upon creating an adjustment, you would have gotten the following response from Deel API:

{
    "data": {
        "created": true
    }
}

Now, you will get more information about the created resource. Id, status, and created date fields will be returned

{
    "data": {
        "created": true,
        "created_at": "2022-12-23T09:03:01.267Z",
        "status": "pending",
        "id": 15629711
    }
}

Webhook Events

We have added timesheets and invoice adjustment webhooks events to the API. You can now subscribe to the following events:

  1. timesheet.created: triggered when a new timesheet is created.
  2. timesheet.reviewed: triggered when a timesheet is approved or denied.
  3. invoice-adjustment.created: triggered when a new invoice adjustment is created.
  4. invoice-adjustment.reviewed: triggered when an invoice adjustment is approved or denied.
  5. time-off.created: triggered when a new EOR contract time off is created.
  6. time-off.reviewed: triggered when an EOR time off is approved or denied.
  7. time-off.updated: triggered when an EOR time off is updated.

Bug fixes

Further, in this release, we have fixed the following bugs:

  1. Incorrect job_title value for EOR contracts in the 'retrieve a single contract' response body.
  2. Incorrect 'full_nameandemail` values in the worker object for EOR contracts.

In this release, we are introducing improvements to EOR endpoints.

Deel Healthcare

In some countries, it is mandatory to have healthcare coverage for employees. The following updates enable you to add healthcare plans to contracts when creating contracts with Deel API.

Retrieve healthcare plans

The EOR country guide endpoint (link) now returns healthcare options available in each country. Below is an example of a US country guide including health insurance providers.

{
  "data": {
    "holiday": {
      "min": "15"
    },
    "part_time_holiday": {
      "type": null,
      "min": "15"
    },
    "sick_days": {
      "min": "0",
      "max": "84"
    },
    "salary": {
      "min": "35568.00",
      "max": "1900000.00"
    },
    "probation": {
      "min": null,
      "max": null
    },
    "part_time_probation": {
      "min": null,
      "max": null
    },
    "work_schedule": {
      "days": {
        "max": null,
        "min": "5.0000"
      },
      "hours": {
        "max": null,
        "min": "8.0000"
      }
    },
    "insurance_fee": "30.00",
    "currency": "USD",
    "hiring_guide_country_name": "united-states",
    "start_date_buffer": 2,
    "definite_contract": {
      "type": "ALLOWED_WITHOUT_LIMITATION",
      "maximum_limitation": null
    },
    "adjustments_information_box": "For reimbursable costs connected to carrying out work, choose “expenses”.\nFor fixed or recurring amounts provided as a benefit to employee, choose “allowances”.",
    "health_insurance": {
      "status": "REQUIRED",
      "providers": [
        {
          "name": "United Healthcare, VSP Vision & Delta Dental: Singles Only",
          "is_unisure": false,
          "home_page_url": "https://bit.ly/3uW72fp",
          "currency": "USD",
          "type": "PLAN",
          "ending_rule": "END_OF_MONTH",
          "days_to_cancel": null,
          "pricing_info_link": null,
          "fixed_price": true,
          "attachments": [
            {
              "id": 2342,
              "label": "Deel USA Health Care Packet.pdf"
            }
          ],
          "client_info_banner": null,
          "is_available_for_new_quotes": false,
          "plan_groups": [
            {
              "name": "Tier",
              "plans": [
                {
                  "id": 72,
                  "name": "USA Healthcare Plan",
                  "price": "570.00",
                  "currency": "USD",
                  "index": 0,
                  "is_enabled": true
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

Create a contract with a healthcare plan

When creating an EOR contract, provide the health insurance plan id in the request payload to indicate the chosen healthcare plan. In the example above, the plan id resides in the following path. data.health_insurance.providers[].plan_groups[].plans[].id

Below is an example request payload to create an EOR contract with the healthcare plan included:

curl --request POST \
     --url https://api.letsdeel.com/rest/v1/eor \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {token}' \
     --header 'content-type: application/json' \
     --data '
{
     "data": {
          "employee": {
               "first_name": "Jane",
               "last_name": "Doe",
               "email": "[email protected]",
               "nationality": "US"
          },
          "employment": {
               "country": "US",
               "state": "CA",
               "type": "Full-time",
               "work_visa_required": false,
               "start_date": "2022-12-31",
               "time_off_type": "STANDARD"
          },
          "client": {
               "legal_entity": {
                    "id": 12345
               },
               "team": {
                    "id": 12345
               }
          },
          "compensation_details": {
               "salary": 45000,
               "currency": "USD"
          },
          "job_title": "Sales Manager",
          "health_plan_id": "72"
     }
}
'

Introducing Deel Webhooks. You can now subscribe to events taking place in Deel.

The complete list of changes in this version is:

Create a webhook
Create a webhook subscription to receive events from Deel. Link.

The following events are supported at the moment:

EventDescription
contract.createdTriggered when a contract is created.
contract.status.updatedTriggered when a contract status is updated.
contract.archivedTriggered when a contract is archived.
contract.terminatedTriggered when a contract is terminated.

Other webhook operations
In addition to creating new webhooks you can also:

  1. Retrieve a list of webhooks.
  2. Retrieve a single webhook.
  3. Edit a webhook.
  4. Delete a webhook.

Alternate email
We have added an alternate email field to the worker object in the contract response. You will now be able to see all the alternate email addresses a contract has.

Introducing Employee of Record (EOR) contract quote creation. You can create EOR contracts using the API.

The complete list of changes in this version is:

EOR Country employment guide
Retrieve employment guide per country to determine local compliance laws and rules to hire full-time or part-time employees. Link.

Create an EOR contract
Create an EOR contract quote to hire full-time or part-time employees. Link.

Custom fields
Retrieve a contract response includes custom fields (if present).

Introducing Employee of Record (EOR) Time off API. Using the EOR Time off API, you can manage employee time off requests.

The complete list of changes in this version is:

1. List time off by contract. link
Retrieve the list of time off requests by an employee.

2. List time off entitlements link
Retrieve a list of time off entitlements for a full-time employee.

3. List of time offs link
List of time offs for all employees in your organization.

4. Add a time off request link
Add a time off request for a full-time employee.

5. Edit a time off request link
Edit a time off request for a full-time employee.

6. Cancel a time off request link
Cancel a time off request for an employee.

7. Review a time off request link
Approve or decline an employee's time off request.

This release introduces the fix to the invoice adjustment file attachment functionality.

Introducing contract termination. You can terminate an active contract with the API.

The complete list of changes in this version is:

1. Terminate the contract. link

curl --location --request POST 'https://api.letsdeel.com/rest/v1/contracts/{id}/terminations' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "terminate_now": false,
        "message": "The project is coming to an end.",
        "completion_date": "2022-12-31"
    }
}'

2. Archive a contract. link

curl --location --request PATCH 'https://api.letsdeel.com/rest/v1/contracts/{id}/archive' \
--header 'Authorization: Bearer {token}'

2. Sign an amendment. link

curl --location --request POST 'https://api.letsdeel.com/rest/v1/contracts/{id}/signatures' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "data": {
    "client_signature": "Jane Doe"
  }
}'

Introducing contract templates. You can retrieve all contract templates in your organization.

The complete list of changes in this version is:

1. Retrieve contract templates. link

curl --location --request GET 'https://api.letsdeel.com/rest/v1/contract-templates' \
--header 'Authorization: Bearer {token}'

2. Sign a contract using a template. link

curl --location --request POST 'https://api.letsdeel.com/rest/v1/contracts/m9zxe29/signatures' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "data": {
    "client_signature": "Jane Doe",
    "contract_template_id": 12345
  }
}'

3. New fields in contract creation payload.
We have added two new (optional) fields in the contract creation payload:

  1. who_reports: You can select who is allowed to add work. Choose between client, contractor or both.
  2. notice_period: You can add the notice period when creating contracts.

Introducing file attachments for invoice adjustments and milestones.

The full list of changes in this version is:

  1. Attach files to invoice adjustments.
  2. Attach files to milestones.

Introducing Deel Premium. You can now add Deel Premium coverage to your contracts using Deel API.

The full list of changes in this version is:

  1. Upgrade a Deel contract to add premium coverage.
  2. Downgrade a contract from premium.