New EOR endpoints

Added

Retrieve Payslips

Retrieve a list of payslips for a specific worker by their worker ID.

Endpoint: GET /rest/v1/eor/workers/{worker_id}/payslips

Sample request

curl --request GET \
     --url https://api.letsdeel.com/rest/v1/eor/workers/0123abcd-e031-4f1e-93d4-6bc66e8c4727/payslips \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token'

Download Specific Payslip

Download a specific payslip for a worker using the payslip’s ID.
Endpoint: GET /rest/v1/eor/workers/{worker_id}/payslips/{payslip_id}/download

Sample request

curl --request GET \
     --url https://api.letsdeel.com/rest/v1/eor/workers/0123abcd-e031-4f1e-93d4-6bc66e8c4727/payslips/ApdZbLvq0r0E/download \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token'

New Global Payroll endpoints

Added

Retrieve Payslips

Retrieve a list of payslips for a specific worker by their worker ID.

Endpoint: GET /rest/v1/gp/workers/{worker_id}/payslips

Sample request

curl --request GET \
     --url https://api.letsdeel.com/rest/v1/gp/workers/0123abcd-e031-4f1e-93d4-6bc66e8c4727/payslips \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token'

Download Specific Payslip

Download a specific payslip for a worker using the payslip’s ID.
Endpoint: GET /rest/v1/gp/workers/{worker_id}/payslips/{payslip_id}/download

Sample request

curl --request GET \
     --url https://api.letsdeel.com/rest/v1/gp/workers/0123abcd-e031-4f1e-93d4-6bc66e8c4727/payslips/ApdZbLvq0r0E/download \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token'

Update Address

Update the address details of a worker using their worker ID.
Endpoint: PATCH /rest/v1/gp/workers/{worker_id}/address

Sample request

curl --request PATCH \
     --url https://api.letsdeel.com/rest/v1/gp/workers/0123abcd-e031-4f1e-93d4-6bc66e8c4727/address \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "city": "London",
    "street": "123 Deel Street",
    "zip": "12345"
  }
}
'

Modify Compensation

Modify the compensation details of a specific worker.
Endpoint: PATCH /rest/v1/gp/workers/{worker_id}/compensation

Sample request

curl --request PATCH \
     --url https://api.letsdeel.com/rest/v1/gp/workers/0123abcd-e031-4f1e-93d4-6bc66e8c4727/compensation \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "scale": "YEAR",
    "salary": 50000,
    "effective_date": "1999-12-31"
  }
}
'

Adjust PTO Policy

Adjust the Paid Time Off (PTO) policy for a specific worker.
Endpoint: PATCH /rest/v1/gp/workers/{worker_id}/pto-policy

Sample request

curl --request PATCH \
     --url https://api.letsdeel.com/rest/v1/gp/workers/0123abcd-e031-4f1e-93d4-6bc66e8c4727/pto-policy \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "accrual_start_date": "1999-12-31",
    "yearly_allowance": "15"
  }
}
'

Update Employee Information

Update general employee information for a worker by their ID.
Endpoint: PATCH /rest/v1/gp/workers/{worker_id}/employee-information

Sample request

curl --request PATCH \
     --url https://api.letsdeel.com/rest/v1/gp/workers/worker_id/employee-information \
     --header 'accept: application/json' \
     --header 'authorization: Bearer token' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "first_name": "Jane",
    "middle_name": "Jay",
    "last_name": "Doe",
    "date_of_birth": "1999-12-31",
    "gender": "string",
    "marital_status": "Single"
  }
}
'

Custom fields in GET /people/:id endpoint

We added custom_fields property in the response of GET /people/:id endpoint. Now, you can get custom fields for an employee.

Sample response

{
    "custom_fields": [
        {
            "name": "Job title",
            "value": "Software Engineer II"
        }
    ]
}

New Time-off endpoints.

Added

Time-off API

We have released a whole new time-off API which makes it even easier to add, update, and review employee PTO. The new API uses worker_id as the identifier vs contract_id.

Sample Request

Create a time-off request using the following format

curl --request POST \
     --url https://api.letsdeel.com/rest/v1/people/0123abcd-e031-4f1e-93d4-6bc66e8c4727/time-offs \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {token}' \
     --header 'content-type: multipart/form-data' \
     --form type=VACATION \
     --form start_date=2023-11-03 \
     --form end_date=2023-11-05 \
     --form reason=Holiday

OAuth updates.

Updated

OAuth Server Change

We have moved the OAuth server to the same domain as the Deel app. You can now use app.deel.com/oauth2/... for all of your OAuth-related requests to Deel.

For example, the API call to exchange and auth grant for an access token will look like this:

POST 'https://app.deel.com/oauth2/tokens' \
--header 'Authorization: Basic d3dzZm5lbG84MDowYWZzN3h2MGQ5' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'code={authorization_code}' \
--data-urlencode 'redirect_uri={redirectUri}'

OAuth calls to demo can be made to this host:demo.letsdeel.com/oauth2/....

Introduce people endpoints.

Added

People Endpoints

