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:
Apipheny is a free API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to API data sources, easily.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser:
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.
Crypto API Tutorials:
Need website help? Hire an SEO Consultant.