API Connector Documentation
Import AfterShip Data to Google Sheets
In this guide, we'll pull AfterShip data into Google Sheets, using the API Connector add-on for Sheets. AfterShip is an eCommerce shipping tracking service that allows you to get shipping data for over 697 couriers around the world! Let's jump in and start exploring what kind of data we can pull into Google Sheets.
Contents
- Before You Begin
- Part 1: Get your AfterShip API key
- Part 2: Pull AfterShip Courier Data into Sheets
- Part 3: Handle Pagination
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your Aftership API Key
- Log into your account on aftership.com
- From the admin website, head to Settings -> API Keys.
- There will be a pre-generated API key you can use just fine, otherwise you can generate a new one if you fancy. That's it, you now have access to the Aftership API!
Part 2: Pull AfterShip Courier Data into Google Sheets
Here's an example request to the AfterShip API.
- Open up Google Sheets and click Extensions > API Connector > Open > Create request.
- In the request form, enter the following:
- Application:
Custom
- Method:
GET
- Request URL:
https://api.aftership.com/v4/couriers/all
- OAuth:
None
- Headers:
aftership-api-key
:your_key
- Application:
- Create a new tab and click Set current to use that tab as your data destination.
- Name your request and click Run. A moment later you'll see a list of couriers populate your sheet.
Part 3: Handle Pagination
By default, Aftership will send through a limited number of tracking records unless you add the page
and limit
parameters as shown in their documentation.
You can run through these request URLs manually, or use API Connector's pagination handling function to loop through these pages automatically, like this:
- API URL: https://api.aftership.com/v4/trackings?page=1&limit=200
- Pagination type:
page parameter
- Page parameter:
page
- Run until: choose when the request should stop running
Part 4: API Documentation
Official documentation: https://developers.aftership.com/reference/overview
How to get all the tracking numbers and automatically track its statuses?
Hi Maria!
I believe you can use this URL to get the information you are looking for:
https://api.aftership.com/v4/trackings
If that one isn't working for ya, email support and we'll do our best to get you setup. Thanks!
Doug
It is very helpful for entering data.