npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@deel-developers/deel

v1.0.1

Published

Deelsdk - Deel REST API

Downloads

4

Readme

Deelsdk Typescript SDK 1.0.1

The Typescript SDK for Deelsdk.

  • API version: 1.0.1
  • SDK version: 1.0.1

Table of Contents

About the API

Deel REST API

Installation

npm install deel

Authentication

To see whether an endpoint needs a specific type of authentication check the endpoint's documentation.

Access Token

The Deelsdk API uses access tokens as a form of authentication. You can set the access token when initializing the SDK through the constructor:

const sdk = new Deelsdk('YOUR_ACCESS_TOKEN')

Or through the setAccessToken method:

const sdk = new Deelsdk()
sdk.setAccessToken('YOUR_ACCESS_TOKEN')

You can also set it for each service individually:

const sdk = new Deelsdk()
sdk.accounting.setAccessToken('YOUR_ACCESS_TOKEN')

Sample Usage

Here is a simple program demonstrating usage of this SDK. It can also be found in the examples/src/index.ts file in this directory.

When running the sample make sure to use npm install to install all the dependencies.

import { Deelsdk } from '@deel-developers/deel';


const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  try {
    const result = await sdk.accounting
      .getInvoiceList();
    console.log(result);
  } catch (err) {
    const error = err as Error;
    console.error(error.message);
  }
})();

Environments

Here is the list of all available environments:

DEFAULT = 'https://api.letsdeel.com/rest/v2',
DEMO = 'https://api-staging.letsdeel.com/rest/v2',
PRODUCTION = 'https://api.letsdeel.com/rest/v2'

How to set the environment:

const sdk = new Deelsdk();
sdk.setEnvironment(Environment.DEFAULT);

Deelsdk Services

A list of all services and services methods.

Accounting

| Method | Description | | :-------------------------------------------------------------- | :--------------------------- | | getInvoiceList | Retrieve invoices | | getDeelInvoiceList | Retrieve Deel invoices | | getBillingInvoiceDownloadLink | Download invoice PDF | | getPaymentList | Retrieve payment reciepts | | getPaymentsBreakDownById | Retrieve a payment breakdown |

Managers

| Method | Description | | :------------------------------ | :--------------- | | createManager | Create a manager | | getManagers | List of managers |

People

| Method | Description | | :------------------------------------------------------------------------ | :-------------------------------- | | createDirectEmployee | Create a new Hris direct employee | | getInternalPeopleList | Get internal people list | | getPeopleList | List of people | | getPeopleById | Retrieve a single person | | updatePeopleDepartment | Update department | | updatePeopleWorkingLocation | Update working location | | getPeople | Get my current profile | | createTimeOffsForEmployee | Add a time off request | | getTimeOffsForEmployee | List of time off entries | | getTimeOffsEntitlementsForEmployee | List of time off entitlements | | updateTimeOffsForEmployee | Edit a time off request | | deleteTimeOffsForEmployee | Delete a time off request | | reviewTimeOffsForEmployee | Review a time off request | | getTimeOffsPoliciesForEmployee | List of time off policies |

Eor

| Method | Description | | :---------------------------------------------------------------- | :------------------------- | | getEorCountryValidations | Retrieve country guide | | getEorWorkerPayslips | Retrieve employee payslips | | getEorWorkerPayslipDownloadUrl | Download payslip PDF | | calculateEorEmploymentCost | Employee Cost Calculator | | getEorContractBenefits | Get EOR contract benefits | | createEorContract | Create an EOR contract |

GlobalPayroll

| Method | Description | | :------------------------------------------------------------ | :---------------------------------- | | createGpContract | Create a contract | | getWorkerPayslips | Retrieve employee payslips | | updateGpEmployeeAddress | Update address | | addGpBankAccount | Add bank account | | getGpBankAccounts | Retrieve bank accounts | | patchGpBankAccount | Modify bank account | | getGpBankGuide | Retrieve bank guide | | updateGpEmployeeCompensation | Update compensation | | updateGpEmployeePto | Update PTO policy | | updateGpEmployeeInformation | Update employee information | | getDownloadUrlForGpPayslip | Download payslip PDF | | getGpLegalEntities | List payroll events by legal entity | | getGrossToNetGpReports | List gross-to-net report | | downloadGrossToNetGpReport | Download gross-to-net report | | requestTermination | Request termination |

