Import ShareASale Data to Google Sheets

In this guide, we’ll walk through how to pull affiliate marketing and merchant data from the ShareASale API directly into Google Sheets, using the API Connector add-on for Sheets.


Before You Begin

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

Part 1: Get Your ShareASale API Credentials

  1. While logged into ShareASale, navigate to ShareASale's Merchant API page
  2. Your API token and secret will be listed there. Copy them down as you'll need them shortly.
  3. Before you leave, note your merchant ID, since you'll need that too. It's located in the top left corner.

Part 2: Pull Data from ShareASale into Sheets

For this example we'll fetch transaction details. This requires including a header that applies a HMAC SHA256 operation to the endpoint, so we've created a supplemental script to assist with this.

  1. Click here to create a copy of the ShareASale calculator sheet.
  2. In the sheet copy, fill out the inputs for the token, your API secret, and the action (aka data table) you'll be querying. When you do this, your signature will be automatically calculated and displayed in cell F13.
  3. Open the API Connector sidebar and click Create request. Fill out the request form as follows. Substitute in your own merchant_ID and token, or reference them from cells in your sheet using +++ syntax.
    • ApplicationCustom
    • MethodGET
    • Request URL
    • OAuthNone
    • Headers:
      • x-ShareASale-Date:  +++ShareASale!F9+++
      • x-ShareASale-Authentication: +++ShareASale!F13+++
  4. Save and run the request:
  5. To make other requests, change the request URL, making sure to match the Action selected in the sheet with the Action listed in the request URL. If you're running multiple requests for different Actions, duplicate the signature generator sheet such that there's a unique signature for each Action.

Part 3: Example API Request URLs

  • Weekly Progress Report
  • Timespan Affiliate Summary
  • Today At a Glance
  • Your Affiliate List
  • Ledger Report
  • Balance Inquiry
  • Banner Report

Leave a Comment

Jump To