REST-API2018-07-20T09:47:53+00:00

TRIPPER FOR DEVELOPERS.

Feel free to use our REST API to fetch travel and expense information OR integrate Tripper’s state-of-the art image and receipt analysis into your own app. Please – pick your favourite!

REST API
IMAGE ANALYSIS

TRIPPER REST API.

Tripper REST API makes it easy to fetch all travel and expense data that users have added to our database. The API has same functionality as our web and you can GET, POST and DELETE data. The Tripper mobile app has some extra features like calendar integration that are not available via API.

Getting help

For support, please send email to Juhani from Tripper.

Availability

Tripper API is available to all registered users. Using API requires that the user has allowed the use of API via web app at https://app.gettripper.com.

Pricing

Using API is included in the normal Tripper pricing. Please note that if you POST invoices to Tripper you may incur extra costs if the total number of expenses and trips goes over the free tier limit.

For pricing information, please, refer to https://gettripper.com/#hinnoittelu

Endpoint

The API’s end point is

https://app.gettripper.com/api/v1/

All requests are made over https to ensure that the request payload and headers are always encrypted.

Authentication

All requests must be authenticated with API-key that is passed in the x-api-key parameter in the header of your every request

curl -X GET \
     https://app.gettripper.com/api/v1/invoices \
     -H 'x-api-key: * user_api_key *'

All requests without a valid API-key are automatically rejected. If requests fail and you are certain that you have not misspelled it – check that the user has allowed use of API.

Rate limits

To ensure our APIs work for all users – we have limited the maximum number of API calls that you can make.

Methods

GET

/invoices/:id

Get user invoices. At the moment we show all information with /invoices but this is subject to change without any prior warning – later we will only show date, status, visibility and total.

/trips/:id

Get user trips.

/completed/:id

Get all invoices and receipts that have been taken closed for edits ie. ”taken into the accounting books.” You can also download the csv and pdf files that were automatically generated when closing these expenses.

/settings

Get user settings.

/companies/:companyId?/employees?/:employeeId?/:type?/:id?

Get all user companies and data about them. We strict access to the the company and employee information based on the user’s role within the organization:

  • Administrator: See all information about the company
  • Accountant: See all information about the company but NOT administrators
  • Manager: See data from employees that require her approval
  • Employee: See own data

Property :type can be either invoices, trips, completed or settings. If request fails to /companies endpoint it is most likely due to insufficient authority.

DELETE

/invoices/:id

Delete target invoice.

/trips/:id

Delete target trip

/companies/:companyId/employees/:employeeId/invoices/:id

Delete target user’s invoice.

/companies/:companyId/employees/:employeeId/trips/:id

Delete target user’s trip.

POST

These methods are still under development and lack feedback to developer. We perform heavy validation on the data and fail without much information if the data is insufficient.

For assistance contact Juhani.

/invoices

Send a new image to Tripper for analysis.

Pass the files as form-data and make sure that all files are either jpg, png, tiff or single page pdf. If the pdf has more than one page – Tripper will automatically throw away rest of the pages. Maximum file size is 1.5 mb

The whole request will fail if any of the files do not meet the requirements.

/invoices/:id

Pass the new parameters in the body’s request as JSON. The properties must match the target and none of the properties can fail. If your request keeps failing – contact Juhani as this endpoint is still under development.

/trips/:id

Pass the new parameters in the body’s request as JSON. The properties must match the target and none of the properties can fail. If your request keeps failing – contact Juhani as this endpoint is still under development.

/completed

Close all open invoices and trips. You can select only some of the invoices and trips if you pass the ids in the request’s body:

{
  invoices: [
    /* LIST OF INVOICE IDS */
  ],
  trips: [
    /* LIST OF TRIP IDS */
]}

If you have specified ids – only those will be closed. If any of the ids is not found – the request will fail.

Examples

Get all user invoices that have been added to Tripper

curl -X GET \
      https://app.gettripper.com/api/v1/invoices \
     -H 'x-api-key: * user_api_key *'

As an accountant (or administrator / manager with approval rights), get user trips

curl -X GET \
     https://app.gettripper.com/api/v1/companies/COMPANYID/employess/EMPLOYEEID/trips \
     -H 'x-api-key: * user_api_key *'

Delete users own invoice

curl -X DELETE \
     https://app.gettripper.com/api/v1/invoices/INVOICEID \
     -H 'x-api-key: * user_api_key *'

Delete invoice from a user as an accountant (or administrator / manager with approval rights):

curl -X DELETE \
     https://app.gettripper.com/api/v1/companies/COMPANYID/employess/EMPLOYEEID/invoices/INVOICEID \
     -H 'x-api-key: * user_api_key *'

Send an invoice to Tripper for analysis

curl -X POST \
     https://app.gettripper.com/api/v1/invoices \

     -H 'x-api-key: * user_api_key *' \
     -F 'image=@ * path/to/file *'

TRIPPER IMAGE ANALYSIS.

We can help if you want to integrate state-of-the art image and receipt analysis into your app. Tripper’s powerful image analysis is available to everyone with a simple SaaS-model. Only pay for what you use.

Integration is super easy:

  1. Get your own API key from Tripper
  2. Check out the sample app
  3. Develop
  4. ???
  5. Profit

Sample app in Node.js can be downloaded from here.

Contact us

Tiputa kuva kuitista tähän (max. 2mb)