PestScan REST API

Modified on Tue, 7 May at 3:29 PM

Introduction

Our Rest API can be used to make a connection between PestScan software and third-party software. Examples of third-party software are:

  • An accountancy software
  • A CRM/ERP software
  • Planning software
  • A website that allows external users to create jobs or visits 

This document describes the following items:

  • General description
  • What is needed for a connection
  • Financial information
  • Technical information
  • Examples of user scenarios

General description

The Rest API can be used to make a connection between PestScan software and third-party. In the image below you can find a schematical sketch of the situation. The third-party connector will send data from third party to PestScan and is able to retrieve data from PestScan. Examples of user scenarios are described at the end of this document.

Afbeelding met tekst, schermopname, Lettertype, lijn

Automatisch gegenereerde beschrijving

 

What is needed for a connection

The PestScan Rest API is already in use. The API from the third-party software should be made so that it can be connected to the PestScan Rest API. This is not done by PestScan! In some cases the third-party provides a developer who can make the third-party API. In most of the cases you need an intermediary who can develop the API needed.

Financial information

For using the Rest API, PestScan charges a monthly fee. Please contact our sales department for more information: sales@pestscan.eu.

Technical information

In the table below you can find an overview of the available endpoints. To get the technical documentation (Swagger documentation), please contact our helpdesk: support@pestscan.freshdesk.com

Endpoint

Get

Post

Authentication

No

Yes

Articles

No

Yes

Customers (including contact persons)

No

Yes

Documents

No

Yes

Employees

No

Yes

Locations

No

Yes

Newly created orders

Yes

Yes

Completed ordersYesYes

Best practices

Only send changed or new data. If one customer’s address is updated in your third-party software, do not send the entire customer list again, but only the changed record. PestScan will at some moment detect if you send entire datasets and will ask you to modify your code.

Do not poll too frequently. Some data can be retrieved from PestScan, such as completed visit data. You can retrieve this data with a polling mechanism. Don’t set the interval to a very small interval. Once every 15 or 60 minutes is considered a good interval by PestScan.

Send changed data immediately. Send each change immediately. Reason: it is practical for PestScan users to see the changes as soon as possible.

Log all errors. Create extensive logging to log each and every error that occurs while calling methods on the PestScan API. Each call that you make returns a List of errors, that may be filled or empty.

Send small payloads. Send lists of changed objects in small batches. For example, if 100 customer records have changed, send them in 4 batches of 25 records.

Beware of time-outs. When retrieving data, check whether no time-outs occur. If so, please contact PestScan.

Examples of user scenarios

Some possible scenarios are described below. These are just examples, of course more scenarios are possible.

Scenario 1: Customers 

In this case, you create your customers in your third-party software, with all their details, such as name, address, contact data. You create one or several sites for your customers. 

Both customers and sites can be synchronized to PestScan. When a customer is new, first send the customer, then the site. 

When a customer or site is updated, you can send the changes to PestScan. The order is not important. 

As soon as they are in PestScan, you can create checkpoints, floorplans and visits for them using PestScan. 

The other direction is not supported: if you create a customer in PestScan, you cannot retrieve it and insert it into the third party software. 

Scenario 2: Employees 

In this case, you can maintain the employees in your third-party software and send new or updated employees to PestScan. 

Using PestScan, you can override the user name, create a password and set other properties. 

Scenario 3: Articles 

You can create the article list in your third-party software and send new or updated articles to PestScan. Using PestScan, you can add more attributes to articles. 

Scenario 4: Visits 

You can create the visits in your third-party software and then send them to PestScan. Such a visit will be connected to an employee and a customer site. For that reason, this employee and customer site must first exist in PestScan. So, the sequence of your actions is crucial: you must first send the customer, the site and the employee and only then send the visit. If you send a visit to PestScan for a site that is not existing, your action will fail and an error will be returned. 

You can retrieve the completed visits from PestScan after they have been completed by the technician (or an office worker). Now, the visits will contain useful information, such as working time, comments and used articles. (If you want to retrieve article usage, you should send these articles to PestScan first!) 

Visits can also be created inside PestScan, both in the office web application or in the technician mobile app. You can periodically retrieve newly created visits from PestScan. 

All scenarios 

Of course, all of the above scenarios can be combined. Scenario 4 presupposes the implementation of scenarios 1, 2 and 3.

 

 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article