Skip to content

Get your account

Read the account your API key belongs to. Use it to check that a key works, to show which business it is connected to, or to see whether the account has a credit account before you confirm with "payment_method": "credit".

GET /api/v5/member

Requires your API key in the api-key header. The account is always the key’s own: there is no way to read another account.

Terminal window
curl https://api.transdirect.com.au/api/v5/member \
-H "api-key: $TD_API_KEY"
import { client, getApiV5Member } from '@transdirect/api-sdk';
client.setConfig({ headers: { 'api-key': process.env.TD_API_KEY! } });
const { data: member } = await getApiV5Member();
const canUseCredit = (member?.credit_limit ?? 0) > 0;

200 OK

{
"id": 48213,
"company_name": "Example Books Pty Ltd",
"contact_name": "Sam Taylor",
"address": "1 Martin Place",
"suburb": "SYDNEY",
"postcode": 2000,
"state": "NSW",
"phone": "0291234567",
"discount_factor": 0,
"credit_limit": 0,
"credit_limit_available": 0,
"charge_type": "cc",
"last_invoice_timestamp": null,
"terms": null,
"active": "1"
}
FieldTypeDescription
idintegerYour Transdirect account id.
company_name, contact_namestring or nullBusiness and contact name on the account.
address, suburb, state, phonestring or nullAccount address and phone.
postcodeintegerAccount postcode, as a number.
credit_limitnumberCredit account limit in AUD. 0 means the account has no credit account, so "payment_method": "credit" is refused with 403 NO_PAYMENT_METHOD.
credit_limit_availablenumberCredit left to use, in AUD.
termsstring, number or nullPayment terms in days for a credit account.
charge_typestring or nullHow the account is billed, as stored, for example cc.
discount_factornumberAn internal pricing value. Quotes already include your account’s pricing, so you do not need to apply it.
last_invoice_timestampstring, number or nullWhen the account was last invoiced, as stored.
activestring, number or nullWhether the account is active, as stored ("1" when active).

To see the cards and PayPal accounts you can pay with, use list payment methods. To apply for a credit account, see payments.

StatusBodyCause
401{"error":"missing_api_key"} or {"error":"invalid_api_key"}No key, or a key that is not active.
404{"error":"member_not_found"}The key is not linked to an account. Contact Transdirect support.
429{"error":"rate_limited"}More than 600 requests a minute on this key. Wait for the retry-after seconds.

Open the API Explorer, add your key, and find Get the currently authenticated member. It is a quick way to check your key.