Contractors

| Method | Description | | :------------------------------------------------------------ | :-------------------------------------- | | createContractTimeBased | Create a new contract (time-based) | | createContractTaskBased | Create a new contract (task-based) | | createContractMilestoneBased | Create a new contract (milestone-based) | | createContractFixedRate | Create a new contract (fixed-rate) | | getContractPreview | Preview a contract agreement | | amendContractDetails | Amend contract | | terminateContract | Terminate contract | | addPremium | Upgrade to Premium | | removePremiumFromContract | Downgrade from Premium |

Adjustments

| Method | Description | | :---------------------------------------- | :---------------------- | | createAdjustment | Create a new adjustment | | getAdjustmentsById | Retrieve an adjustment | | updateAdjustment | Update an adjustment | | deleteAdjustment | Delete an adjustment | | getCategories | Retrieve categories | | createFileRef | Upload file to Deel | | getAdjustments | Retrieve adjustments |

Candidates

| Method | Description | | :-------------------------------- | :--------------- | | addCandidate | Add Candidate | | patchCandidate | Update Candidate |

PartnerManaged

| Method | Description | | :-------------------------------------------------------------------------------------- | :--------------------------------------------- | | addEmployeeAdditionalInformation | Add additional information | | signEmployeeContract | Sign a contract | | requestCustomVerificationLetter | Request custom verification letter | | getHrVerificationLettersAndDocuments | List HR verification letters and documents | | downloadHrVerificationLettersAndDocuments | Download HR verification letters and documents | | getOfferLetterPreview | Preview job offer letter | | getEmployeeAgreementPreview | Preview employee agreement | | getEmployeeAgreementDownloadLink | Download employee agreement PDF | | getBankAccountGuide | Bank account form | | addBankAccount | Add bank account | | patchBankAccount | Modify bank account for an EOR employee | | getEmployeePayslips | Get list of payslips for an EOR employee | | getEmployeeComplianceDocuments | List of employee compliance documents | | uploadEmployeeComplianceDocument | Upload employee compliance document | | getEmployeeComplianceDocumentTemplate | Download employee compliance document template | | getEmployeeTaxDocuments | List of tax documents for an employee |

Contracts

| Method | Description | | :---------------------------------------------------------------- | :------------------------------------------- | | createContract | Create a new contract | | getContractList | List of contracts | | getContractById | Retrieve a single contract | | attachExternalId | External Id | | addContractDocument | Attach a file to contract | | editContractDocument | Edit the file attached to contract document. | | getAlternateEmailsByContractId | Find contract emails by ID | | signContract | Sign a contract | | archiveContract | Archive a contract | | inviteToSignContract | Send contract to worker | | uninviteToSignContract | Remove invite | | calculateFinalPayment | Calculate final payment | | postContractEstimate | Calculate first payment amount | | getContractTemplates | Get contract templates | | getWorkerDocumentsById | List of worker documents | | getDownloadWorkerDocumentsById | Download worker document |

Tasks

| Method | Description | | :-------------------------------------------- | :-------------------- | | createContractPgoTak | Create new task | | getTasksByContract | List of tasks | | createTaskManyReview | Review multiple tasks | | createTaskReviewById | Review a single task | | deleteContractPgoTak | Delete task |

Timesheets

| Method | Description | | :-------------------------------------------------- | :-------------------------------- | | getTimesheetsByContract | List of timesheets by contract | | createTimesheet | Create a timesheet entry | | getTimesheets | List of timesheets | | getTimesheetById | Retrieve a single timesheet entry | | updateTimesheetById | Update a timesheet entry | | deleteTimesheetById | Delete a timesheet entry | | createTimesheetReview | Review a single timesheet | | createTimesheetReviews | Review multiple timesheets |

Milestones

| Method | Description | | :------------------------------------------------------------ | :----------------------------- | | createMilestone | Create a milestone | | getMilestonesByContract | List of milestones by contract | | getMilestonesByContractAndId | Retrieve a single milestone | | deleteMilestoneById | Delete a milestone | | createMilestoneReview | Review a single milestone | | createMilestoneReviews | Review multiple milestones |

OffCyclePayments

| Method | Description | | :---------------------------------------------------------------------- | :---------------------------------- | | createOffCyclePayment | Add off-cycle payment | | getOffCyclePaymentsByContract | List of off-cycle payments | | getOffCyclePaymentByContractAndId | Retrieve a single off-cycle payment |

TimeOff

| Method | Description | | :-------------------------------------------- | :------------------------------------ | | createEorTimeOffs | Add a time off request (obsolete) | | getEorTimeOffs | List time off by contract (obsolete) | | deleteEorTimeOffs | Cancel a time off request (obsolete) | | editEorTimeOffs | Edit a time off request (obsolete) | | getEorEntitlements | List time off entitlements (obsolete) | | getEorClientTimeOffs | List of time offs (obsolete) | | reviewTimeoff | Review a time off request (obsolete) |

Invoices

| Method | Description | | :---------------------------------------------------------------------- | :------------------------------ | | getInvoiceAdjustmentsByContractId | Invoice line items by contract | | createInvoiceAdjustment | Create an invoice adjustment | | getInvoiceAdjustments | List invoice adjustments | | updateInvoiceAdjustmentById | Update an invoice adjustment | | deleteInvoiceAdjustmentById | Delete an invoice adjustment | | createInvoiceAdjustmentReview | Review an invoice adjustment | | createInvoiceAdjustmentReviews | Bulk review invoice adjustments | | getInvoiceAdjustmentsAttachment | Retrieve Attachment file url. |

Organizations

| Method | Description | | :------------------------------------------ | :------------------------- | | getLegalEntityList | List of legal entities | | getOrganizations | Get current organization | | getTeams | Get team list | | getAgreements | Get agreements with Deel. | | getDepartments | Retrieve departments | | getWorkingLocations | Retrieve working locations |

Lookups

| Method | Description | | :---------------------------------------- | :--------------- | | getCountries | Country list | | getCurrencies | Currency list | | getJobTitleList | Job titles list | | getSeniorityList | Seniority levels | | getTimeoffTypeList | Time-off types |

Webhooks

| Method | Description | | :---------------------------------------------------------- | :-------------------------- | | createWebhook | Create a webhook | | getAllWebhooks | List of webhooks | | webhookControllerGetById | Retrieve a single webhook | | webhookControllerEditById | Edit a webhook | | webhookControllerDeleteById | Delete a webhook | | getAllWebhookEventTypes | List of webhook event types |

Token

| Method | Description | | :-------------------------------------- | :-------------------- | | createPublicToken | Create a public token |

Carta

| Method | Description | | :---------------------------------------------- | :-------------------- | | getEquityStakeholders | Retrieve stakeholders |

All Methods

getInvoiceList

Retrieve invoices

  • HTTP Method: GET
  • Endpoint: /invoices

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :------------- | :----------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------- | | issuedFromDate | string | to get records created after given issue date | | issuedToDate | string | to get records created before given issued date | | entities | Entities | Filter by legal entity type; company, or individual | | limit | number | Return a page of results with given number of records; NOTE technically ALL query parameters are strings or array of strings | | offset | number | Return a page of results after given index of row; NOTE technically ALL query parameters are strings or array of strings' |

Return Type

InvoiceListContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.accounting.getInvoiceList({
    issuedFromDate: 'issued_from_date',
    issuedToDate: 'issued_to_date',
    entities: ['et deserunt', 'et eiusmod ipsum'],
    limit: 10,
    offset: 42,
  });
  console.log(result);
})();

getDeelInvoiceList

Retrieve Deel invoices

  • HTTP Method: GET
  • Endpoint: /invoices/deel

Required Parameters

| Name | Type | Description | | :--------- | :----- | :---------------- | | contractId | string | Deel contract id. |

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :----- | :----- | :--------------------------------------------------------------------------------------------------------------------------- | | limit | number | Return a page of results with given number of records; NOTE technically ALL query parameters are strings or array of strings | | offset | number | Return a page of results after given index of row; NOTE technically ALL query parameters are strings or array of strings' |

Return Type

DeelInvoiceListContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.accounting.getDeelInvoiceList('contract_id', { limit: 10, offset: 42 });
  console.log(result);
})();

