Skip to content

Quickstart

This guide gets you from zero to a first API call. The recommended path for new integrations is the v5 API with the typed TypeScript SDK; a v4 alternative using curl follows for existing integrations. Not sure which generation to build against? See v4 vs v5 — which should I use?

  1. Create a member account

    If you don’t already have a Transdirect account, sign up at transdirect.com.au/education/account-enquiries.

    Your member account gives you access to:

    • Discounted courier rates from multiple carriers
    • The members dashboard for managing bookings and orders
    • API key generation for integrations
  2. Generate an API key

    Once you have a member account:

    1. Log in to your Transdirect members area.
    2. Navigate to API Modules in the left-hand menu.
    3. Select your module type from the dropdown:
      • WordPress — for WooCommerce integration
      • Shopify — for Shopify integration
      • Magento — for Magento integration
      • Custom Site — for custom API integrations
    4. Click Add New.
    5. Enter your site domain or name, then click Add.
    6. Copy the generated API key.
  3. Install the typed SDK

    Terminal window
    pnpm add @transdirect/api-sdk

    The SDK is generated from the v5 API’s OpenAPI spec, so its request and response types match exactly what the API accepts and returns. Details on SDKs & versioning.

  4. Make your first quote request

    import { client, postApiV5Quotes } from '@transdirect/api-sdk';
    client.setConfig({
    baseUrl: 'https://api.transdirect.com.au',
    headers: { 'Api-Key': process.env.TD_API_KEY! },
    });
    const { data, error } = await postApiV5Quotes({
    body: {
    // sender, receiver, and items — see "How quoting works" below
    },
    });
    if (error) throw error;
    console.log(data);

    Every SDK call returns { data, error, response } — check error (or response.ok) before using data. For what goes in the quote body, read how quoting works, or try calls interactively in the API Explorer.

If you’re on a supported eCommerce platform, you don’t need to write API code — enter your API key into the plugin:

The v4 API at https://www.transdirect.com.au/api is the existing API and is fully supported — if you’re already integrated against it, or you’d rather work with plain curl, this path works exactly as it always has.

Verify your API key by fetching your member details:

Terminal window
curl -H "Api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://www.transdirect.com.au/api/member

A successful response returns your member details in JSON format. From there, the API reference documents the full v4 surface, curl samples included, starting with create a booking.

Demo mode is a flag on your normal API key — not a separate sandbox key — and works on both generations. With it on, confirming a booking with payment_method: "demo" incurs no charge and is never sent to a real courier: you get a DEMO-XXXXXXXX connote and a watermarked test label. You can check whether the flag is on via GET /bookings/v4/api_details. See demo mode.

Demo bookings succeed without any payment selection, so an integration can pass all its testing and still fail on its first live booking. Before you go live, make one explicit decision: how the booking gets paid for.

Find out what you can charge:

Terminal window
curl -H "Api-key: YOUR_API_KEY" \
https://www.transdirect.com.au/api/members/payment-methods

Then pass the returned id on the booking — as payment_method at create, or as a payment object at confirm:

{ "payment_method": "nab_123", "courier": "allied", "pickup_date": "2025-08-18" }

See how payments work for the full picture.