tripletexjs

Typescript / Javascript class for Tripletex 2.0 API

Usage no npm install needed!

<script type="module">
  import tripletexjs from 'https://cdn.skypack.dev/tripletexjs';
</script>

README

[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url]Build Status

Tripletex 2.0 Node.js / Javascript / Typescript API Wrapper

A wrapper for Tripletex 2.0 API in Typescript / Javascript.

  • Build date: 2019-05-02T10:55:48.790Z

Installation

For Node.js

npm

Install it via:

npm install tripletexjs

Getting Started with Typescript

Please follow the installation instruction and execute the following TS code:

import { TokensessionApi, InvoiceApi } from 'tripletexjs';

const tokenSession = new TokensessionApi;

tokenSession.create('xxxx-xxxx-xxxx', 'xxxx-xxxx-xxxx', '2018-07-29T11:42:39.439Z').then(token => {
  const invoice = new InvoiceApi({
    username: '',
    password: token.value.token
  });

  invoice.get(100000).then(invoiceItem => {
    console.log(invoiceItem.value.amount);
  })

})

Getting Started with Javascript

Please follow the installation instruction and execute the following JS code:

const tripletex = require('tripletexjs');

const tokenSession = new tripletex.TokensessionApi;

tokenSession.create('xxxx-xxxx-xxxx', 'xxxx-xxxx-xxxx', '2018-07-29T11:42:39.439Z').then(token => {
  const invoice = new tripletex.InvoiceApi({
    username: '',
    password: token.value.token
  });

  invoice.get(100000).then(invoiceItem => {
    console.log(invoiceItem.value.amount);
  })

})

Documentation for API Endpoints

All URIs are relative to https://tripletex.no/v2

ActivityApi

import { ActivityApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /activity/{id} Find activity by ID.
getForTimeSheet GET /activity/>forTimeSheet Find applicable time sheet activities for an employee on a specific day.
search GET /activity Find activities corresponding with sent data.

AddressApi

import { AddressApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /address/{id} Get address by ID.
put PUT /address/{id} Update address.
search GET /address Find addresses corresponding with sent data.

BankApi

import { BankApi } from 'tripletexjs';
Class Method HTTP request Description
search GET /bank [BETA] Find bank corresponding with sent data.

BankreconciliationApi

import { BankreconciliationApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /bank/reconciliation/{id} [BETA] Delete bank reconciliation by ID.
adjustment PUT /bank/reconciliation/{id}/:adjustment [BETA] Add an adjustment to reconciliation by ID.
fetchFromBank PUT /bank/reconciliation/:fetchFromBank [BETA] Create a bank reconciliation by fetching bank statement from the bank.
get GET /bank/reconciliation/{id} [BETA] Get bank reconciliation.
lastClosed GET /bank/reconciliation/>lastClosed [BETA] Get last closed reconciliation by account ID.
post POST /bank/reconciliation [BETA] Post a bank reconciliation.
put PUT /bank/reconciliation/{id} [BETA] Update a bank reconciliation.
search GET /bank/reconciliation [BETA] Find bank reconciliation corresponding with sent data.

BankreconciliationmatchApi

import { BankreconciliationmatchApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /bank/reconciliation/match/{id} [BETA] Delete a bank reconciliation match by ID.
get GET /bank/reconciliation/match/{id} [BETA] Get bank reconciliation match by ID.
post POST /bank/reconciliation/match [BETA] Create a bank reconciliation match.
put PUT /bank/reconciliation/match/{id} [BETA] Update a bank reconciliation match by ID.
search GET /bank/reconciliation/match [BETA] Find bank reconciliation match corresponding with sent data.
suggest PUT /bank/reconciliation/match/:suggest [BETA] Suggest matches for a bank reconciliation by ID.

BankreconciliationpaymentTypeApi

import { BankreconciliationpaymentTypeApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /bank/reconciliation/paymentType/{id} [BETA] Get payment type by ID.
search GET /bank/reconciliation/paymentType [BETA] Find payment type corresponding with sent data.

BankstatementApi

import { BankstatementApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /bank/statement/{id} [BETA] Delete bank statement by ID.
get GET /bank/statement/{id} [BETA] Get bank statement.
importBankStatement POST /bank/statement/import [BETA] Upload bank statement file.
search GET /bank/statement [BETA] Find bank statement corresponding with sent data.

BankstatementtransactionApi

import { BankstatementtransactionApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /bank/statement/transaction/{id} [BETA] Get bank transaction by ID.
getDetails GET /bank/statement/transaction/{id}/details [BETA] Get additional details about transaction by ID.
search GET /bank/statement/transaction [BETA] Find bank transaction corresponding with sent data.

CompanyApi

import { CompanyApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /company/{id} Find company by ID.
getDivisions GET /company/divisions [DEPRECATED] Find divisions.
getWithLoginAccess GET /company/>withLoginAccess Returns client customers (with accountant/auditor relation) where the current user has login access (proxy login).
put PUT /company Update company information.

CompanyaltinnApi

import { CompanyaltinnApi } from 'tripletexjs';
Class Method HTTP request Description
put PUT /company/settings/altinn [BETA] Update AltInn id and password.
search GET /company/settings/altinn [BETA] Find Altinn id for login in company.

ContactApi

import { ContactApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /contact/{id} Get contact by ID.
post POST /contact Create contact.
put PUT /contact/{id} [BETA] Update contact.
search GET /contact Find contacts corresponding with sent data.

CountryApi

import { CountryApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /country/{id} Get country by ID.
search GET /country Find countries corresponding with sent data.

CrmprospectApi

import { CrmprospectApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /crm/prospect/{id} Get prospect by ID.
search GET /crm/prospect Find prospects corresponding with sent data.

CurrencyApi

import { CurrencyApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /currency/{id} Get currency by ID.
getRate GET /currency/{id}/rate Find currency exchange rate corresponding with sent data.
search GET /currency Find currencies corresponding with sent data.

CustomerApi

import { CustomerApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /customer/{id} Get customer by ID.
post POST /customer Create customer. Related customer addresses may also be created.
postList POST /customer/list [BETA] Create multiple customers. Related supplier addresses may also be created.
put PUT /customer/{id} Update customer.
putList PUT /customer/list [BETA] Update multiple customers. Addresses can also be updated.
search GET /customer Find customers corresponding with sent data.

CustomercategoryApi

import { CustomercategoryApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /customer/category/{id} Find customer/supplier category by ID.
post POST /customer/category Add new customer/supplier category.
put PUT /customer/category/{id} Update customer/supplier category.
search GET /customer/category Find customer/supplier categories corresponding with sent data.

DepartmentApi

import { DepartmentApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /department/{id} Delete department by ID
get GET /department/{id} Get department by ID.
post POST /department [BETA] Add new department.
postList POST /department/list [BETA] Register new departments.
put PUT /department/{id} [BETA] Update department.
putList PUT /department/list [BETA] Update multiple departments.
search GET /department Find department corresponding with sent data.

DivisionApi

import { DivisionApi } from 'tripletexjs';
Class Method HTTP request Description
post POST /division [BETA] Create division.
postList POST /division/list [BETA] Create divisions.
put PUT /division/{id} [BETA] Update division information.
putList PUT /division/list [BETA] Update multiple divisions.
search GET /division [BETA] Get divisions.

DocumentApi

import { DocumentApi } from 'tripletexjs';
Class Method HTTP request Description
downloadContent GET /document/{id}/content [BETA] Get content of document given by ID.
get GET /document/{id} [BETA] Get document by ID.

EmployeeApi

import { EmployeeApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /employee/{id} Get employee by ID.
post POST /employee [BETA] Create one employee.
postList POST /employee/list [BETA] Create several employees.
put PUT /employee/{id} Update employee.
search GET /employee Find employees corresponding with sent data.

EmployeeemploymentApi

import { EmployeeemploymentApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /employee/employment/{id} Find employment by ID.
post POST /employee/employment [BETA] Create employment.
put PUT /employee/employment/{id} [BETA] Update employemnt.
search GET /employee/employment Find all employments for employee.

EmployeeemploymentdetailsApi

import { EmployeeemploymentdetailsApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /employee/employment/details/{id} [BETA] Find employment details by ID.
post POST /employee/employment/details [BETA] Create employment details.
put PUT /employee/employment/details/{id} [BETA] Update employment details.
search GET /employee/employment/details [BETA] Find all employmentdetails for employment.

EmployeeemploymentemploymentTypeApi

import { EmployeeemploymentemploymentTypeApi } from 'tripletexjs';
Class Method HTTP request Description
getMaritimeEmploymentType GET /employee/employment/employmentType/maritimeEmploymentType [BETA] Find all maritime employment type IDs.
getSalaryType GET /employee/employment/employmentType/salaryType [BETA] Find all salary type IDs.
getScheduleType GET /employee/employment/employmentType/scheduleType [BETA] Find all schedule type IDs.
search GET /employee/employment/employmentType [BETA] Find all employment type IDs.

EmployeeemploymentleaveOfAbsenceApi

import { EmployeeemploymentleaveOfAbsenceApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /employee/employment/leaveOfAbsence/{id} [BETA] Find leave of absence by ID.
post POST /employee/employment/leaveOfAbsence [BETA] Create leave of absence.
postList POST /employee/employment/leaveOfAbsence/list [BETA] Create multiple leave of absences.
put PUT /employee/employment/leaveOfAbsence/{id} [BETA] Update leave of absence.

EmployeeemploymentleaveOfAbsenceTypeApi

import { EmployeeemploymentleaveOfAbsenceTypeApi } from 'tripletexjs';
Class Method HTTP request Description
search GET /employee/employment/leaveOfAbsenceType [BETA] Find all leave of absence type IDs.

EmployeeemploymentoccupationCodeApi

import { EmployeeemploymentoccupationCodeApi } from 'tripletexjs';
Class Method HTTP request Description
search GET /employee/employment/occupationCode [BETA] Find all profession codes.

EmployeeemploymentremunerationTypeApi

import { EmployeeemploymentremunerationTypeApi } from 'tripletexjs';
Class Method HTTP request Description
search GET /employee/employment/remunerationType [BETA] Find all remuneration type IDs.

EmployeeemploymentworkingHoursSchemeApi

import { EmployeeemploymentworkingHoursSchemeApi } from 'tripletexjs';
Class Method HTTP request Description
search GET /employee/employment/workingHoursScheme [BETA] Find working hours scheme ID.

EmployeeentitlementApi

import { EmployeeentitlementApi } from 'tripletexjs';
Class Method HTTP request Description
client GET /employee/entitlement/client [BETA] Find all entitlements at client for user.
get GET /employee/entitlement/{id} Get entitlement by ID.
grantClientEntitlementsByTemplate PUT /employee/entitlement/:grantClientEntitlementsByTemplate [BETA] Update employee entitlements in client account.
grantEntitlementsByTemplate PUT /employee/entitlement/:grantEntitlementsByTemplate [BETA] Update employee entitlements.
search GET /employee/entitlement Find all entitlements for user.

EmployeehourlyCostAndRateApi

import { EmployeehourlyCostAndRateApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /employee/hourlyCostAndRate/{id} [BETA] Find hourly cost and rate by ID.
post POST /employee/hourlyCostAndRate [BETA] Create hourly cost and rate.
put PUT /employee/hourlyCostAndRate/{id} [BETA] Update hourly cost and rate.
search GET /employee/hourlyCostAndRate Find all hourly cost and rates for employee.

EmployeenextOfKinApi

import { EmployeenextOfKinApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /employee/nextOfKin/{id} [BETA] Find next of kin by ID.
post POST /employee/nextOfKin [BETA] Create next of kin.
put PUT /employee/nextOfKin/{id} [BETA] Update next of kin.
search GET /employee/nextOfKin Find all next of kin for employee.

EmployeestandardTimeApi

import { EmployeestandardTimeApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /employee/standardTime/{id} [BETA] Find standard time by ID.
post POST /employee/standardTime [BETA] Create standard time.
put PUT /employee/standardTime/{id} [BETA] Update standard time.
search GET /employee/standardTime [BETA] Find all standard times for employee.

EventApi

import { EventApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /event [BETA] Get all (WebHook) event keys.

EventsubscriptionApi

import { EventsubscriptionApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /event/subscription/{id} [BETA] Delete the given subscription.
get GET /event/subscription/{id} [BETA] Get subscription by ID.
post POST /event/subscription [BETA] Create a new subscription for current EmployeeToken.
put PUT /event/subscription/{id} [BETA] Change a current subscription, based on id.
search GET /event/subscription [BETA] Find all ongoing subscriptions.

InventoryApi

import { InventoryApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /inventory/{id} [BETA] Delete inventory. Only available for some consumers.
get GET /inventory/{id} Get inventory by ID.
post POST /inventory [BETA] Create new inventory. Only available for some consumers.
put PUT /inventory/{id} [BETA] Update inventory. Only available for some consumers.
search GET /inventory Find inventory corresponding with sent data.

InventoryinventoriesApi

import { InventoryinventoriesApi } from 'tripletexjs';
Class Method HTTP request Description
search GET /inventory/inventories [BETA] Find inventories corresponding with sent data. Only available for some consumers.

InventorystocktakingApi

import { InventorystocktakingApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /inventory/stocktaking/{id} [BETA] Delete stocktaking. Only available for some consumers.
get GET /inventory/stocktaking/{id} [BETA] Get stocktaking by ID. Only available for some consumers.
post POST /inventory/stocktaking [BETA] Create new stocktaking. Only available for some consumers.
put PUT /inventory/stocktaking/{id} [BETA] Update stocktaking. Only available for some consumers.
search GET /inventory/stocktaking [BETA] Find stocktaking corresponding with sent data. Only available for some consumers.

InventorystocktakingproductlineApi

import { InventorystocktakingproductlineApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /inventory/stocktaking/productline/{id} [BETA] Delete product line. Only available for some consumers.
get GET /inventory/stocktaking/productline/{id} [BETA] Get product line by ID. Only available for some consumers.
post POST /inventory/stocktaking/productline [BETA] Create product line. When creating several product lines, use /list for better performance. Only available for some consumers.
put PUT /inventory/stocktaking/productline/{id} [BETA] Update product line. Only available for some consumers.
search GET /inventory/stocktaking/productline [BETA] Find all product lines by stocktaking ID. Only available for some consumers.

InvoiceApi

import { InvoiceApi } from 'tripletexjs';
Class Method HTTP request Description
createCreditNote PUT /invoice/{id}/:createCreditNote [BETA] Creates a new Invoice representing a credit memo that nullifies the given invoice. Updates this invoice and any pre-existing inverse invoice.
createReminder PUT /invoice/{id}/:createReminder [BETA] Create invoice reminder and sends it by the given dispatch type. Supports the reminder types SOFT_REMINDER, REMINDER and NOTICE_OF_DEBT_COLLECTION. DispatchType NETS_PRINT must have type NOTICE_OF_DEBT_COLLECTION. SMS and NETS_PRINT must be activated prior to usage in the API.
downloadPdf GET /invoice/{invoiceId}/pdf Get invoice document by invoice ID.
get GET /invoice/{id} Get invoice by ID.
payment PUT /invoice/{id}/:payment Update invoice. The invoice is updated with payment information. The amount is in the invoice’s currency.
post POST /invoice Create invoice.
search GET /invoice Find invoices corresponding with sent data. Includes charged outgoing invoices only.
send PUT /invoice/{id}/:send [BETA] Send invoice by ID and sendType. Optionally override email recipient.

InvoicedetailsApi

import { InvoicedetailsApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /invoice/details/{id} [BETA] Get ProjectInvoiceDetails by ID.
search GET /invoice/details Find ProjectInvoiceDetails corresponding with sent data.

InvoicepaymentTypeApi

import { InvoicepaymentTypeApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /invoice/paymentType/{id} Get payment type by ID.
search GET /invoice/paymentType Find payment type corresponding with sent data.

LedgerApi

import { LedgerApi } from 'tripletexjs';
Class Method HTTP request Description
openPost GET /ledger/openPost Find open posts corresponding with sent data.
search GET /ledger Get ledger (hovedbok).

LedgeraccountApi

import { LedgeraccountApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /ledger/account/{id} [BETA] Delete account.
deleteByIds DELETE /ledger/account/list [BETA] Delete multiple accounts.
get GET /ledger/account/{id} Get account by ID.
post POST /ledger/account [BETA] Create a new account.
postList POST /ledger/account/list [BETA] Create several accounts.
put PUT /ledger/account/{id} [BETA] Update account.
putList PUT /ledger/account/list [BETA] Update multiple accounts.
search GET /ledger/account Find accounts corresponding with sent data.

LedgeraccountingPeriodApi

import { LedgeraccountingPeriodApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /ledger/accountingPeriod/{id} Get accounting period by ID.
search GET /ledger/accountingPeriod Find accounting periods corresponding with sent data.

LedgerannualAccountApi

import { LedgerannualAccountApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /ledger/annualAccount/{id} Get annual account by ID.
search GET /ledger/annualAccount Find annual accounts corresponding with sent data.

LedgercloseGroupApi

import { LedgercloseGroupApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /ledger/closeGroup/{id} Get close group by ID.
search GET /ledger/closeGroup Find close groups corresponding with sent data.

LedgerpaymentTypeOutApi

import { LedgerpaymentTypeOutApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /ledger/paymentTypeOut/{id} [BETA] Delete payment type for outgoing payments by ID.
get GET /ledger/paymentTypeOut/{id} [BETA] Get payment type for outgoing payments by ID.
post POST /ledger/paymentTypeOut [BETA] Create new payment type for outgoing payments
postList POST /ledger/paymentTypeOut/list [BETA] Create multiple payment types for outgoing payments at once
put PUT /ledger/paymentTypeOut/{id} [BETA] Update existing payment type for outgoing payments
putList PUT /ledger/paymentTypeOut/list [BETA] Update multiple payment types for outgoing payments at once
search GET /ledger/paymentTypeOut [BETA] Gets payment types for outgoing payments

LedgerpostingApi

import { LedgerpostingApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /ledger/posting/{id} Find postings by ID.
openPost GET /ledger/posting/openPost Find open posts corresponding with sent data.
search GET /ledger/posting Find postings corresponding with sent data.

LedgervatTypeApi

import { LedgervatTypeApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /ledger/vatType/{id} Get vat type by ID.
search GET /ledger/vatType Find vat types corresponding with sent data.

LedgervoucherApi

import { LedgervoucherApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /ledger/voucher/{id} [BETA] Delete voucher by ID.
deleteAttachment DELETE /ledger/voucher/{id}/attachment [BETA] Delete attachment.
downloadPdf GET /ledger/voucher/{voucherId}/pdf Get PDF representation of voucher by ID.
get GET /ledger/voucher/{id} Get voucher by ID.
importDocument POST /ledger/voucher/importDocument [BETA] Upload a document to create one or more vouchers. Valid document formats are PDF, PNG, JPEG, TIFF and EHF. Send as multipart form.
importGbat10 POST /ledger/voucher/importGbat10 Import GBAT10. Send as multipart form.
nonPosted GET /ledger/voucher/>nonPosted [BETA] Find non-posted vouchers.
options GET /ledger/voucher/{id}/options [BETA] Returns a data structure containing meta information about operations that are available for this voucher. Currently only implemented for DELETE: It is possible to check if the voucher is deletable.
post POST /ledger/voucher Add new voucher. IMPORTANT: Also creates postings. Only the gross amounts will be used
put PUT /ledger/voucher/{id} [BETA] Update voucher. Postings with guiRow==0 will be deleted and regenerated.
putList PUT /ledger/voucher/list [BETA] Update multiple vouchers. Postings with guiRow==0 will be deleted and regenerated.
reverse PUT /ledger/voucher/{id}/:reverse Reverses the voucher, and returns the reversed voucher. Supports reversing most voucher types, except salary transactions.
search GET /ledger/voucher Find vouchers corresponding with sent data.
sendToInbox PUT /ledger/voucher/{id}/:sendToInbox [BETA] Send voucher to inbox.
sendToLedger PUT /ledger/voucher/{id}/:sendToLedger [BETA] Send voucher to ledger.
uploadAttachment POST /ledger/voucher/{voucherId}/attachment Upload attachment to voucher. If the voucher already has an attachment the content will be appended to the existing attachment as new PDF page(s). Valid document formats are PDF, PNG, JPEG and TIFF. Non PDF formats will be converted to PDF. Send as multipart form.
uploadPdf POST /ledger/voucher/{voucherId}/pdf/{fileName} [DEPRECATED] Use POST ledger/voucher/{voucherId}/attachment instead.

LedgervoucherTypeApi

import { LedgervoucherTypeApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /ledger/voucherType/{id} Get voucher type by ID.
search GET /ledger/voucherType Find voucher types corresponding with sent data.

MunicipalityApi

import { MunicipalityApi } from 'tripletexjs';
Class Method HTTP request Description
search GET /municipality [BETA] Get municipalities.

OrderApi

import { OrderApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /order/{id} Get order by ID.
invoice PUT /order/{id}/:invoice Create new invoice from order.
post POST /order Create order.
put PUT /order/{id} Update order.
search GET /order Find orders corresponding with sent data.

OrderorderlineApi

import { OrderorderlineApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /order/orderline/{id} [BETA] Delete order line by ID.
get GET /order/orderline/{id} Get order line by ID.
post POST /order/orderline Create order line. When creating several order lines, use /list for better performance.
postList POST /order/orderline/list Create multiple order lines.

ProductApi

import { ProductApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /product/{id} Get product by ID.
post POST /product Create new product.
put PUT /product/{id} Update product.
search GET /product Find products corresponding with sent data.

ProductexternalApi

import { ProductexternalApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /product/external/{id} [BETA] Get external product by ID.
search GET /product/external [BETA] Find external products corresponding with sent data.

ProductunitApi

import { ProductunitApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /product/unit/{id} Get product unit by ID.
search GET /product/unit Find product units corresponding with sent data.

ProjectApi

import { ProjectApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /project/{id} [BETA] Delete project.
deleteByIds DELETE /project/list [BETA] Delete projects.
deleteList DELETE /project [BETA] Delete multiple projects.
get GET /project/{id} Find project by ID.
getForTimeSheet GET /project/>forTimeSheet Find projects applicable for time sheet registration on a specific day.
post POST /project [BETA] Add new project.
postList POST /project/list [BETA] Register new projects. Multiple projects for different users can be sent in the same request.
put PUT /project/{id} [BETA] Update project.
putList PUT /project/list [BETA] Update multiple projects.
search GET /project Find projects corresponding with sent data.

ProjectcategoryApi

import { ProjectcategoryApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /project/category/{id} Find project category by ID.
post POST /project/category Add new project category.
put PUT /project/category/{id} Update project category.
search GET /project/category Find project categories corresponding with sent data.

ProjecthourlyRatesApi

import { ProjecthourlyRatesApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /project/hourlyRates/{id} Delete Project Hourly Rate
deleteByIds DELETE /project/hourlyRates/list Delete project hourly rates.
get GET /project/hourlyRates/{id} Find project hourly rate by ID.
post POST /project/hourlyRates Create a project hourly rate.
postList POST /project/hourlyRates/list Create multiple project hourly rates.
put PUT /project/hourlyRates/{id} Update a project hourly rate.
putList PUT /project/hourlyRates/list Update multiple project hourly rates.
search GET /project/hourlyRates Find project hourly rates corresponding with sent data.

ProjecthourlyRatesprojectSpecificRatesApi

import { ProjecthourlyRatesprojectSpecificRatesApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /project/hourlyRates/projectSpecificRates/{id} Delete project specific rate
deleteByIds DELETE /project/hourlyRates/projectSpecificRates/list Delete project specific rates.
get GET /project/hourlyRates/projectSpecificRates/{id} Find project specific rate by ID.
post POST /project/hourlyRates/projectSpecificRates Create new project specific rate.
postList POST /project/hourlyRates/projectSpecificRates/list Create multiple new project specific rates.
put PUT /project/hourlyRates/projectSpecificRates/{id} Update a project specific rate.
putList PUT /project/hourlyRates/projectSpecificRates/list Update multiple project specific rates.
search GET /project/hourlyRates/projectSpecificRates Find project specific rates corresponding with sent data.

ProjectorderlineApi

import { ProjectorderlineApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /project/orderline/{id} [BETA] Delete order line by ID.
get GET /project/orderline/{id} [BETA] Get order line by ID.
post POST /project/orderline [BETA] Create order line. When creating several order lines, use /list for better performance.
postList POST /project/orderline/list [BETA] Create multiple order lines.
put PUT /project/orderline/{id} [BETA] Update project orderline.

ProjectparticipantApi

import { ProjectparticipantApi } from 'tripletexjs';
Class Method HTTP request Description
deleteByIds DELETE /project/participant/list [BETA] Delete project participants.
get GET /project/participant/{id} [BETA] Find project participant by ID.
post POST /project/participant [BETA] Add new project participant.
postList POST /project/participant/list [BETA] Register new projects. Multiple projects for different users can be sent in the same request.
put PUT /project/participant/{id} [BETA] Update project participant.

ReminderApi

import { ReminderApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /reminder/{id} Get reminder by ID.
search GET /reminder Find reminders corresponding with sent data.

SalarypayslipApi

import { SalarypayslipApi } from 'tripletexjs';
Class Method HTTP request Description
downloadPdf GET /salary/payslip/{id}/pdf [BETA] Find payslip (PDF document) by ID.
get GET /salary/payslip/{id} [BETA] Find payslip by ID.
search GET /salary/payslip [BETA] Find payslips corresponding with sent data.

SalarysettingsApi

import { SalarysettingsApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /salary/settings [BETA] Get salary settings of logged in company.
put PUT /salary/settings [BETA] Update settings of logged in company.

SalarysettingsholidayApi

import { SalarysettingsholidayApi } from 'tripletexjs';
Class Method HTTP request Description
deleteByIds DELETE /salary/settings/holiday/list [BETA] delete multiple holiday settings of current logged in company.
post POST /salary/settings/holiday [BETA] Create a holiday setting of current logged in company.
postList POST /salary/settings/holiday/list [BETA] Create multiple holiday settings of current logged in company.
put PUT /salary/settings/holiday/{id} [BETA] update a holiday setting of current logged in company.
putList PUT /salary/settings/holiday/list [BETA] update multiple holiday settings of current logged in company.
search GET /salary/settings/holiday [BETA] Find holiday settings of current logged in company.

SalarytransactionApi

import { SalarytransactionApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /salary/transaction/{id} [BETA] Delete salary transaction by ID.
get GET /salary/transaction/{id} [BETA] Find salary transaction by ID.
post POST /salary/transaction [BETA] Create a new salary transaction.

SalarytypeApi

import { SalarytypeApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /salary/type/{id} [BETA] Find salary type by ID.
search GET /salary/type [BETA] Find salary type corresponding with sent data.

SupplierApi

import { SupplierApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /supplier/{id} Get supplier by ID.
post POST /supplier Create supplier. Related supplier addresses may also be created.
postList POST /supplier/list [BETA] Create multiple suppliers. Related supplier addresses may also be created.
put PUT /supplier/{id} Update supplier.
putList PUT /supplier/list [BETA] Update multiple suppliers. Addresses can also be updated.
search GET /supplier Find suppliers corresponding with sent data.

TimesheetentryApi

import { TimesheetentryApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /timesheet/entry/{id} Delete timesheet entry by ID.
get GET /timesheet/entry/{id} Find timesheet entry by ID.
getRecentActivities GET /timesheet/entry/>recentActivities Find recently used timesheet activities.
getRecentProjects GET /timesheet/entry/>recentProjects Find projects with recent activities (timesheet entry registered).
getTotalHours GET /timesheet/entry/>totalHours Find total hours registered on an employee in a specific period.
post POST /timesheet/entry Add new timesheet entry. Only one entry per employee/date/activity/project combination is supported.
postList POST /timesheet/entry/list Add new timesheet entry. Multiple objects for several users can be sent in the same request.
put PUT /timesheet/entry/{id} Update timesheet entry by ID. Note: Timesheet entry object fields which are present but not set, or set to 0, will be nulled.
putList PUT /timesheet/entry/list Update timesheet entry. Multiple objects for different users can be sent in the same request.
search GET /timesheet/entry Find timesheet entry corresponding with sent data.

TimesheetsettingsApi

import { TimesheetsettingsApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /timesheet/settings [BETA] Get timesheet settings of logged in company.

TimesheettimeClockApi

import { TimesheettimeClockApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /timesheet/timeClock/{id} Find time clock entry by ID.
getPresent GET /timesheet/timeClock/present Find a user’s present running time clock.
put PUT /timesheet/timeClock/{id} Update time clock by ID.
search GET /timesheet/timeClock Find time clock entries corresponding with sent data.
start PUT /timesheet/timeClock/:start Start time clock.
stop PUT /timesheet/timeClock/{id}/:stop Stop time clock.

TimesheetweekApi

import { TimesheetweekApi } from 'tripletexjs';
Class Method HTTP request Description
approve PUT /timesheet/week/:approve Approve week. By ID or (ISO-8601 week and employeeId combination).
complete PUT /timesheet/week/:complete Complete week. By ID or (ISO-8601 week and employeeId combination).
reopen PUT /timesheet/week/:reopen Reopen week. By ID or (ISO-8601 week and employeeId combination).
search GET /timesheet/week Find weekly status By ID, week/year combination, employeeId. or an approver
unapprove PUT /timesheet/week/:unapprove Unapprove week. By ID or (ISO-8601 week and employeeId combination).

TokenconsumerApi

import { TokenconsumerApi } from 'tripletexjs';
Class Method HTTP request Description
getByToken GET /token/consumer/byToken Get consumer token by token string.

TokenemployeeApi

import { TokenemployeeApi } from 'tripletexjs';
Class Method HTTP request Description
create PUT /token/employee/:create Create an employee token. Only selected consumers are allowed

TokensessionApi

import { TokensessionApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /token/session/{token} Delete session token.
create PUT /token/session/:create Create session token.
whoAmI GET /token/session/>whoAmI Find information about the current user.

TravelExpenseApi

import { TravelExpenseApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /travelExpense/{id} [BETA] Delete travel expense.
approve PUT /travelExpense/:approve [BETA] Approve travel expenses.
copy PUT /travelExpense/:copy [BETA] Copy travel expense.
createVouchers PUT /travelExpense/:createVouchers [BETA] Create vouchers
deliver PUT /travelExpense/:deliver [BETA] Deliver travel expenses.
downloadAttachment GET /travelExpense/{travelExpenseId}/attachment Get attachment by travel expense ID.
get GET /travelExpense/{id} [BETA] Get travel expense by ID.
post POST /travelExpense [BETA] Create travel expense.
put PUT /travelExpense/{id} [BETA] Update travel expense.
search GET /travelExpense [BETA] Find travel expenses corresponding with sent data.
unapprove PUT /travelExpense/:unapprove [BETA] Unapprove travel expenses.
undeliver PUT /travelExpense/:undeliver [BETA] Undeliver travel expenses.
uploadAttachment POST /travelExpense/{travelExpenseId}/attachment Upload attachment to travel expense.

TravelExpenseaccommodationAllowanceApi

import { TravelExpenseaccommodationAllowanceApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /travelExpense/accommodationAllowance/{id} [BETA] Delete accommodation allowance.
get GET /travelExpense/accommodationAllowance/{id} [BETA] Get travel accommodation allowance by ID.
post POST /travelExpense/accommodationAllowance [BETA] Create accommodation allowance.
put PUT /travelExpense/accommodationAllowance/{id} [BETA] Update accommodation allowance.
search GET /travelExpense/accommodationAllowance [BETA] Find accommodation allowances corresponding with sent data.

TravelExpensecostApi

import { TravelExpensecostApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /travelExpense/cost/{id} [BETA] Delete cost.
get GET /travelExpense/cost/{id} [BETA] Get cost by ID.
post POST /travelExpense/cost [BETA] Create cost.
put PUT /travelExpense/cost/{id} [BETA] Update cost.
search GET /travelExpense/cost [BETA] Find costs corresponding with sent data.

TravelExpensecostCategoryApi

import { TravelExpensecostCategoryApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /travelExpense/costCategory/{id} [BETA] Get cost category by ID.
search GET /travelExpense/costCategory [BETA] Find cost category corresponding with sent data.

TravelExpensemileageAllowanceApi

import { TravelExpensemileageAllowanceApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /travelExpense/mileageAllowance/{id} [BETA] Delete mileage allowance.
get GET /travelExpense/mileageAllowance/{id} [BETA] Get mileage allowance by ID.
post POST /travelExpense/mileageAllowance [BETA] Create mileage allowance.
put PUT /travelExpense/mileageAllowance/{id} [BETA] Update mileage allowance.
search GET /travelExpense/mileageAllowance [BETA] Find mileage allowances corresponding with sent data.

TravelExpensepassengerApi

import { TravelExpensepassengerApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /travelExpense/passenger/{id} [BETA] Delete passenger.
get GET /travelExpense/passenger/{id} [BETA] Get passenger by ID.
post POST /travelExpense/passenger [BETA] Create passenger.
put PUT /travelExpense/passenger/{id} [BETA] Update passenger.
search GET /travelExpense/passenger [BETA] Find passengers corresponding with sent data.

TravelExpensepaymentTypeApi

import { TravelExpensepaymentTypeApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /travelExpense/paymentType/{id} [BETA] Get payment type by ID.
search GET /travelExpense/paymentType [BETA] Find payment type corresponding with sent data.

TravelExpenseperDiemCompensationApi

import { TravelExpenseperDiemCompensationApi } from 'tripletexjs';
Class Method HTTP request Description
_delete DELETE /travelExpense/perDiemCompensation/{id} [BETA] Delete per diem compensation.
get GET /travelExpense/perDiemCompensation/{id} [BETA] Get per diem compensation by ID.
post POST /travelExpense/perDiemCompensation [BETA] Create per diem compensation.
put PUT /travelExpense/perDiemCompensation/{id} [BETA] Update per diem compensation.
search GET /travelExpense/perDiemCompensation [BETA] Find per diem compensations corresponding with sent data.

TravelExpenserateApi

import { TravelExpenserateApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /travelExpense/rate/{id} [BETA] Get travel expense rate by ID.
search GET /travelExpense/rate [BETA] Find rates corresponding with sent data.

TravelExpenserateCategoryApi

import { TravelExpenserateCategoryApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /travelExpense/rateCategory/{id} [BETA] Get travel expense rate category by ID.
search GET /travelExpense/rateCategory [BETA] Find rate categories corresponding with sent data.

TravelExpenserateCategoryGroupApi

import { TravelExpenserateCategoryGroupApi } from 'tripletexjs';
Class Method HTTP request Description
get GET /travelExpense/rateCategoryGroup/{id} [BETA] Get travel report rate category group by ID.
search GET /travelExpense/rateCategoryGroup [BETA] Find rate categoriy groups corresponding with sent data.

Documentation for Models