Print

Import BaseLinker Data to Google Sheets

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

Contents

Before You Begin

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

Part 1: Get Your BaseLinker API Token

To get your API token, log in to BaseLinker and navigate to Account & other -> My account -> API

Your token will be available on the page. Copy this down as we'll use it shortly.

Part 2: Pull BaseLinker API Data into Sheets

For this example, we'll fetch order data. Substitute in your own API token where it says your_token.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodPOST
    • Request URLhttps://api.baselinker.com/connector.php
    • Headers:
      • X-BLToken: your_token
    • Request body: {"method":"getOrders","parameters":"{\"date_from\": 1684168748}"}
  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 data populate your sheet.
    baselinker-response

Notes

  • Baselinker only returns 100 records per pull, so you'll need to change the date or ID parameters to fetch further records.
  • The example in the screenshot references a cell containing the timestamp, instead of entering it directly. This is convenient as it allows you to dynamically plug in the maximum timestamp from the prior response, such that you can always fetch new data without manually updating your request.
  • If orders are missing, try adding in the get_unconformed_orders parameter:
    {
      "method":"getOrders",
      "parameters":"{\"date_from\": +++Timestamp!B1+++, \"get_unconfirmed_orders\":true}"
    }

Part 3: API Documentation

Official API documentation: https://api.baselinker.com/index.php

Orders documentation: https://api.baselinker.com/index.php?method=getOrders

Leave a Comment

Jump To