We're excited to announce the launch of our latest feature, allowing you to retrieve a list of people in your Deel account.

Programmatically fetch, analyze, and leverage a comprehensive list of individuals associated with your organization to enhance team management and strategic decision-making.

Sample Request

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

Sample Response

{
    "data": [
        {
            "id": "a4f91c16-2104-4841-ba4e-77fdcb5bc6ee",
            "created_at": "2023-07-21T07:44:58.437Z",
            "first_name": "Whitney",
            "last_name": "Houston",
            "full_name": "Whitney Houston",
            "emails": [
                {
                    "type": "primary",
                    "value": "[email protected]"
                },
                {
                    "type": "work",
                    "value": null
                },
                {
                    "type": "personal",
                    "value": "[email protected]"
                }
            ],
            "birth_date": null,
            "start_date": "2023-08-05",
            "nationality": null,
            "client_legal_entity": {
                "id": 232324,
                "name": "Aleena Moon"
            },
            "state": "BE",
            "seniority": "Lead (Individual Contributor Level 4)",
            "completion_date": "2023-07-21T07:45:11.807Z",
            "direct_manager": null,
            "direct_reports": null,
            "direct_reports_count": 0,
            "employments": [
                {
                    "id": "3edvyng",
                    "name": "Fixed-Rate API- 2023-07-21",
                    "team": {
                        "id": 384149,
                        "name": "Oleena"
                    },
                    "email": "[email protected]",
                    "state": "BE",
                    "country": "GE",
                    "payment": null,
                    "is_ended": true,
                    "timezone": null,
                    "job_title": "QA Engineer",
                    "seniority": "Lead (Individual Contributor Level 4)",
                    "start_date": "2023-08-05",
                    "work_email": null,
                    "hiring_type": "contractor",
                    "hiring_status": "inactive",
                    "completion_date": "2023-07-21T07:45:11.807Z",
                    "contract_status": "cancelled",
                    "voluntarily_left": null,
                    "contract_coverage": null,
                    "new_hiring_status": "inactive",
                    "client_legal_entity": {
                        "id": 232324,
                        "name": "Aleena Moon"
                    },
                    "has_eor_termination": null,
                    "contract_is_archived": false,
                    "contract_has_contractor": false,
                    "is_user_contract_deleted": false,
                    "hris_direct_employee_invitation": null
                }
            ],
            "hiring_status": "inactive",
            "new_hiring_status": "inactive",
            "hiring_type": "contractor",
            "job_title": "QA Engineer",
            "country": "GE",
            "timezone": null,
            "department": null,
            "work_location": null
        }
    ]
}

Improved

EOR Pensions

We have added a pension object in the response of the country guide endpoint that indicates if this country has a pension benefit available or not.

 "pension": {
   "status": "REQUIRED",
   "providers": [
    {
     "id": 0,
     "name": "US Pension",
     "home_page_url": "https://bit.ly/3uW72fp",
     "contribution": {
      "type": "PERCENTAGE",
      "minimum": "5.00",
      "maximum": "10.00"
     }
    }
   ]
  }

To ensure your employees receive this benefit, make sure to include a new pension object while creating an EOR Contract quote (using the POST /eor endpoint). This will allow you to set the preferred pension provider for the employees.
This new pension object has two properties:

  1. id: Pension provider's id
  2. contribution: You should send this value when the pension provider that you choose has a contribution object.

The contribution property should have a value between the minimum and maximum given.

"pension": {
   "id": "0",
   "contribution": "7.00"
  }

SCIM API Filters

We have added email and name filters to the Deel HR SCIM API Users endpoint. Now you can search for a user based on their email, givenName, or familyName.

To search for someone based on their email format the request like this:

curl --request GET \
     --url 'https://api-staging.letsdeel.com/scim/v2/Users?filter=email%20eq%20%22john%22&startIndex=1&count=50' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {token}

To search for someone based on their givenName, format the request like this:

curl --request GET \
     --url 'https://api-staging.letsdeel.com/scim/v2/Users?filter=name.givenName%20eq%20%22john%22&startIndex=1&count=50' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {token}

To search for someone based on their familyName, format the request like this:

curl --request GET \
     --url 'https://api-staging.letsdeel.com/scim/v2/Users?filter=name.familyName%20eq%20%22john%22&startIndex=1&count=50' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {token}

New additions: Managers API.

Added

Managers Endpoints

We're excited to announce the launch of our latest feature that allows developers to seamlessly integrate Deel with their existing systems.

With the Deel API, you can now add client users (managers) to your Deel accounts and effortlessly list existing managers.

The key impacts of this feature include streamlined integration, enhanced efficiency in user management, scalability, improved user experience, and future expansions in functionality such as role assignment and user removal.

Simplify your onboarding and user management with Deel API Manager Integration.

Sample Request

POST 'https://api.letsdeel.com/rest/v1/managers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data-raw '{ 
    "data": {
            "first_name": "Nic",
            "last_name": "Jokic",
            "email": "[email protected]",
    }
}'

Read more about this endpoint here.

Introducing Onboarding API.