getBillingInvoiceDownloadLink

Download invoice PDF

  • HTTP Method: GET
  • Endpoint: /invoices/{invoice_id}/download

Required Parameters

| Name | Type | Description | | :-------- | :----- | :------------------------ | | invoiceId | string | ID of an existing invoice |

Return Type

InvoiceDownloadLinkContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.accounting.getBillingInvoiceDownloadLink('invoice_id');
  console.log(result);
})();

getPaymentList

Retrieve payment reciepts

  • HTTP Method: GET
  • Endpoint: /payments

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :--------- | :--------------------------------------------- | :--------------------------------------------------------------------------- | | dateFrom | string | Filtered results will include records created on or after the provided date. | | dateTo | string | Filtered results will include records created before the provided date. | | currencies | Currencies | Currency codes of contracts to filter. | | entities | Entities | Filter by legal entity type; company, or individual |

Return Type

PaymentListContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.accounting.getPaymentList({
    dateFrom: '1999-12-31',
    dateTo: '1999-12-31',
    currencies: 'foo',
    entities: ['adipisicing in', 'consectetur ut aute anim'],
  });
  console.log(result);
})();

getPaymentsBreakDownById

Retrieve a payment breakdown

  • HTTP Method: GET
  • Endpoint: /payments/{payment_id}/breakdown

Required Parameters

| Name | Type | Description | | :-------- | :----- | :---------- | | paymentId | string | |

Return Type

PaymentBreakDownContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.accounting.getPaymentsBreakDownById('payment_id');
  console.log(result);
})();

createManager

Create a manager

  • HTTP Method: POST
  • Endpoint: /managers

Required Parameters

| input | object | Request body. |

Return Type

CreateAdminUserResponseContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.managers.createManager(input);
  console.log(result);
})();

getManagers

List of managers

  • HTTP Method: GET
  • Endpoint: /managers

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :----- | :----- | :------------------------------------------------------------- | | limit | string | Maximum number of records to return. | | offset | string | Offset/index of record for the next page of records to return. |

Return Type

AdminUsersContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.managers.getManagers({ limit: '50', offset: '0' });
  console.log(result);
})();

createDirectEmployee

Create a new Hris direct employee

  • HTTP Method: POST
  • Endpoint: /hris/direct-employees

Required Parameters

| input | object | Request body. |

Return Type

HrisDirectEmployeeContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = {
    compensation: {},
    contract: {},
    employee_details: {},
    job_information: {},
    team_information: {},
    vacation_info: {
      vacation_accrual_start_date: '1925-12-02',
      vacation_yearly_policy: 195.35794022086918,
    },
  };
  const result = await sdk.people.createDirectEmployee(input);
  console.log(result);
})();

getInternalPeopleList

Get internal people list

  • HTTP Method: GET
  • Endpoint: /internal/people

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :----- | :----- | :----------------------------------------------------- | | offset | number | Return a page of results with given number of records. | | limit | number | Return a page of results with given number of records. |

Return Type

InternalPeopleContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.people.getInternalPeopleList({ offset: 42, limit: 150.66499168902195 });
  console.log(result);
})();

getPeopleList

List of people

  • HTTP Method: GET
  • Endpoint: /people

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :--------------- | :--------------------------------------------------------- | :--------------------------------------------------------------------------- | | offset | number | Return a page of results with given number of records. | | limit | number | Return a page of results with given number of records. | | search | string | Include a contract if by name or contractor name contains given search term. | | sortBy | PeopleSortByEnum | Sort people by given field name. | | sortOrder | SortDirEnum | Order direction of results; ascending or descending. | | hiringStatuses_ | HiringStatusEnum | Employee's current hiring status. |

Return Type

PeopleContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.people.getPeopleList({
    offset: 42,
    limit: 56.60816787039617,
    search: 'search',
    sortBy: 'job_title',
    sortOrder: 'asc',
    hiringStatuses: 'inactive',
  });
  console.log(result);
})();

getPeopleById

Retrieve a single person

  • HTTP Method: GET
  • Endpoint: /people/{worker_id}

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. |

Return Type

PeopleByIdContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.people.getPeopleById('worker_id');
  console.log(result);
})();

