Print

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

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your Aftership API Key

  1. Log into your account on aftership.com
  2. From the admin website, head to Settings -> API Keys.
    aftership-img1
  3. 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!
    aftership-img2

Part 2: Pull AfterShip Courier Data into Google Sheets

Here's an example request to the AfterShip API.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form, enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URLhttps://api.aftership.com/v4/couriers/all
    • OAuthNone
    • Headers:
      • aftership-api-key : your_key
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. 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
    pagination-page-parameter

Part 4: API Documentation

Official documentation: https://developers.aftership.com/reference/overview

3 thoughts on “Import AfterShip Data to Google Sheets”

Leave a Comment

Jump To