Added

Onboarding API

Create candidates in Deel with a simple and minimal API call. Deel partners don't need extensive information to create people in Deel. Whether you're an ATS or a job board, you can use Deel Onboarding API to create candidates in Deel.

POST 'https://api.letsdeel.com/rest/v1/candidates' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--header 'x-client-id: {client_id}' \
--data-raw '{ 
    "data": {
      "id": "dhzj64mgen",
      "first_name": "Taylor",
      "last_name": "Swift",
      "status": "offer-accepted",
      "link": "https://your-ats.com/path/to/candidate/dhzj64mgen",
      "email": "[email protected]"
    }
}'

Candidates created with the API will show up in Deel at the top of the People list. Clients can click the "Review & Onboard" button to onboard candidates.

SCIM API: Edit User

You can now edit users in Deel HR SCIM API. The latest PATCH User endpoint enables you to edit a user's work email and manager.

Improved

OAuth app creation flow

We have changed the OAuth app creation flow to make it easy for you to get started with OAuth.

Sandbox: All OAuth apps created in Sandbox/Demo will be automatically published. You don't need to wait for our approval anymore.

Production: All OAuth apps created in production will be automatically submitted for review. Once reviewed the app will be published.

Introducing Organization Tokens and more.

Added

Organization Tokens

We are introducing a new type of API access token: Organization Token. This token unlike the Personal access token is not tied to a read user. Hence this token transcends user permissions and can access all data in an organization. This token remains valid even if the user account that generated this token becomes deactivated.

Head to Developer Center to generate an organization token for your organization.

Sandbox in API Playground

You can now call Sandbox API from the Deel API reference page. Click on the BASE URL option in the right toolbar to select the server you want to use.

Add Document Endpoint

You can now attach documents to a contract using Deel API. If you have the need to add additional documents to a contract, use this endpoint. Head to the API reference to see this endpoint.

Sample Request

curl --location 'https://api.letsdeel.com/rest/v1/contracts/{id}/documents' \
--header 'Authorization: Bearer {token}' \
--form 'file=@"/path/to/file/file.pdf"'

Sample Response

{
    "data": {
        "filename": "Screenshot 2023-05-09 at 19.38.23.png",
        "key": "AxWzjRhpTn4Qkn_VnEF1K"
    }
}

OAuth: Organization Apps

We have added app type to OAuth. Now you can choose whether to create a personal or organization app. The organization app generates organization access tokens whereas the personal app generates a personal access token.

If you are building on SCIM API, you must create an organization app as SCIM API only works with organization tokens. Learn more.

Bug fixed and improvements.

Improved

Invoice adjustment pagination

We have added offset-based pagination to the Invoice adjustment GET endpoint. You can make use of theoffset and limit properties to paginate requests.

Sample Request

curl --location 'https://api.letsdeel.com/rest/v1/invoice-adjustments?limit=10&offset=2' \
--header 'Authorization: Bearer {token}'

Sample Response

{
    "data": [... ],
    "page": {
        "total_rows": 132,
        "items_per_page": 10,
        "offset": 2
    }
}

Fixed

Invoice adjustment offset limit

The invoice adjustment offset was limited to 99. This bug has been fixed.

In this release we are introducing the following endpoints:

  1. Add external Id to a contract.
  2. Preview contract agreement.

We have also made the following updates:

  1. Added employments to SCIM API response schema.
  2. Added country and state to SCIM API response schema.

Add external Id to a contract

You can now add an external id to a contract. This enables you to add a 3rd-party platform's reference id to a Deel contract so that you can search for this contract later using the external id.

Adding the external Id is simple. Below is a cURL example of this request:

curl --request PATCH \
     --url https://api.letsdeel.com/rest/v1/contracts/:contract_id \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {token}' \
     --header 'content-type: application/json' \
     --data '
{
  "data": {
    "external_id": "ext_123"
  }
}
'

You can search for a contract using the external Id as a query parameter in the listing contract endpoint:

curl --request GET \
     --url 'https://api.letsdeel.com/rest/v1/contracts?external_id=ext_123' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {token}'

View this endpoint in the API reference.

Preview contract agreement

You can retrieve an IC contract agreement content in HTML. Please note: this endpoint does not support EOR and Global Payroll contract types.

Example request:

curl --request GET \
     --url https://api.letsdeel.com/rest/v1/contracts/:contrat_id/preview \
     --header 'accept: text/html' \
     --header 'authorization: Bearer {token}'

View this endpoint in the API reference.

SCIM API Updated

We have added employments, country and state in the User schema response.

Example:

{
    ...
    "urn:ietf:params:scim:schemas:extension:2.0:User": {
        "startDate": "2023-04-26",
        "endDate": "",
        "state": null,
        "country": "NG",
        "employments": [
            {
                "contractId": "7GBVRoFjo7er7HKHFaszL",
                "title": "Direct Marketing Administrator",
                "startDate": "2023-04-26",
                "contractType": "hris_direct_employee",
                "state": null,
                "country": "NG",
                "active": true
            }
        ]
    },
	 ...
}