updatePeopleDepartment

Update department

  • HTTP Method: PUT
  • Endpoint: /people/{worker_id}/department

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

GenericResultUpdated

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.people.updatePeopleDepartment(input, 'worker_id');
  console.log(result);
})();

updatePeopleWorkingLocation

Update working location

  • HTTP Method: PUT
  • Endpoint: /people/{worker_id}/working-location

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

GenericResultUpdated

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.people.updatePeopleWorkingLocation(input, 'worker_id');
  console.log(result);
})();

getPeople

Get my current profile

  • HTTP Method: GET
  • Endpoint: /people/me

Return Type

PeopleMe

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.people.getPeople();
  console.log(result);
})();

createTimeOffsForEmployee

Add a time off request

  • HTTP Method: POST
  • Endpoint: /people/{worker_id}/time-offs

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

EmployeeTimeoffsCreationContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = {};
  const result = await sdk.people.createTimeOffsForEmployee(input, 'worker_id');
  console.log(result);
})();

getTimeOffsForEmployee

List of time off entries

  • HTTP Method: GET
  • Endpoint: /people/{worker_id}/time-offs

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. |

Return Type

EmployeeTimeoffsContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.people.getTimeOffsForEmployee('worker_id');
  console.log(result);
})();

getTimeOffsEntitlementsForEmployee

List of time off entitlements

  • HTTP Method: GET
  • Endpoint: /people/{worker_id}/time-offs/entitlements

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. |

Return Type

EmployeeTimeoffsEntitlementsContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.people.getTimeOffsEntitlementsForEmployee('worker_id');
  console.log(result);
})();

updateTimeOffsForEmployee

Edit a time off request

  • HTTP Method: PATCH
  • Endpoint: /people/{worker_id}/time-offs/{timeoff_id}

Required Parameters

| Name | Type | Description | | :-------- | :----- | :---------------------------------------- | | timeoffId | string | Unique identifier for a time-off in Deel. | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

EmployeeTimeoffsCreationContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = {};
  const result = await sdk.people.updateTimeOffsForEmployee(input, 'timeoff_id', 'worker_id');
  console.log(result);
})();

deleteTimeOffsForEmployee

Delete a time off request

  • HTTP Method: DELETE
  • Endpoint: /people/{worker_id}/time-offs/{timeoff_id}

Required Parameters

| Name | Type | Description | | :-------- | :----- | :---------------------------------------- | | timeoffId | string | Unique identifier for a time-off in Deel. | | workerId | string | Unique identifier for a worker. |

Return Type

GenericResultDeleted

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.people.deleteTimeOffsForEmployee('timeoff_id', 'worker_id');
  console.log(result);
})();

reviewTimeOffsForEmployee

Review a time off request

  • HTTP Method: PATCH
  • Endpoint: /people/{worker_id}/time-offs/{timeoff_id}/review

Required Parameters

| Name | Type | Description | | :-------- | :----- | :---------------------------------------- | | timeoffId | string | Unique identifier for a time-off in Deel. | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

EmployeeTimeoffsContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.people.reviewTimeOffsForEmployee(input, 'timeoff_id', 'worker_id');
  console.log(result);
})();

getTimeOffsPoliciesForEmployee

List of time off policies

  • HTTP Method: GET
  • Endpoint: /people/{worker_id}/time-offs/policies

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. |

Return Type

EmployeeTimeoffsPoliciesContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.people.getTimeOffsPoliciesForEmployee('worker_id');
  console.log(result);
})();

getEorCountryValidations

Retrieve country guide

  • HTTP Method: GET
  • Endpoint: /eor/validations/{country_code}

Required Parameters

| Name | Type | Description | | :---------- | :----- | :------------ | | countryCode | string | Country code. |

Return Type

EorCountryValidationsContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.eor.getEorCountryValidations('US');
  console.log(result);
})();

getEorWorkerPayslips

Retrieve employee payslips

  • HTTP Method: GET
  • Endpoint: /eor/workers/{worker_id}/payslips

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. |

Return Type

EorPayslipsListContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.eor.getEorWorkerPayslips('worker_id');
  console.log(result);
})();

getEorWorkerPayslipDownloadUrl

Download payslip PDF

  • HTTP Method: GET
  • Endpoint: /eor/workers/{worker_id}/payslips/{payslip_id}/download

Required Parameters

| Name | Type | Description | | :-------- | :----- | :------------------------------- | | workerId | string | Unique identifier for a worker. | | payslipId | string | Unique identifier for a payslip. |

Return Type

EorPayslipDownloadUrlContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.eor.getEorWorkerPayslipDownloadUrl('worker_id', 'payslip_id');
  console.log(result);
})();

calculateEorEmploymentCost

Employee Cost Calculator

  • HTTP Method: POST
  • Endpoint: /eor/employment_cost

Required Parameters

| input | object | Request body. |

Return Type

EorEmployeeCostCalculationResponseContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.eor.calculateEorEmploymentCost(input);
  console.log(result);
})();

getEorContractBenefits

Get EOR contract benefits

  • HTTP Method: GET
  • Endpoint: /eor/{contract_id}/benefits

Required Parameters

| Name | Type | Description | | :--------- | :----- | :---------------- | | contractId | string | Deel contract id. |

Return Type

EorContractBenefitsContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.eor.getEorContractBenefits('contract_id');
  console.log(result);
})();

createEorContract

Create an EOR contract

  • HTTP Method: POST
  • Endpoint: /eor

Required Parameters

| input | object | Request body. |

Return Type

EorContractCreatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.eor.createEorContract(input);
  console.log(result);
})();

createGpContract

Create a contract

  • HTTP Method: POST
  • Endpoint: /contracts/gp

Required Parameters

| input | object | Request body. |

Return Type

GpContractCreatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.globalPayroll.createGpContract(input);
  console.log(result);
})();

getWorkerPayslips

Retrieve employee payslips

  • HTTP Method: GET
  • Endpoint: /gp/workers/{worker_id}/payslips

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. |

Return Type

GpPayslipsListContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.globalPayroll.getWorkerPayslips('worker_id');
  console.log(result);
})();

updateGpEmployeeAddress

Update address

  • HTTP Method: PATCH
  • Endpoint: /gp/workers/{worker_id}/address

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

GpEmployeeAddressUpdatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.globalPayroll.updateGpEmployeeAddress(input, 'worker_id');
  console.log(result);
})();

addGpBankAccount

Add bank account

  • HTTP Method: POST
  • Endpoint: /gp/workers/{worker_id}/banks

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

BankAccountUpdatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.globalPayroll.addGpBankAccount(input, 'worker_id');
  console.log(result);
})();

getGpBankAccounts

Retrieve bank accounts

  • HTTP Method: GET
  • Endpoint: /gp/workers/{worker_id}/banks

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. |

Return Type

WorkerBankAccountsInfoContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.globalPayroll.getGpBankAccounts('worker_id');
  console.log(result);
})();

patchGpBankAccount

Modify bank account

  • HTTP Method: PATCH
  • Endpoint: /gp/workers/{worker_id}/banks/{bank_id}

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | bankId | string | Bank Account id. | | input | object | Request body. |

Return Type

BankAccountUpdatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.globalPayroll.patchGpBankAccount(input, 'worker_id', 'bank_id');
  console.log(result);
})();

getGpBankGuide

Retrieve bank guide

  • HTTP Method: GET
  • Endpoint: /gp/workers/{worker_id}/banks/guide

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. |

Return Type

BankAccountGuideContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.globalPayroll.getGpBankGuide('worker_id');
  console.log(result);
})();

updateGpEmployeeCompensation

Update compensation

  • HTTP Method: PATCH
  • Endpoint: /gp/workers/{worker_id}/compensation

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

GpEmployeeCompensationUpdatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.globalPayroll.updateGpEmployeeCompensation(input, 'worker_id');
  console.log(result);
})();

updateGpEmployeePto

Update PTO policy

  • HTTP Method: PATCH
  • Endpoint: /gp/workers/{worker_id}/pto-policy

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

GenericResultUpdated

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.globalPayroll.updateGpEmployeePto(input, 'worker_id');
  console.log(result);
})();

updateGpEmployeeInformation

Update employee information

  • HTTP Method: PATCH
  • Endpoint: /gp/workers/{worker_id}/employee-information

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

GpEmployeeInformationUpdatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.globalPayroll.updateGpEmployeeInformation(input, 'worker_id');
  console.log(result);
})();

getDownloadUrlForGpPayslip

Download payslip PDF

  • HTTP Method: GET
  • Endpoint: /gp/workers/{worker_id}/payslips/{payslip_id}/download

Required Parameters

| Name | Type | Description | | :-------- | :----- | :------------------------------- | | workerId | string | Unique identifier for a worker. | | payslipId | string | Unique identifier for a payslip. |

Return Type

GpPayslipDownloadUrlContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.globalPayroll.getDownloadUrlForGpPayslip('worker_id', 'payslip_id');
  console.log(result);
})();

getGpLegalEntities

List payroll events by legal entity

  • HTTP Method: GET
  • Endpoint: /gp/legal-entities/{legal_entity_id}/reports

Required Parameters

| Name | Type | Description | | :------------ | :----- | :--------------------- | | legalEntityId | string | Id of an legal entity. |

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :-------- | :----- | :---------------------------- | | startDate | string | Start date of payroll report. |

Return Type

GpPayrollEventReportContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.globalPayroll.getGpLegalEntities(
    '285df33d-e27d-f5e2-16e5-83d49651a250',
    { startDate: '1999-12-31' },
  );
  console.log(result);
})();

getGrossToNetGpReports

List gross-to-net report

  • HTTP Method: GET
  • Endpoint: /gp/reports/{gp_report_id}/gross_to_net

Required Parameters

| Name | Type | Description | | :--------- | :----- | :--------------- | | gpReportId | string | Id of gp report. |

Return Type

GlobalPayrollG2NReportContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.globalPayroll.getGrossToNetGpReports(
    '92ab5283-e503-cc7f-f46a-b0fb87e3de40',
  );
  console.log(result);
})();

downloadGrossToNetGpReport

Download gross-to-net report

  • HTTP Method: GET
  • Endpoint: /gp/reports/{gp_report_id}/gross_to_net/csv

Required Parameters

| Name | Type | Description | | :--------- | :----- | :--------------- | | gpReportId | string | Id of gp report. |

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.globalPayroll.downloadGrossToNetGpReport(
    '190fae10-595f-afe0-d7a3-27d3c8d3194c',
  );
  console.log(result);
})();

requestTermination

Request termination

  • HTTP Method: POST
  • Endpoint: /gp/workers/{worker_id}/terminations

Required Parameters

| Name | Type | Description | | :------- | :----- | :------------------------------ | | workerId | string | Unique identifier for a worker. | | input | object | Request body. |

Return Type

WorkerTerminationContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.globalPayroll.requestTermination(input, 'worker_id');
  console.log(result);
})();

createContractTimeBased

Create a new contract (time-based)

  • HTTP Method: POST
  • Endpoint: /contracts/time-based

Required Parameters

| input | object | Request body. |

Return Type

ContractContainerPayAsYouGoTimeBased

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.contractors.createContractTimeBased(input);
  console.log(result);
})();

createContractTaskBased

Create a new contract (task-based)

  • HTTP Method: POST
  • Endpoint: /contracts/task-based

Required Parameters

| input | object | Request body. |

Return Type

ContractContainerPaygTasks

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.contractors.createContractTaskBased(input);
  console.log(result);
})();

createContractMilestoneBased

Create a new contract (milestone-based)

  • HTTP Method: POST
  • Endpoint: /contracts/milestone-based

Required Parameters

| input | object | Request body. |

Return Type

ContractContainerPaygMilestones

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.contractors.createContractMilestoneBased(input);
  console.log(result);
})();

createContractFixedRate

Create a new contract (fixed-rate)

  • HTTP Method: POST
  • Endpoint: /contracts/fixed-rate

Required Parameters

| input | object | Request body. |

Return Type

ContractContainerOngoingTimeBased

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.contractors.createContractFixedRate(input);
  console.log(result);
})();

getContractPreview

Preview a contract agreement

  • HTTP Method: GET
  • Endpoint: /contracts/{contract_id}/preview

Required Parameters

| Name | Type | Description | | :--------- | :----- | :---------------- | | contractId | string | Deel contract id. |

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :--------- | :----- | :----------------------------------- | | templateId | string | ID of an existing contract template. |

Return Type

Returns a dict object.

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.contractors.getContractPreview('contract_id', {
    templateId: 'templateId',
  });
  console.log(result);
})();

amendContractDetails

Amend contract

  • HTTP Method: POST
  • Endpoint: /contracts/{contract_id}/amendments

Required Parameters

| Name | Type | Description | | :--------- | :----- | :---------------- | | contractId | string | Deel contract id. | | input | object | Request body. |

Return Type

GenericResultCreated

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.contractors.amendContractDetails(input, 'contract_id');
  console.log(result);
})();

terminateContract

Terminate contract

  • HTTP Method: POST
  • Endpoint: /contracts/{contract_id}/terminations

Required Parameters

| Name | Type | Description | | :--------- | :----- | :---------------- | | contractId | string | Deel contract id. | | input | object | Request body. |

Return Type

ContractTerminationResultContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.contractors.terminateContract(input, 'contract_id');
  console.log(result);
})();

addPremium

Upgrade to Premium

  • HTTP Method: POST
  • Endpoint: /contracts/{contract_id}/premium

Required Parameters

| Name | Type | Description | | :--------- | :----- | :---------------- | | contractId | string | Deel contract id. | | input | object | Request body. |

Return Type

PremiumResultAddedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.contractors.addPremium(input, 'contract_id');
  console.log(result);
})();

removePremiumFromContract

Downgrade from Premium

  • HTTP Method: DELETE
  • Endpoint: /contracts/{contract_id}/premium

Required Parameters

| Name | Type | Description | | :--------- | :----- | :---------------- | | contractId | string | Deel contract id. |

Optional Parameters

Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}

| Name | Type | Description | | :----- | :----- | :------------------------------------------------------------ | | reason | string | Reason for deleting an existing Deel Premium from a contract. |

Return Type

GenericResultDeleted

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.contractors.removePremiumFromContract('contract_id', {
    reason: 'reason',
  });
  console.log(result);
})();

createAdjustment

Create a new adjustment

  • HTTP Method: POST
  • Endpoint: /adjustments

Required Parameters

| input | object | Request body. |

Return Type

AdjustmentCreatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = {};
  const result = await sdk.adjustments.createAdjustment(input);
  console.log(result);
})();

getAdjustmentsById

Retrieve an adjustment

  • HTTP Method: GET
  • Endpoint: /adjustments/{adjustment_id}

Required Parameters

| Name | Type | Description | | :----------- | :----- | :------------- | | adjustmentId | string | Adjustment id. |

Return Type

AdjustmentCreatedContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.adjustments.getAdjustmentsById('adjustment_id');
  console.log(result);
})();

updateAdjustment

Update an adjustment

  • HTTP Method: PATCH
  • Endpoint: /adjustments/{adjustment_id}

Required Parameters

| Name | Type | Description | | :----------- | :----- | :------------- | | adjustmentId | string | Adjustment id. | | input | object | Request body. |

Return Type

GenericResultUpdated

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const input = { data: {} };
  const result = await sdk.adjustments.updateAdjustment(input, 'adjustment_id');
  console.log(result);
})();

deleteAdjustment

Delete an adjustment

  • HTTP Method: DELETE
  • Endpoint: /adjustments/{adjustment_id}

Required Parameters

| Name | Type | Description | | :----------- | :----- | :------------- | | adjustmentId | string | Adjustment id. |

Return Type

GenericResultDeleted

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.adjustments.deleteAdjustment('adjustment_id');
  console.log(result);
})();

getCategories

Retrieve categories

  • HTTP Method: GET
  • Endpoint: /adjustments/categories

Return Type

AdjustmentsCategoriesContainer

Example Usage Code Snippet

import { Deelsdk } from '@deel-developers/deel';

const sdk = new Deelsdk({ accessToken: process.env.DEELSDK_ACCESS_TOKEN });

(async () => {
  const result = await sdk.adjustments.getCategories();
  console.log(result);
})();

createFileRef

Upload file to Deel

  • HTTP Method: POST
  • Endpoint: /attachments

Required Parameters

| input | object | Request body. |

Return Type

OutputToCreate