Tutorials
Explore the following tutorials for help using the BankRec REST API.
Explore the API using Postman
Postman is an HTTP client for testing RESTful web services. Use Postman when you wish to explore the BankRec REST API.
Note: If you choose to use Postman you should follow the security best practices as per the Postman documentation.
To help with Postman, you can download the collection and environment files for BankRec's API from API Reference.
Step 1: Install Postman
- Install Postman for Windows/MacOS/Linux.
Step 2: Use API key for Basic Auth
- Start Postman.
- Click the Authorization tab.
- Select Basic Auth from the menu.
- Enter your API key into the Username field.
- Press Update request (later version of Postman may update automatically)
Step 3: Explore the API from the Root resource
- In Postman's URL bar, select GET.
- Enter the URL
https://api.bankrec.westpac.com.au/rest/v1. - Press Send.
- Click links in the response to open them in a new tab in Postman. Use Postman to send requests to these resources.
Use curl to check network
For your software to work, your server must be able to connect to BankRec. Follow these details to determine if there is a problem with your network or your software.
Step 1: Download and Install curl
Download and install the curl client for your platform from http://curl.haxx.se/download.html. Be sure to download the correct distribution for your server's operating system. You must download a version that includes SSL support.
If you are using Windows, we recommend that you download the binary distribution listed under the heading Win32 - Generic labelled Win32 2000/XP, binary and SSL and maintained by Gunter Knauf. This document does not provide a direct link because you should always download the latest version.
Step 2: Get the Root resource for the API
To test if your server can connect to BankRec:
curl -i --basic --user "{ApiKey}:" {baseURL}
Replace {ApiKey} with your API Key. Replace {baseURL} with the Base URL for the environment you're working in.
Troubleshooting
HTTP status codes other than 200
See: HTTP Status Codes.
curl: (60) SSL Certificate Problem: Unable to get local issuer certificate
Your server does not trust the server TLS certificate presented by BankRec. Typically, this is due to an out-dated root CA certificate bundle on your server. Download and install an updated VeriSign Class 3 Primary CA - G5 root certificate for your server.
curl: (56) Received HTTP code 407 from proxy after connects
Your network has a proxy server. To test if your server can connect to BankRec through the proxy server:
curl --proxy {proxyServer} --proxy-user {proxyUsernamePassword} -i --basic --user "{ApiKey}:" {baseURL}
Your software must connect to BankRec through the proxy server.
curl: (6) Couldn't resolve host
The message may reference any of the Base URLs.
DNS resolution failed. You may need to authenticate with your proxy server.