ShipBob is a global logistics platform that fulfills ecommerce orders for direct-to-consumer brands. We can use the ShipBob API to import data from ShipBob into Google Sheets. In this tutorial, we’ll show you how to connect the ShipBob 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: sheet.new
In your account Dashboard section, go to Integrations and then choose Manage API Tokens:
In your PAT section, click the blue Generate New Token button:
A sidebar will expand on the right side of your screen. Complete the token name and description, then click the Generate Token button:
Copy the generated token to a safe location, then click the Confirm and Close button:
In this section, we’ll show you how to browse the ShipBob API documentation to find the endpoint that retrieves the information you need from your 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 ShipBob API documentation page: https://developer.shipbob.com/api-docs
This page contains a list of categorized endpoints:
If we click the Products category, its description and the corresponding endpoints will be displayed on the screen:
An example endpoint is Get Multiple Products, which returns all products. The URL for this endpoint is:
https://api.shipbob.com/1.0/product
The endpoint’s documentation contains the authorization method, the query parameters, the HTTP method (GET) and URI and several response samples:
All endpoints can be accessed using the following base domain: https://api.shipbob.com/1.0/
All endpoints are appended to this base domain.
The Get multiple products endpoint, which gets a list of products:
Method: GET API URL Path: https://api.shipbob.com/1.0/product Headers: Header 1 Key: Authorization Header 1 Value: Bearer your_auth_token
Make sure to replace your_auth_token with the token you previously obtained.
The List inventory items endpoint, which lists the inventory items:
Method: GET API URL Path: https://api.shipbob.com/1.0/inventory Headers: Header 1 Key: Authorization Header 1 Value: Bearer your_auth_token
Make sure to replace your_auth_token with the token you previously obtained.
The Get user-authorized channel info endpoint, which gets the info about the user-authorized channel:
Method: GET API URL Path: https://api.shipbob.com/1.0/channel Headers: Header 1 Key: Authorization Header 1 Value: Bearer your_auth_token
Make sure to replace your_auth_token with the token you previously obtained.
The Get locations endpoint, which gets a list of locations:
Method: GET API URL Path: https://api.shipbob.com/1.0/location Headers: Header 1 Key: Authorization Header 1 Value: Bearer your_auth_token
Make sure to replace your_auth_token with the token you previously obtained.
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 ShipBob API endpoints use the pagination option. This means you need to add some of these parameters at the end of the URL:
You can also add SortOrder, if you want to sort your data. This is order to sort results in, and the values are either “Newest” or “Oldest” (without the quotes).
Each endpoint that may need pagination will have in its documentation relevant information about the parameters you may add to paginate your results.
Example: https://api.shipbob.com/1.0/order?page=3&limit=150
In the example above, the data set will be divided in sets of 150 records per page, and only the third page (page number 3) will be displayed in Google Sheets.
Example with the SortOrder parameter: https://api.shipbob.com/1.0/order?page=3&limit=150&SortOrder=Newest
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 ShipBob REST API endpoint that you need. Now copy and paste your complete ShipBob 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 Get Orders endpoint, which retrieves all orders. This is what the whole URL looks like for this endpoint:
https://api.shipbob.com/1.0/order
Headers: In the Headers section of Apipheny, add one row with the following key and value:
Header Key: Authorization Value: Bearer your_auth_token
For the header value, enter the word Bearer, then a space, then replace your_auth_token with the value of the token you obtained previously, in Step 2.
Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the ShipBob 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 ShipBob account to Google Sheets using the ShipBob API, Google Sheets API, and the Apipheny add-on.
After making a successful request to the ShipBob API, try querying a different ShipBob 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: