Skip to content
techvia.softwareStart free trial

Sync loads to your spreadsheet or n8n

Outcome: a CSV (or an n8n workflow) with your loads, refreshed whenever you run it, that you can open in Excel or Google Sheets or feed to Power BI.

  1. Make a read-only key in Settings > API keys with loads.read. Add billing.read only if the sheet needs finalRate. Store it as TMS_KEY.
  2. Read one page. GET /api/public/v1/loads returns up to 50 loads, newest first, as { "items": [...], "page", "pageSize", "total", "hasMore" }. Narrow it with filters such as status, pickupFrom and pickupTo (YYYY-MM-DD), or search.
  3. Loop until hasMore is false, raising page by one. Keep the loop under the limit of 60 requests a minute per key.
  4. Write the rows. Show people pickupLocal and deliveryLocal (the wall clock at the facility), not the UTC pickupDate. Skip loads with isSample: true if the sheet should hold only your own.
import csv, os, requests
BASE = "https://tms-api.techvia.software/api/public/v1/loads"
headers = {"Authorization": f"Bearer {os.environ['TMS_KEY']}"}
columns = ["loadNumber", "workOrderNumber", "status", "customerName", "origin", "destination", "pickupLocal", "deliveryLocal"]
with open("loads.csv", "w", newline="", encoding="utf-8") as f:
out = csv.DictWriter(f, fieldnames=columns, extrasaction="ignore")
out.writeheader()
page = 1
while True:
res = requests.get(BASE, headers=headers, params={"page": page, "pageSize": 50, "pickupFrom": "2026-12-01"})
res.raise_for_status()
body = res.json()
out.writerows(l for l in body["items"] if not l["isSample"])
if not body["hasMore"]:
break
page += 1
  1. Add an HTTP Request node: method GET, URL https://tms-api.techvia.software/api/public/v1/loads.
  2. Authentication: Generic Credential Type > Header Auth, name Authorization, value Bearer tms_YOUR_KEY.
  3. Under Options > Pagination, step the page query parameter by one and stop when hasMore is false. Put a Schedule Trigger in front and a Google Sheets or Spreadsheet File node after it.
Was this page helpful?YesNo