Authentication
Authentication methods
Section titled “Authentication methods”The Transdirect API supports two authentication methods:
- Basic authentication — using your member email and password
- API key — using a generated key in a custom header
API key authentication (recommended)
Section titled “API key authentication (recommended)”Send your API key in the Api-key header with every request:
curl -X GET \ -H "Api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ https://www.transdirect.com.au/api/bookings/v4Generating an API key
Section titled “Generating an API key”-
Log in to the members area
Go to transdirect.com.au/members/login and sign in with your member credentials.
-
Navigate to API modules
Click on API Modules in the left-hand menu, or go directly to transdirect.com.au/members_new/api/apimodules.
-
Create a new module
Select your module type from the dropdown:
- WordPress — for WooCommerce integrations
- Shopify — for Shopify integrations
- Magento — for Magento integrations
- Custom Site — for custom API integrations
Click Add New, enter your site domain or name, then click Add.
-
Copy your API key
Your API key is displayed on the module page. Copy it and store it securely.
Managing API keys
Section titled “Managing API keys”You can manage your API keys from the API Modules page:
- Activate/deactivate — toggle a key on or off without deleting it
- Delete — permanently remove a key and its associated module settings
- Regenerate — create a new key for an existing module
Basic authentication
Section titled “Basic authentication”Send your member email and password as HTTP Basic Auth credentials:
curl -X GET \ -u "your-email@example.com:your-password" \ -H "Content-Type: application/json" \ https://www.transdirect.com.au/api/bookings/v4Testing your authentication
Section titled “Testing your authentication”Make a simple request to verify your credentials are working:
curl -H "Api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ https://www.transdirect.com.au/api/memberA successful response returns your member details:
{ "id": 12345, "company_name": "Example Pty Ltd", "email": "your-email@example.com", "suburb": "SYDNEY", "postcode": "2000", "state": "NSW"}A 401 response means your credentials are invalid. Double-check your API key or email/password.