Shipstation is a popular shipping software. We can use the Shipstation API to import data from Shipstation into Google Sheets. In this tutorial, you’ll learn how to connect the Shipstation 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: sheet.new
After logging into your Shipstation account, click the Settings icon from the top-right corner:
In the menu on the left, click the Account item, then click API Settings option:
On the API Settings section click the Generate API Keys button:
Your API Key and API Secret are now visible. Copy and paste these values to a safe location because you will need them in the next steps.
In this section, we’ll show you how to browse the Shipstation API documentation to find the Shipstation API URL that retrieves the information you need from your Shipstation account. If you already know your API URL and endpoint, or you want to use the same example URL as us, just skip to Step 4.
First, open the Shipstation API documentation page: https://www.shipstation.com/docs/api/
The menu on the left contains a START HERE section and a list of categories, each with it’s own endpoints:
An example endpoint is List Customers, which obtains a list of customers that match a set of specified criteria:
https://ssapi.shipstation.com/customers
The documentation for each endpoint contains a short description of the endpoint’s purpose, a table with the accepted parameters’ names, types and descriptions, an example request as a cURL command and its associated example response:
All API calls for Shipstation should be made to this base domain: https://ssapi.shipstation.com/
The List Products endpoint, which obtains a list of products that match the specified criteria. All of the available filters are optional. They do not need to be included in the URL.
Method: GET API URL Path: https://ssapi.shipstation.com/products Headers: Header 1 Key: Authorization Header 1 Value: Basic your_auth
your_auth is the value/string obtained by base64-encoding the string containing the API Key and API Secret you generated previously, in Step 2, separated by a colon (“:”) (See Step 4)
The Add Tag To Order endpoint, which Adds a tag to an order.
Method: POST API URL Path: https://ssapi.shipstation.com/orders/addtag Headers: Header 1 Key: Authorization Header 1 Value: Basic your_auth POST Body: { "orderId": orderIDvalue, "tagId": tagIDvalue }
your_auth is the value/string obtained by base64-encoding the string containing the API Key and API Secret you generated previously, in Step 2, separated by a colon (“:”) (See Step 4)
Don’t forget to replace orderIDvalue and tagIDvalue with real ID values.
The List Shipments endpoint, which obtains a list of shipments that match the specified criteria.
Method: GET API URL Path: https://ssapi.shipstation.com/shipments Headers: Header 1 Key: Authorization Header 1 Value: Basic your_auth
your_auth is the value/string obtained by base64-encoding the string containing the API Key and API Secret you generated previously, in Step 2, separated by a colon (“:”) (See Step 4)
The List Marketplaces endpoint, which lists the marketplaces that can be integrated with ShipStation.
Method: GET API URL Path: https://ssapi.shipstation.com/stores/marketplaces Headers: Header 1 Key: Authorization Header 1 Value: Basic your_auth
your_auth is the value/string obtained by base64-encoding the string containing the API Key and API Secret you generated previously, in Step 2, separated by a colon (“:”) (See Step 4)
The Get Store Info endpoint, which returns all details about a specific store.
Method: GET API URL Path: https://ssapi.shipstation.com/stores/storeId Headers: Header 1 Key: Authorization Header 1 Value: Basic your_auth
your_auth is the value/string obtained by base64-encoding the string containing the API Key and API Secret you generated previously, in Step 2, separated by a colon (“:”) (See Step 4)
Replace storeID with a real value!
Pagination is a process that is used to divide a large dataset into smaller chunks (pages). Usually the endpoints that return a list of resources support pagination.
Some of the Shipstation API endpoints use the pagination option. This means you need to add pagination some of these parameters at the end of the URL:
page
– the number of the page you want to obtain;page_size
– the number of records per page;Each endpoint that needs pagination will have in its documentation relevant information on which of these parameters you can use and how to do it.
Example: https://ssapi.shipstation.com/products?page=2&pageSize=250
In the example above, the data set will be divided in sets of 250 records per page, and only the second page (page number 2) will be displayed in Google Sheets.
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:
Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) required by your API endpoint. For this example, we are using the GET method.
API URL: In Step 3, we explained how you can find the Shipstation REST API endpoint that you need. Now copy and paste your complete Shipstation API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).
For this example, we are using the List Carriers endpoint which list all shipping providers connected to this account. This is what the whole URL looks like:
https://ssapi.shipstation.com/carriers
Headers: In the Headers section of Apipheny, add one row with the following key and value:
Header Key: Authorization Value: Basic your_auth
Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Shipstation API data to be imported into your Google Sheet. Here’s what our request looked like when completed:
That’s it! You’ve successfully connected your Shipstation account to Google Sheets using the Shipstation API, Google Sheets API, and the Apipheny add-on.
After making a successful request to the Shipstation API, try querying a different Shipstation API endpoint, or try using one of the more advanced features in the Apipheny add-on.
Schedule requests for automatic updates
Reference cell values in requests
Stack multiple URLs in a single request
Crypto API Tutorials: