Pesatime is an easy to use online accounting software. We can use the Pesatime API to import data from Pesatime into Google Sheets. In this tutorial, we’ll show you how to connect the Pesatime REST API to Google Sheets in 5 steps:
To pull data from the Pesatime API to Google Sheets, first install and open the Apipheny Google Sheets add-on.
Apipheny is a no-code API integrator for Google Sheets that you can use to make unlimited API requests, connect to unlimited APIs, save API requests, schedule API requests, and more.
1. Install Apipheny by opening the following link on desktop and then clicking the Install button on the page: https://apipheny.io/install
2. After you’ve installed Apipheny, open a Google Sheet and then click on the Add-Ons or Extensions option in the top menu. In the add-ons menu, you should see Apipheny.
Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets.
After logging into your Pesatime account, go to </> Developer to find your secret keys:
Copy and paste your keys to a safe location because you’ll need them later.
In this section, we’ll show you how to browse the Pesatime API documentation to find an API endpoint that retrieves the specific information you need from your Pesatime account. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 4.
First, open the Pesatime API documentation page: https://developer.pesatime.com/
The menu on the left contains general topics about the Pesatime API and two endpoint groups, Expenses and Income:
In this case, we will describe the Retrieve – All Income endpoint, which retrieves all sales made. The URL for this endpoint is:
The documentation for this endpoint contains its HTTP method and URL path, a short description of the endpoint’s purpose, the accepted path parameters, and the responses it can return:
All API calls to the Pesatime API should be made with the https://api.pesatime.com/v1/ base domain. All endpoints should be appended to this base domain.
Okay, we’re in the home stretch. Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the “Import” tab. With the Import Tab open, enter these details into the add-on:
API URL: In Step 3, we explained how you can find the Pesatime API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.
For this example, we are using the Expenses endpoint, which retrieves all expenses. The corresponding URL for this endpoint is:
We can add a date_from=2021-09-14 parameter at the end of the URL to obtain expenses from that specific day. So the URL then becomes:
In the Headers of the Apipheny add-on section, add three rows with the following keys and values:
Header 1 Key: x-rest-api-key Value: API_KEY Header 2 Key: x-rest-user Value: DEV_USER_ID Header 3 Key: x-rest-api-secret Value: API_SECRET
Don’t forget to replace the API_KEY, the DEV_USER_ID, and the API_SECRET values with the values you previously obtained in Step 2.
Here’s what our request looks like when entered into Apipheny:
The last step is to click the Run button at the bottom of the Apipheny add-on and then your Pesatime data will be imported into your Google Sheet:
After making a successful request to the Pesatime API, try querying a different Pesatime API endpoint, or try using one of the more advanced features in the Apipheny add-on. Here’s a list of our advanced features:
Constant Contact API
Facebook Graph API
Facebook Ads API
Google SERP API
Linkedin Ads API
Product Hunt API
Reddit Ads API
Riot Games API