Welcome to NAB API
NAB’s industry leading API capability is driving innovation and empowering developers, partners and customers.
An important part of our journey is collaborating with you, so welcome aboard! We can’t wait to see what you create.
Getting Started
The NAB API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response in combination with API Status codes to indicate API errors. We use built-in HTTP features, like HTTP verbs, which are understood by off-the-shelf HTTP clients. JSON is returned in all API responses including errors.
API Key
NAB API requires your API key to be included in all requests in the HTTP as follows:
x-nab-key: API-KEY
API requests without a valid API Key will display an NAB API error 440.
Your API key is specific to you and your application. Take reasonable care in the use of your API Key and access details. For example, you must not disclose your API Key to any other person.
OAuth Tokens
In order to use NAB account specific APIs, you’ll first need authorisation from the holder of that account. We’ve implemented OAuth 2.0 so that you don’t have to handle this logic- all you need to do is give your users the link to our NAB OAuth Page and use the resulting OAuth access token to authenticate.
To read more about OAuth and how to use it, please refer to the Authentication section.
Running in Postman
Copy the link address below and import the Postman Collection into Postman Chrome extension or the Postman application:
or
Please add your api key in the header tab of postman before invoking the api’s.
API HTTP Headers
The following HTTP headers must be included with all API requests:
HTTP Header | Description | Example |
---|---|---|
Content-type | The MIME type of the body of the request | Content-Type: application/json |
User-Agent | The user agent string of the user agent | User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/21.0 |
x-nab-key | Your NAB API Key |
API Data Types
Data Type | Description | Valid Examples |
---|---|---|
APIDateTimeUTCString | Combined Date and Time string as per RFC-3339. Time at UTC | “2007-05-01T15:43:00.12345Z” “2012-03-03T15:43:00Z” “1997-01-12T15:43:00.121Z” |
APICurrencyString | Standard 3 character currency codes as per ISO-4217 | “AUD” “USD” “CAD” |
APIRateString | A string representing rates
| “0.5 “1.123456 "11.1234567890123456” |
APIAmountString | A string representing amount.
| “1.00” “12345.99” “0.75” “-12345.99” |
APIDateISOString | An ISO Date String in the format - YYYY-MM-DD | “2013-11-01” |
APIPositiveInteger | Positive integer, inclusive of zero | 0 1 1000 |
APIPCIString | Masked Credit Card numbers | 123456xxxxxx1234 |
APINTCAmountString | An APIAmountString with 0 to 3 digits following the decimal point | “1” “12345.999” “0.7” “-12345.99” | “0123.12” “1,234.12” “1,234.” “1,234” |
API Status Codes
NOTE: As part of an uplift to improve our APIs, we’ve changed our error status codes slightly. Please check the updated codes below.
The API uses the following status codes, which is returned within the status block of every response:
Status Code | Status Message | HTTP Code |
---|---|---|
API-200 | Success | 200 |
API-206 | Partial success | 200 |
API-400 | Invalid Request | 400 |
API-401 | Unauthorized | 401 |
API-403 | Forbidden | 403 |
API-404 | Resource Not Found | 404 |
API-410 | Resource Expired | 410 |
API-429 | Throttle Limit Exceeded | 429 |
API-500 | Server Failure | 500 |
API-504 | Server Timeout | 504 |
Authentication
Currently the below API scopes require OAuth authentication to be accessed. Read this section to find out more about how to use and obtain access to our OAuth flow.
API Scope Name | APIs |
---|---|
Accounts | Get List of Accounts, Get Selected Account Balance |
OAuth 2.0 and NAB APIs
NAB uses the OAuth 2.0 protocol to secure and provide authentication for user account specific APIs. (eg. all Accounts APIs ). This allows external application developers to easily connect to NAB and use our user specific APIs without the stress of having to handle their user’s NAB bank login and password details.
What is Oauth 2.0?
OAuth 2.0 is the industry standard developed by IETF for providing client applications with “secure delegated access”. Visit the IETF OAuth 2.0 page to read more about the standard.
Getting Production Access
To register interest in obtaining production access to OAuth authenticated APIs, please email nabapi@nab.com.au with the following template
Field Name | Description |
---|---|
Intention | Describe in detail how you plan to use the Accounts, Balances and Authenticated APIs |
Usage | Describe the estimated usage (daily/monthly) |
Size | Describe the size of your customer base per key |
We will advise your application outcome and/or request for further information as required.
Using OAuth with the sandbox environment
To help with testing and to give you a feel of how the NAB OAuth flow works, we’ve created a sandbox version of the NAB OAuth page.
Please note that while we have tried to keep the sandbox environment as close to production as possible- all responses in sandbox are stubbed and some elements may look or respond a bit differently in production.
You’ll need to be a registered NAB Developer Portal user to use the sandbox environment. Login to view more information.
If you’re not a registered user yet, registration is easy- simply register and follow the prompts.
Using the NAB OAuth Flow in your application
Step 1. Redirect to the NAB Oauth Page
Connect to the NAB OAuth landing page endpoint (This will be made available when your OAuth registration has been approved)
The endpoint requires the following parameters
Parameter name | Description | Example |
---|---|---|
scope | The scope of APIs you’re requesting access for | accounts,fx |
client_id | Your unique client application id (provided when registration is approved) | xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx |
redirect_uri | The uri to redirect to once the user has finished authenticating | https://yourcompany.com |
state | [optional] A unique identifier you can pass us if you wish to implement CSRF checks. This will be passed back in Step 3 if provided | a30a5b00-dfac-4323-8bdf-e648fd6165c4 |
Step 2. User Authenticates via NAB Oauth and NAB mobile
This step is handled NAB-side, but your application user will follow this flow
- User enters their NAB identification number and a OAuth registration is created for that user and your client application
- User logs into their NAB mobile app to verify their identity and approve the created registration.
- User returns to the NAB Oauth page and agrees to be redirected back to your client application.
Step 3. Redirection
NAB OAuth will redirect back to the redirect_uri provided in step 1.
An OAuth access token will be provided in the query string parameter
Query String Parameter Name | Description | Example |
---|---|---|
auth_code | The valid OAuth access token for the requested user (valid for 15 mins) | xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx |
state | [optional] Will only be passed back if it was provided in Step 1. | a30a5b00-dfac-4323-8bdf-e648fd6165c4 |
Step 4. Using the APIs
Use the access token obtained in the previous step as the authorization credentials when using NAB OAuth authenticated APIs.
To do this, include the following header in your API calls
HTTP Header | Description | Example |
---|---|---|
Authorization | Authorization header using the OAuth access token | xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx |
Locations
Location APIs for NAB Addresses.
The APIs utilise map data provided by Google (“Google Content”). By using the APIs, you agree to be bound by Google’s Terms of Service. You agree to Google collecting information about your use of the APIs in accordance with Google’s then-current Privacy Policy (at http://www.google.com/policies/privacy or such other URL as Google may provide).
Locations By Type
- Get list of all locations for a type
Locations By Address
- Request a list of NAB locations of locationType nearest to a specified address
- Default radius is 20km or override via options
- Request multiple locationTypes with “,” (comma)
Location type | Code |
---|---|
ATM | atm |
Branch | brc |
Kiosk | ksk |
Agency | agn |
Business Banking Centre | bbc |
Agri Banking Centre | abc |
Health Banking Centre | hbc |
Locations By Geo Coordinates
- Obtain a list of locations found in a viewport (i.e. bounding box) specified by:
- swLat - South-West latitude of the viewport
- swLng - South-West longitude of the viewport
- neLat - North-East latitude of the viewport
- neLng - North-East longitude of the viewport
Location By Key
- Obtain the detailed information for a single location or resource
- Get Locations By Address and Get Locations By Viewport return a key which is used by this request for a specific location
Reference
Get Locations
Request
curl \\
-X GET \\
https://sandbox.api.nab/v2/locations?locationType={locationType}&v=1
import org.apache.http.client.methods.*;
import org.apache.http.impl.client.*;
import org.apache.http.util.*;
public class GetLocations {
private static final String API_KEY = "YOUR-API-KEY";
private static final String HOST = "https://sandbox.api.nab";
private static final String URI = "/v2/locations?locationType=%s&v=1";
public static void main(String[] args) {
String locationType = "atm";
try {
String url = HOST + String.format(URI, locationType);
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet request = new HttpGet(url);
request.addHeader("content-type", "application/json");
request.addHeader("x-nab-key", API_KEY);
CloseableHttpResponse response = httpclient.execute(request);
String json = EntityUtils.toString(response.getEntity());
System.out.println(json);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response
{
"locationSearchResponse": {
"totalRecords": 2969,
"locations": [
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A08",
"description": "Riverside Shopping Centre",
"latitude": -35.353024,
"longitude": 149.2348171
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A09",
"description": "Pavilion Plaza",
"latitude": -33.874797,
"longitude": 151.2067714
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A10",
"description": "Wynyard Railway Station",
"latitude": -33.865363,
"longitude": 151.2052183
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A11",
"description": "Gymea",
"latitude": -34.0357937,
"longitude": 151.0848374
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A12",
"description": "Kincumber Shopping Centre",
"latitude": -33.4729866,
"longitude": 151.4372584
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A13",
"description": "Stockland Green Hills",
"latitude": -32.7718344,
"longitude": 151.6142316
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A16",
"description": "Castle Towers Shopping Centre",
"latitude": -33.7316657,
"longitude": 151.0050453
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A17",
"description": "Castle Towers Shopping Centre",
"latitude": -33.7316657,
"longitude": 151.0050453
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A19",
"description": "Orange",
"latitude": -33.2828708,
"longitude": 149.1013143
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A22",
"description": "Wentworth Chambers",
"latitude": -33.8689223,
"longitude": 151.2111125
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A25",
"description": "Marrickville Metro",
"latitude": -33.9059468,
"longitude": 151.1719737
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A27",
"description": "Westfield Parramatta",
"latitude": -33.8174516,
"longitude": 151.000849
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A29",
"description": "Erina Fair Shopping Centre",
"latitude": -33.4371031,
"longitude": 151.3922079
}
}
]
},
"status": {
"code": "API-200",
"message": "Success"
}
}
{
"locationSearchResponse": {
"totalRecords": 2969,
"locations": [
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A08",
"description": "Riverside Shopping Centre",
"latitude": -35.353024,
"longitude": 149.2348171
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A09",
"description": "Pavilion Plaza",
"latitude": -33.874797,
"longitude": 151.2067714
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A10",
"description": "Wynyard Railway Station",
"latitude": -33.865363,
"longitude": 151.2052183
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A11",
"description": "Gymea",
"latitude": -34.0357937,
"longitude": 151.0848374
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A12",
"description": "Kincumber Shopping Centre",
"latitude": -33.4729866,
"longitude": 151.4372584
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A13",
"description": "Stockland Green Hills",
"latitude": -32.7718344,
"longitude": 151.6142316
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A16",
"description": "Castle Towers Shopping Centre",
"latitude": -33.7316657,
"longitude": 151.0050453
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A17",
"description": "Castle Towers Shopping Centre",
"latitude": -33.7316657,
"longitude": 151.0050453
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A19",
"description": "Orange",
"latitude": -33.2828708,
"longitude": 149.1013143
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A22",
"description": "Wentworth Chambers",
"latitude": -33.8689223,
"longitude": 151.2111125
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A25",
"description": "Marrickville Metro",
"latitude": -33.9059468,
"longitude": 151.1719737
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A27",
"description": "Westfield Parramatta",
"latitude": -33.8174516,
"longitude": 151.000849
}
},
{
"apiStructType": "atm",
"atm": {
"key": "atm_2A29",
"description": "Erina Fair Shopping Centre",
"latitude": -33.4371031,
"longitude": 151.3922079
}
}
]
},
"status": {
"code": "API-200",
"message": "Success"
}
}
GET https://sandbox.api.nab/v2/locations?locationType={locationType}&v=1
Query Parameters
Name | Description | Mandatory | Value |
---|---|---|---|
v | Version | Yes | 1 |
locationType | The type of location to be returned. | Yes | [“atm”, “brc”, “ksk”, “agn”, “bbc”, “abc”, “hbc”] |
startIndex | Specify the row number of the first record from the full result list to return. Defaults to 1 | No | |
endIndex | Specify the row number of the last record from the full result list to return. Defaults to {startIndex + 20} | No |
Response
Schema
Attribute | Type | Mandatory | Description |
---|---|---|---|
status | APIStatus | No | Response status |
locationSearchResponse | object(Location Search Response) | No | Location search response object |
Location Search Response
Attribute | Type | Mandatory | Description |
---|---|---|---|
totalRecords | integer | Yes | Total number of records in the response |
locations | array[object(Location)] | Yes | An array of location objects |
Location
Attribute | Type | Mandatory | Description |
---|---|---|---|
apiStructType | string | Yes | This field represents what object will be returned in the payload. |
atm | object(Atm) | No | ATM object |
brc | object(Brc) | No | Branch object |
general | object(General) | No | General object |
Atm
Attribute | Type | Mandatory | Description |
---|---|---|---|
key | string | Yes | Location key |
description | string | Yes | Description of the ATM |
latitude | number | No | Latitude (in decimal) |
longitude | number | No | Longitude (in decimal) |
Brc
Attribute | Type | Mandatory | Description |
---|---|---|---|
key | string | Yes | Location key |
siteName | string | Yes | Site name for the branch |
description | string | No | Description of the branch |
latitude | number | No | Latitude (in decimal) |
longitude | number | No | Longitude (in decimal) |
General
Attribute | Type | Mandatory | Description |
---|---|---|---|
key | string | Yes | Location key |
type | string | Yes | Type of general banking site. E.g. ksk, bbc, agn, abc, hbc |
description | string | No | Description of the generic banking site |
latitude | number | No | Latitude (in decimal) |
longitude | number | No | Longitude (in decimal) |
Get Locations by Address
Request
curl \\
-X GET \\
https://sandbox.api.nab/v2/locations?locationType={locationType}&searchCriteria={searchCriteria}&address={address}&v=1
import org.apache.http.client.methods.*;
import org.apache.http.impl.client.*;
import org.apache.http.util.*;
import java.net.URLEncoder;
public class GetLocationsByAddress {
private static final String API_KEY = "YOUR-API-KEY";
private static final String HOST = "https://sandbox.api.nab";
private static final String URI = "/v2/locations?locationType=%s&searchCriteria=addr&address=%s&v=1";
public static void main(String[] args) {
String locationType = "atm";
String address = "700 Bourke Street, Melbourne";
try {
String url = HOST + String.format(URI, locationType, URLEncoder.encode(address, "UTF-8"));
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet request = new HttpGet(url);
request.addHeader("content-type", "application/json");
request.addHeader("x-nab-key", API_KEY);
CloseableHttpResponse response = httpclient.execute(request);
String json = EntityUtils.toString(response.getEntity());
System.out.println(json);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response
{
"locationSearchResponse": {
"totalRecords": 6,
"address": {
"formattedAddress": "Tasmania 7030, Australia",
"latitude": -42.1876915,
"longitude": 147.0214014
},
"viewport": {
"swLat": -44.8826008,
"swLng": 144.3264921,
"neLat": -39.4927822,
"neLng": 149.7163107
},
"locations": [
{
"apiStructType": "atm",
"atm": {
"location": "Offsite",
"isDeposit": false,
"isDisabilityApproved": true,
"isAudio": false,
"source": "NAB",
"address3": "Eastlands Shopping Centre",
"id": 16271,
"key": "nab_3B93",
"description": "Eastlands Shopping Centre",
"address1": "1 Bligh Street",
"suburb": "Rosny Park",
"state": "TAS",
"postcode": "7018",
"latitude": -42.8680382,
"longitude": 147.3692568,
"hours": "Mon-Thu 09.00am-05.30pm, Fri 09.00am-08.00pm, Sat 09.00am-05.00pm, Sun 10.00am-04.00pm",
"distanceToLocation": 80844
}
}
]
},
"status": {
"code": "API-200",
"message": "Success"
}
}
{
"locationSearchResponse": {
"totalRecords": 6,
"address": {
"formattedAddress": "Tasmania 7030, Australia",
"latitude": -42.1876915,
"longitude": 147.0214014
},
"viewport": {
"swLat": -44.8826008,
"swLng": 144.3264921,
"neLat": -39.4927822,
"neLng": 149.7163107
},
"locations": [
{
"apiStructType": "atm",
"atm": {
"location": "Offsite",
"isDeposit": false,
"isDisabilityApproved": true,
"isAudio": false,
"source": "NAB",
"address3": "Eastlands Shopping Centre",
"id": 16271,
"key": "nab_3B93",
"description": "Eastlands Shopping Centre",
"address1": "1 Bligh Street",
"suburb": "Rosny Park",
"state": "TAS",
"postcode": "7018",
"latitude": -42.8680382,
"longitude": 147.3692568,
"hours": "Mon-Thu 09.00am-05.30pm, Fri 09.00am-08.00pm, Sat 09.00am-05.00pm, Sun 10.00am-04.00pm",
"distanceToLocation": 80844
}
}
]
},
"status": {
"code": "API-200",
"message": "Success"
}
}
GET https://sandbox.api.nab/v2/locations?locationType={locationType}&searchCriteria={searchCriteria}&address={address}&v=1
Query Parameters
Name | Description | Mandatory | Value |
---|---|---|---|
v | Version | Yes | 1 |
locationType | The type of location to be returned. Multiple values can be passed separated by ’,’ (comma). | Yes | [“atm”, “brc”, “ksk”, “agn”, “bbc”, “abc”, “hbc”] |
searchCriteria | Search for locations in proximity to a given address | Yes | [“addr”] |
address | A URL Encoded address | Yes | |
radius | Expects a numeric value in kms from the address. Defaults to 20 | No | |
radiusB | Expects a numeric value in kms from the address. Defaults to 50 | No | |
radiusC | Expects a numeric value in kms from the address. Defaults to 100 | No | |
startIndex | Specify the row number of the first record from the full result list to return. Defaults to 1 | No | |
endIndex | Specify the row number of the last record from the full result list to return. Defaults to {startIndex + 20} | No |
Response
Schema
Attribute | Type | Mandatory | Description |
---|---|---|---|
status | APIStatus | Yes | Response status |
locationSearchResponse | object(Location Search Response) | No | Location search response object |
Location Search Response
Attribute | Type | Mandatory | Description |
---|---|---|---|
totalRecords | integer | Yes | Number of records in the response |
viewport | object(Viewport) | Yes | Viewport boundary coordinates object |
address | object(Address) | Yes | Address object |
locations | array[object(Location)] | Yes | An array of Location objects |
Viewport
Attribute | Type | Mandatory | Description |
---|---|---|---|
swLat | number | Yes | South-West latitude coordinates expressed as decimal |
swLng | number | Yes | South-West longitude coordinates expressed as decimal |
neLat | number | Yes | North-East latitude coordinates expressed as decimal |
neLng | number | Yes | North-East longitude coordinates expressed as decimal |
Address
Attribute | Type | Mandatory | Description |
---|---|---|---|
formattedAddress | string | Yes | Formatted address |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
Location
Attribute | Type | Mandatory | Description |
---|---|---|---|
apiStructType | string | Yes | This field represents what object will be returned in the payload. I.e. apiStructType of atm will return an atm object. |
atm | object(Atm) | No | ATM object |
brc | object(Brc) | No | Branch object |
general | object(General) | No | General object |
banker | object(Banker) | No | Banker object |
Atm
Attribute | Type | Mandatory | Description |
---|---|---|---|
id | integer | Yes | |
key | string | Yes | Location key |
description | string | No | Description of the ATM |
address1 | string | Yes | Address Line 1 |
address2 | string | No | Address Line 2 |
address3 | string | No | Address Line 3 |
address4 | string | No | Address Line 4 |
address5 | string | No | Address Line 5 |
suburb | string | Yes | Suburb |
state | string | Yes | State |
postcode | string | Yes | Postcode |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
lobbyOrTtw | string | No | Lobby (L) or Through the Wall (T) |
siteType | string | No | Site type |
location | string | No | Location |
isDeposit | boolean | Yes | Depository |
isDisabilityApproved | boolean | Yes | Disability approved ATM |
isAudio | boolean | Yes | Has audio capability |
hours | string | No | Hours of operation |
source | string | No | ATM Source (BOQ, CUS, NAB) |
distanceToLocation | number | Yes | Distance in kms |
Brc
Attribute | Type | Mandatory | Description |
---|---|---|---|
id | integer | Yes | |
key | string | Yes | Location key |
bsb | string | Yes | Bank State Branch (BSB) number |
siteName | string | Yes | Site name |
description | string | No | Description of this site |
address1 | string | Yes | Address Line 1 |
address2 | string | No | Address Line 2 |
suburb | string | Yes | Suburb |
state | string | Yes | State |
postcode | string | Yes | Postcode |
isRural | boolean | Yes | Is rural location |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
hours | string | No | Opening hours |
openWeekends | boolean | No | Open on weekends |
announcement | string | No | Branch admins can post announcements |
hasCoinSwap | boolean | No | Has coin swap facility |
coinSwapHours | string | No | Coin swap usage hours |
hasQuickChange | boolean | No | Has quick change facility |
quickChangeHours | string | No | Includes opening hours |
bbc | boolean | No | Business Banking Centre |
expressBusinessDeposit | boolean | No | Express Business deposit facility |
hasIntelligentDeposit | string | No | Has Intelligent Deposit facility |
intelligentDepositHours | string | No | Includes opening hours |
foreignCurrency | boolean | No | Foreign currency availability |
internetBank | boolean | No | Has Internet Banking facilities |
financialPlanner | boolean | No | Availability of Financial Planners |
financialPlannerLanguage | string | No | Languages understood by Financial Planner |
mobileBanker | boolean | No | Has Mobile Banker |
mobileBankerLanguage | string | No | Languages understood by Mobile Banker |
smallBusinessBankers | array[object(Small Business Banker)] | No | Array of small business banker objects |
distanceToLocation | number | Yes | Distance to location in kms |
Small Business Banker
Attribute | Type | Mandatory | Description |
---|---|---|---|
name | string | No | Name |
key | string | No | Location key |
General
Attribute | Type | Mandatory | Description |
---|---|---|---|
id | integer | Yes | |
key | string | Yes | Location key |
bsb | string | No | Bank State Branch (BSB) number |
type | string | Yes | Type of general banking facility. E.g. ksk, bbc, agn, abc, hbc |
description | string | No | Description of this banking facility |
address1 | string | Yes | Address Line 1 |
address2 | string | No | Address Line 2 |
suburb | string | Yes | Suburb |
state | string | Yes | State |
postcode | string | Yes | Postcode |
phone | string | No | Telephone number |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
hours | string | No | Hours of operation |
industry | string | No | Industry |
website | string | No | Website |
distanceToLocation | number | Yes | Distance in kms |
Banker
Attribute | Type | Mandatory | Description |
---|---|---|---|
id | integer | Yes | |
key | string | Yes | Location key |
type | string | Yes | Type of Banker. E.g. abb, heb,smb, mob |
name | string | Yes | Name |
address1 | string | No | Address Line 1 |
address2 | string | No | Address Line 2 |
suburb | string | No | Suburb |
state | string | No | State |
postcode | string | No | Postcode |
string | Yes | Email address | |
fax | string | No | Fax number |
phone | string | No | Telephone number |
mobile | string | No | Mobile number |
language | string | No | Language understood by Banker |
bsb | string | No | Bank State Branch (BSB) number |
buid | string | No | Banker UID |
coverageRadius | integer | No | In Kms |
homeBranches | array[object(Home Branch)] | No | Array of branches for the Banker |
supportBranches | array[object(Support Branch)] | No | Array of support branches for the Banker |
qualifications | string | No | Banker’s qualifications |
servicingArea | string | No | Area serviced by Banker |
distanceToLocation | number | No | Distance in kms |
Home Branch
Attribute | Type | Mandatory | Description |
---|---|---|---|
name | string | No | Name |
key | string | No | Location key |
Support Branch
Attribute | Type | Mandatory | Description |
---|---|---|---|
name | number | No | Name |
key | string | No | Location key |
Get Locations by Geo Coordinates
Request
curl \\
-X GET \\
https://sandbox.api.nab/v2/locations?locationType={locationType}&searchCriteria={searchCriteria}&swLat={swLat}&swLng={swLng}&neLat={neLat}&neLng={neLng}&v=1
import org.apache.http.client.methods.*;
import org.apache.http.impl.client.*;
import org.apache.http.util.*;
public class GetLocationsByGeoCoordinates {
private static final String API_KEY = "YOUR-API-KEY";
private static final String HOST = "https://sandbox.api.nab";
private static final String URI = "/v2/locations?locationType=%s&searchCriteria=geo&swLat=%s&swLng=%s&neLat=%s&neLng=%s&v=1";
public static void main(String[] args) {
String locationType = "atm";
double swLat = -45.267072 ;
double swLng = -1.395009 ;
double neLat = 98.2673234;
double neLng = 169.282948;
try {
String url = HOST + String.format(URI, locationType, swLat, swLng, neLat, neLng);
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet request = new HttpGet(url);
request.addHeader("content-type", "application/json");
request.addHeader("x-nab-key", API_KEY);
CloseableHttpResponse response = httpclient.execute(request);
String json = EntityUtils.toString(response.getEntity());
System.out.println(json);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response
{
"status": {
"code": "API-200",
"message": "Success"
},
"locationSearchResponse": {
"totalRecords": 10,
"locations": [
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000967",
"latitude": -34.9223588,
"longitude": 138.5997032,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000968",
"latitude": -35.0226123,
"longitude": 117.8836061,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000969",
"latitude": -36.0782014,
"longitude": 146.9158376,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000970",
"latitude": -37.1918502,
"longitude": 145.7103215,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000971",
"latitude": -37.2843362,
"longitude": 142.9291397,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000972",
"latitude": -30.5112744,
"longitude": 151.666064,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000973",
"latitude": -17.2654831,
"longitude": 145.4765679,
"type": "nab"
}
}
]
}
}
{
"status": {
"code": "API-200",
"message": "Success"
},
"locationSearchResponse": {
"totalRecords": 10,
"locations": [
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000967",
"latitude": -34.9223588,
"longitude": 138.5997032,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000968",
"latitude": -35.0226123,
"longitude": 117.8836061,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000969",
"latitude": -36.0782014,
"longitude": 146.9158376,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000970",
"latitude": -37.1918502,
"longitude": 145.7103215,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000971",
"latitude": -37.2843362,
"longitude": 142.9291397,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000972",
"latitude": -30.5112744,
"longitude": 151.666064,
"type": "nab"
}
},
{
"apiStructType": "general",
"general": {
"key": "nab_LOC000973",
"latitude": -17.2654831,
"longitude": 145.4765679,
"type": "nab"
}
}
]
}
}
GET https://sandbox.api.nab/v2/locations?locationType={locationType}&searchCriteria={searchCriteria}&swLat={swLat}&swLng={swLng}&neLat={neLat}&neLng={neLng}&v=1
Query Parameters
Name | Description | Mandatory | Value |
---|---|---|---|
v | Version | Yes | 1 |
locationType | The type of location to be returned. Multiple values can be passed separated by ’,’ (comma) | Yes | [“atm”, “brc”, “ksk”, “agn”, “bbc”, “abc”, “hbc”] |
searchCriteria | Search for locations by Geo Coordinates | Yes | [“geo”] |
swLat | South-West latitude coordinates expressed as decimal | Yes | |
neLat | North-East latitude coordinates expressed as decimal | Yes | |
neLng | North-East longitude coordinates expressed as decimal | Yes | |
swLng | South-West longitude coordinates expressed as decimal | Yes | |
startIndex | Specify the row number of the first record from the full result list to return. Defaults to 1 | No | |
endIndex | Specify the row number of the last record from the full result list to return. Defaults to {startIndex + 20} | No | |
fields | “basic” returns only the identifiers and description/name, “extended” returns more attributes. Default is basic | No | [“basic”, “extended”] |
Response
Schema
Attribute | Type | Mandatory | Description |
---|---|---|---|
status | APIStatus | Yes | Response status |
locationSearchResponse | object(Location Search Response) | No | Location search response object |
Location Search Response
Attribute | Type | Mandatory | Description |
---|---|---|---|
totalRecords | integer | Yes | Total records in the response |
viewport | object(Viewport) | No | Viewport bounding box definition. Only returned when fields = ‘extended’ |
locations | array[object(Location)] | Yes | Array of locations objects |
Viewport
Attribute | Type | Mandatory | Description |
---|---|---|---|
swLat | number | Yes | South-West latitude coordinates expressed as decimal |
swLng | number | Yes | South-West longitude coordinates expressed as decimal |
neLat | number | Yes | North-East latitude coordinates expressed as decimal |
neLng | number | Yes | North-East longitude coordinates expressed as decimal |
Location
Attribute | Type | Mandatory | Description |
---|---|---|---|
apiStructType | string | Yes | This field represents what object will be returned in the payload. I.e. apiStructType of atm will return an atm object. |
atm | object(Atm) | No | An ATM object |
brc | object(Branch) | No | Branch object |
general | object(General) | No | General object |
Atm
Attribute | Type | Mandatory | Description |
---|---|---|---|
key | string | Yes | Location key |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
id | integer | No | Only returned when fields = ‘extended’ |
description | string | No | Only returned when fields = 'extended’ |
address1 | string | No | Only returned when fields = 'extended’ |
address2 | string | No | Only returned when fields = 'extended’ |
address3 | string | No | Only returned when fields = 'extended’ |
address4 | string | No | Only returned when fields = 'extended’ |
address5 | string | No | Only returned when fields = 'extended’ |
suburb | string | No | Only returned when fields = 'extended’ |
state | string | No | Only returned when fields = 'extended’ |
postcode | string | No | Only returned when fields = 'extended’ |
lobbyOrTtw | string | No | Lobby (L) or Through the Wall (T). Only returned when fields = 'extended’ |
siteType | string | No | Only returned when fields = 'extended’ |
location | string | No | Only returned when fields = 'extended’ |
isDeposit | boolean | No | Depository. Only returned when fields = 'extended’ |
isDisabilityApproved | boolean | No | Only returned when fields = 'extended’ |
isAudio | boolean | No | Only returned when fields = 'extended’ |
hours | string | No | Hours of operation. Only returned when fields = 'extended’ |
source | string | No | ATM Source (BOQ, CUS, NAB). Only returned when fields = 'extended’ |
distanceToLocation | number | No | Only returned when fields = 'extended’ |
Branch
Attribute | Type | Mandatory | Description |
---|---|---|---|
key | string | Yes | Location key |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
id | integer | No | Only returned when fields = 'extended’ |
bsb | string | No | Only returned when fields = 'extended’ |
siteName | string | No | Only returned when fields = 'extended’ |
description | string | No | Only returned when fields = 'extended’ |
address1 | string | No | Only returned when fields = 'extended’ |
address2 | string | No | Only returned when fields = 'extended’ |
suburb | string | No | Only returned when fields = 'extended’ |
state | string | No | Only returned when fields = 'extended’ |
postcode | string | No | Only returned when fields = 'extended’ |
isRural | boolean | No | Only returned when fields = 'extended’ |
hours | string | No | Opening hours |
openWeekends | boolean | No | Only returned when fields = 'extended’ |
announcement | string | No | Branch admins can post announcements |
hasCoinSwap | boolean | No | Only returned when fields = 'extended’ |
coinSwapHours | string | No | Includes opening hours |
hasQuickChange | boolean | No | Only returned when fields = 'extended’ |
quickChangeHours | string | No | Includes opening hours |
bbc | boolean | No | Only returned when fields = 'extended’ |
expressBusinessDeposit | boolean | No | Only returned when fields = 'extended’ |
hasIntelligentDeposit | string | No | Only returned when fields = 'extended’ |
intelligentDepositHours | string | No | Includes opening hours |
foreignCurrency | boolean | No | Only returned when fields = 'extended’ |
internetBank | boolean | No | Only returned when fields = 'extended’ |
financialPlanner | boolean | No | Only returned when fields = 'extended’ |
financialPlannerLanguage | string | No | Only returned when fields = 'extended’ |
mobileBanker | boolean | No | Only returned when fields = 'extended’ |
mobileBankerLanguage | string | No | Only returned when fields = 'extended’ |
smallBusinessBankers | array[object(Small Business Banker)] | No | Only returned when fields = 'extended’ |
distanceToLocation | number | No | Only returned when fields = 'extended’ |
Small Business Banker
Attribute | Type | Mandatory | Description |
---|---|---|---|
name | string | No | Name |
key | string | No | Location key |
General
Attribute | Type | Mandatory | Description |
---|---|---|---|
key | string | Yes | Location key |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
type | string | Yes | Type of general banking site. E.g. ksk, bbc, agn, abc, hbc |
id | integer | No | Only returned when fields = 'extended’ |
bsb | string | No | Only returned when fields = 'extended’ |
description | string | No | Only returned when fields = 'extended’ |
address1 | string | No | Only returned when fields = 'extended’ |
address2 | string | No | Only returned when fields = 'extended’ |
suburb | string | No | Only returned when fields = 'extended’ |
state | string | No | Only returned when fields = 'extended’ |
postcode | string | No | Only returned when fields = 'extended’ |
phone | string | No | Only returned when fields = 'extended’ |
hours | string | No | Only returned when fields = 'extended’ |
industry | string | No | Only returned when fields = 'extended’ |
website | string | No | Only returned when fields = 'extended’ |
distanceToLocation | number | No | Only returned when fields = 'extended’ |
Get Location
Request
curl \\
-X GET \\
https://sandbox.api.nab/v2/location/{key}?v=1
import org.apache.http.client.methods.*;
import org.apache.http.impl.client.*;
import org.apache.http.util.*;
public class GetLocationByKey {
private static final String API_KEY = "YOUR-API-KEY";
private static final String HOST = "https://sandbox.api.nab";
private static final String URI = "/v2/location/%s?v=1";
public static void main(String[] args) {
String locationKey = "atm_205E";
try {
String url = HOST + String.format(URI, locationKey);
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet request = new HttpGet(url);
request.addHeader("content-type", "application/json");
request.addHeader("x-nab-key", API_KEY);
CloseableHttpResponse response = httpclient.execute(request);
String json = EntityUtils.toString(response.getEntity());
System.out.println(json);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response
{
"locationDetailResponse": {
"apiStructType": "atm",
"atm": {
"location": "Offsite",
"isDeposit": false,
"isDisabilityApproved": false,
"isAudio": false,
"source": "NAB ATM",
"address3": "Petrol Station",
"id": 5058068,
"key": "atm_2A05",
"description": "APCO Albury",
"address1": "997 Mate Street",
"suburb": "Albury",
"state": "NSW",
"postcode": "2640",
"latitude": -36.0574542,
"longitude": 146.9326063,
"hours": "24/7"
}
},
"status": {
"code": "API-200",
"message": "Success"
}
}
{
"locationDetailResponse": {
"apiStructType": "atm",
"atm": {
"location": "Offsite",
"isDeposit": false,
"isDisabilityApproved": false,
"isAudio": false,
"source": "NAB ATM",
"address3": "Petrol Station",
"id": 5058068,
"key": "atm_2A05",
"description": "APCO Albury",
"address1": "997 Mate Street",
"suburb": "Albury",
"state": "NSW",
"postcode": "2640",
"latitude": -36.0574542,
"longitude": 146.9326063,
"hours": "24/7"
}
},
"status": {
"code": "API-200",
"message": "Success"
}
}
GET https://sandbox.api.nab/v2/location/{key}?v=1
URL Parameters
Name | Value | Description |
---|---|---|
key | Location Key | The location key returned as part of the Get Locations API |
Query Parameters
Name | Description | Mandatory | Value |
---|---|---|---|
v | Version | Yes | 1 |
Response
Schema
Attribute | Type | Mandatory | Description |
---|---|---|---|
status | APIStatus | No | Response status |
locationDetailResponse | object(Location Detail Response) | No | Location Detail response object |
Location Detail Response
Attribute | Type | Mandatory | Description |
---|---|---|---|
apiStructType | string | Yes | This field represents what object will be returned in the payload. I.e. apiStructType of atm will return an atm object. |
atm | object(Atm) | No | An ATM object |
brc | object(Brc) | No | A Branch object |
general | object(General) | No | A general bank object |
Atm
Attribute | Type | Mandatory | Description |
---|---|---|---|
id | integer | Yes | |
key | string | Yes | Unique identifier (business defined) |
description | string | No | |
address1 | string | Yes | Address Line 1 |
address2 | string | No | Address Line 2 |
address3 | string | No | Address Line 3 |
address4 | string | No | Address Line 4 |
address5 | string | No | Address Line 5 |
suburb | string | Yes | Suburb |
state | string | Yes | State |
postcode | string | Yes | Postcode |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
lobbyOrTtw | string | No | L, T |
siteType | string | No | Site type |
location | string | No | |
isDeposit | boolean | Yes | Depository |
isDisabilityApproved | boolean | Yes | |
isAudio | boolean | Yes | |
hours | string | No | Hours of operation |
source | string | No | ATM Source (BOQ, CUS, NAB) |
Brc
Attribute | Type | Mandatory | Description |
---|---|---|---|
id | integer | Yes | |
key | string | Yes | Unique identifier (business defined) |
bsb | string | Yes | Bank State Branch (BSB) number |
siteName | string | Yes | |
description | string | No | |
address1 | string | Yes | Address Line 1 |
address2 | string | No | Address Line 2 |
suburb | string | Yes | Suburb |
state | string | Yes | State |
postcode | string | Yes | Postcode |
isRural | booelan | Yes | |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
hours | string | No | Opening hours |
openWeekends | boolean | No | |
announcement | string | No | Branch admins can post announcements |
hasCoinSwap | boolean | No | |
coinSwapHours | string | No | Includes opening hours |
hasQuickChange | boolean | No | |
quickChangeHours | string | No | Includes opening hours |
bbc | boolean | No | |
expressBusinessDeposit | boolean | No | |
hasIntelligentDeposit | string | No | |
intelligentDeposutHours | string | No | Includes opening hours |
foreignCurrency | boolean | No | |
internetBank | boolean | No | |
financialPlanner | boolean | No | |
financialPlannerLanguage | string | No | |
mobileBanker | boolean | No | |
mobileBankerLanguage | string | No | |
smallBusinessBankers | array[object(Small Business Banker)] | No |
Small Business Banker
Attribute | Type | Mandatory | Description |
---|---|---|---|
name | string | No | Name |
key | string | No | Location key |
General
Attribute | Type | Mandatory | Description |
---|---|---|---|
id | integer | Yes | |
key | string | Yes | Unique identifier (business defined) |
bsb | string | No | Bank State Branch (BSB) number |
type | string | Yes | Type of general facility. E.g. ksk, bbc, agn, abc, hbc |
description | string | No | Description of the facility |
address1 | string | Yes | Address Line 1 |
address2 | string | No | Address Line 2 |
suburb | string | Yes | Suburb |
state | string | Yes | State |
postcode | string | Yes | Postcode |
phone | string | No | unstructured |
latitude | number | Yes | Latitude (in decimal) |
longitude | number | Yes | Longitude (in decimal) |
hours | string | No | Hours of operation |
industry | string | No | Type of industry |
website | string | No | Website |
FX
Provides a list of all known buy and sell rates for available currency pairs.
Reference
Get List of Foreign Exchange Rates
Request
curl \\
-X GET \\
https://sandbox.api.nab/v2/fxrates?v=1
import org.apache.http.client.methods.*;
import org.apache.http.impl.client.*;
import org.apache.http.util.*;
public class GetFxRates {
private static final String API_KEY = "YOUR-API-KEY";
private static final String HOST = "https://sandbox.api.nab";
private static final String URI = "/v2/fxrates?v=1";
public static void main(String[] args) {
try {
String url = HOST + URI ;
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet request = new HttpGet(url);
request.addHeader("content-type", "application/json");
request.addHeader("x-nab-key", API_KEY);
CloseableHttpResponse response = httpclient.execute(request);
String json = EntityUtils.toString(response.getEntity());
System.out.println(json);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response
{
"fxRatesResponse": {
"fxRates": [
{
"buyCurrency": "USD",
"sellCurrency": "AUD",
"currentBuyRate": "0.76456",
"currentSellRate": "0.72229",
"previousBuyRate": "0.76456",
"previousSellRate": "0.72229"
},
{
"buyCurrency": "NZD",
"sellCurrency": "AUD",
"currentBuyRate": "0.86456",
"currentSellRate": "0.82229",
"previousBuyRate": "0.86456",
"previousSellRate": "0.82229"
}
],
"lastUpdatedDate": "2015-12-15T15:43:00Z"
},
"status": {
"code": "API-200",
"message": "Success"
}
}
{
"fxRatesResponse": {
"fxRates": [
{
"buyCurrency": "USD",
"sellCurrency": "AUD",
"currentBuyRate": "0.76456",
"currentSellRate": "0.72229",
"previousBuyRate": "0.76456",
"previousSellRate": "0.72229"
},
{
"buyCurrency": "NZD",
"sellCurrency": "AUD",
"currentBuyRate": "0.86456",
"currentSellRate": "0.82229",
"previousBuyRate": "0.86456",
"previousSellRate": "0.82229"
}
],
"lastUpdatedDate": "2015-12-15T15:43:00Z"
},
"status": {
"code": "API-200",
"message": "Success"
}
}
GET https://sandbox.api.nab/v2/fxrates?v=1
Query Parameters
Name | Description | Mandatory | Value |
---|---|---|---|
v | Version | Yes | 1 |
Response
Schema
Attribute | Type | Mandatory | Description |
---|---|---|---|
status | APIStatus | Yes | Response status |
fxRatesResponse | object(Fx Rates Response) | No | fxRates response object |
Fx Rates Response
Attribute | Type | Mandatory | Description |
---|---|---|---|
fxRates | array[object(Fx Rate)] | Yes | Array of fxRate objects |
lastUpdatedDate | APIDateTimeUTCString | Yes | The date the rates were updated (in UTC format). |
Fx Rate
Attribute | Type | Mandatory | Description |
---|---|---|---|
buyCurrency | APICurrencyString | Yes | Currency to buy. |
sellCurrency | APICurrencyString | Yes | Currency to sell. |
currentBuyRate | APIRateString | Yes | Current buy rate. |
currentSellRate | APIRateString | Yes | Current sell rate. |
previousBuyRate | APIRateString | Yes | Previous buy rate. |
previousSellRate | APIRateString | Yes | Previous sell rate. |
Accounts
OAuth 2.0 Authorization
Get List of Accounts and Get Selected Account Balance retrieve account information for a specific NAB identification number (nin). To gain access to this information, you’ll need the owner of that nin to give you authorization to view their account details. They can do this in your application by using the NAB OAuth flow (see the Authentication section for more details). Once you have the access token from the OAuth flow, you can include it as an authorisation header in the account APIs to identify which nin to call the API against, and to prove that you are authorized to use it.
Get List of Accounts
- Retrieve the list of accounts for the logged in customer
- Also returns a session based token for each account, which can we used as the identifier for retrieval.
Get Selected Account Balance
- Retrieve the nominated account’s balance (accounts are identified by a session based accountToken- call the Get List of Accounts API to retrieve these tokens)
Reference
Get List of Accounts
Request
curl \\
-X GET \\
https://sandbox.api.nab/v2/accounts?v=1
import org.apache.http.client.methods.*;
import org.apache.http.impl.client.*;
import org.apache.http.util.*;
public class GetCustAcctListSummary {
private static final String ACCESS_TOKEN = "ACCESS_TOKEN";
private static final String HOST = "https://sandbox.api.nab";
private static final String URI = "/v2/accounts?v=1";
public static void main(String[] args) {
try {
String url = HOST + URI ;
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpGet request = new HttpGet(url);
request.addHeader("content-type", "application/json");
request.addHeader("Authorization", ACCESS_TOKEN);
CloseableHttpResponse response = httpclient.execute(request);
String json = EntityUtils.toString(response.getEntity());
System.out.println(json);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response
{
"status": {
"code": "API-200",
"message": "Success"
},
"response": {
"resourceType": "ACCOUNTSUMMARIES",
"accountSummaries": [
{
"accountType": "TransactionAccount",
"category": "DOMESTIC",
"nickname": "Personal Account #1769",
"isVisible": true,
"accountLevelFlags": [
{
"identifier": "P2PSEND",
"value": "Y"
},
{
"identifier": "P2PRECEIVE",
"value": "Y"
},
{
"identifier": "TRANSFERSOURCE",
"value": "Y"
},
{
"identifier": "MULTITRANSFER",
"value": "Y"
},
{
"identifier": "DONATION",
"value": "Y"
},
{
"identifier": "CHEQUEREORDER",
"value": "Y"
},
{
"identifier": "BPAY",
"value": "Y"
},
{
"identifier": "TRAVELCARDRELOAD",
"value": "Y"
},
{
"identifier": "INTERNATIONAL",
"value": "Y"
},
{
"identifier": "TERMDEPOSIT",
"value": "Y"
},
{
"identifier": "TRANSFERDEST",
"value": "Y"
},
{
"identifier": "STOPCHEQUE",
"value": "Y"
},
{
"identifier": "TRAVELCARDUNLOAD",
"value": "Y"
}
],
"accountToken": "yZXmAevw0-CyjawpGWr42ydR-KITncBU5T4dgWT3v9IluVEkW2EV9X5SOQNiyPdX",
"accountIdDisplay": "084737-236521769",
"resourceType": "APCA",
"apca": {
"bsb": "084737",
"accountId": "236521769"
}
},
{
"accountType": "SuperannuationAccount",
"category": "INVESTMENTS",
"accountLevelFlags": [
],
"accountToken": "gN_6qs-l_Ps50CJrcn5myBCBfT8utLBgNjufRj-l3Xx4fB-mVxn9wRV6nxzUP5lr",
"accountIdDisplay": "005323899",
"resourceType": "CARDACCOUNT"
}
]
}
}
{
"status": {
"code": "API-200",
"message": "Success"
},
"response": {
"resourceType": "ACCOUNTSUMMARIES",
"accountSummaries": [
{
"accountType": "TransactionAccount",
"category": "DOMESTIC",
"nickname": "Personal Account #1769",
"isVisible": true,
"accountLevelFlags": [
{
"identifier": "P2PSEND",
"value": "Y"
},
{
"identifier": "P2PRECEIVE",
"value": "Y"
},
{
"identifier": "TRANSFERSOURCE",
"value": "Y"
},
{
"identifier": "MULTITRANSFER",
"value": "Y"
},
{
"identifier": "DONATION",
"value": "Y"
},
{
"identifier": "CHEQUEREORDER",
"value": "Y"
},
{
"identifier": "BPAY",
"value": "Y"
},
{
"identifier": "TRAVELCARDRELOAD",
"value": "Y"
},
{
"identifier": "INTERNATIONAL",
"value": "Y"
},
{
"identifier": "TERMDEPOSIT",
"value": "Y"
},
{
"identifier": "TRANSFERDEST",
"value": "Y"
},
{
"identifier": "STOPCHEQUE",
"value": "Y"
},
{
"identifier": "TRAVELCARDUNLOAD",
"value": "Y"
}
],
"accountToken": "yZXmAevw0-CyjawpGWr42ydR-KITncBU5T4dgWT3v9IluVEkW2EV9X5SOQNiyPdX",
"accountIdDisplay": "084737-236521769",
"resourceType": "APCA",
"apca": {
"bsb": "084737",
"accountId": "236521769"
}
},
{
"accountType": "SuperannuationAccount",
"category": "INVESTMENTS",
"accountLevelFlags": [
],
"accountToken": "gN_6qs-l_Ps50CJrcn5myBCBfT8utLBgNjufRj-l3Xx4fB-mVxn9wRV6nxzUP5lr",
"accountIdDisplay": "005323899",
"resourceType": "CARDACCOUNT"
}
]
}
}
GET https://sandbox.api.nab/v2/accounts?v=1
Query Parameters
Name | Description | Mandatory | Value |
---|---|---|---|
v | Version | Yes | 1 |
Response
Schema
Attribute | Type | Mandatory | Description |
---|---|---|---|
status | APIStatus | Yes | Response status |
response | object(Response) | No |
Response
Attribute | Type | Mandatory | Description |
---|---|---|---|
resourceType | string | Yes | Values: ACCOUNTSUMMARIES |
accountSummaries | array[object(Account Summary)] | Yes |
Account Summary
Attribute | Type | Mandatory | Description |
---|---|---|---|
accountToken | string | Yes | Account token |
accountIdDisplay | string | Yes | Account number formatted for display |
resourceType | string | Yes | Values: APCA, CARDACCOUNT |
apca | object(Apca) | No | |
card | object(Card) | No | |
code | string | No | Response status code |
accountType | string | Yes | Type of account |
category | string | No | Values: DOMESTIC, CARDS, NTC, INVESTMENTS, SECURITIES, INSURANCE, PACKAGES, REWARDS |
nickname | string | No | Name as entered by the user |
status | string | No | Values: CLOSED, BLOCKED, CREDIT_BLOCKED, DEBIT_BLOCKED, INACTIVE, NOT_AVAILABLE, OPEN |
isVisible | boolean | No | |
isNominatedAccount | boolean | No | |
parentRef | string | No | |
ownershipType | string | No | Values: SOLEOWNER, JOINTOWNER, THIRDPARTY |
accountLevelFlags | array[object(Account Level Flag)] | No |
Apca
Attribute | Type | Mandatory | Description |
---|---|---|---|
bsb | string | Yes | Bank, State, Branch number |
accountId | string | Yes | Account number |
accountName | string | No | Account name |
Card
Attribute | Type | Mandatory | Description |
---|---|---|---|
scheme | string | No | Values: VISA, MASTERCARD , AMERICANEXPRESS,TRAVELLERCARD |
cardNumber | APIPCIString | Yes | Card number |
cardExpiry | APIDateISOString | No |
Account Level Flag
Attribute | Type | Mandatory | Description |
---|---|---|---|
identifier | string | Yes | Values: P2PSEND, P2PRECEIVE, REDRAW, TRANSFERSOURCE, BPAY, DONATION, INTERNATIONAL, CHEQUEREORDER, TERMDEPOSIT, TRAVELCARDRELOAD, MULTITRANSFER, TRANSFERDEST, STOPCHEQUE, TRAVELCARDUNLOAD, THIRDPARTYINDICATOR, MULTIAUTH, BUSINESSVISADEBITELIGIBLE |
value | string | Yes |
Get Selected Account Balance
Request
curl \\
-X POST \\
-d '{"request":{"baseCurrency":"AUD","accounts":[{"accountToken":"${accountToken}"}]}}' \\
https://sandbox.api.nab/v2/accounts/balance?v=1
{
"request": {
"baseCurrency": "AUD",
"accounts": [
{
"accountToken": "${accountToken}"
}
]
}
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
public class GetAccountBalance {
private static final String ACCESS_TOKEN = "ACCESS_TOKEN";
private static final String HOST = "https://sandbox.api.nab";
private static final String URI = "/v2/accounts/balance?v=1";
private static final String ACCOUNT_TOKEN = "TOKEN-RECEIVED-FROM-ACCOUNT-LIST-CALL";
public static void main(String[] args) {
try {
String url = HOST + URI ;
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost request = new HttpPost(url);
request.addHeader("content-type", "application/json");
request.addHeader("Authorization", ACCESS_TOKEN);
StringEntity params =new StringEntity("{\"request\": {\"baseCurrency\": \"AUD\",\"accounts\": [ { \"accountToken\": \""+ACCOUNT_TOKEN+"\" } ] } }");
request.setEntity(params);
CloseableHttpResponse response = httpclient.execute(request);
String json = EntityUtils.toString(response.getEntity());
System.out.println(json);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response
{
"status": {
"code": "API-200",
"message": "Success"
},
"response": {
"accounts": [
{
"category": "DOMESTIC",
"accountType": "NIVA",
"balance": {
"balanceStatus": "OK",
"resourceType": "AMOUNT",
"amount": {
"availableBalance": {
"currency": "THB",
"amount": "10.00"
}
}
},
"accountToken": "RxJa5ZD3xGwmjO8sqs21C5gRyql-A-aJ-GAL8bY28BXQUWXvzUWGtVO6xidWkrPc",
"accountIdDisplay": "1234-123456876543232"
}
]
}
}
{
"status": {
"code": "API-200",
"message": "Success"
},
"response": {
"accounts": [
{
"category": "DOMESTIC",
"accountType": "NIVA",
"balance": {
"balanceStatus": "OK",
"resourceType": "AMOUNT",
"amount": {
"availableBalance": {
"currency": "THB",
"amount": "10.00"
}
}
},
"accountToken": "RxJa5ZD3xGwmjO8sqs21C5gRyql-A-aJ-GAL8bY28BXQUWXvzUWGtVO6xidWkrPc",
"accountIdDisplay": "1234-123456876543232"
}
]
}
}
POST https://sandbox.api.nab/v2/accounts/balance?v=1
Query Parameters
Name | Description | Mandatory | Value |
---|---|---|---|
v | Version | Yes | 1 |
Request
Schema
Attribute | Type | Mandatory | Description |
---|---|---|---|
request | object(Request) | Yes |
Request
Attribute | Type | Mandatory | Description |
---|---|---|---|
baseCurrency | APICurrencyString | No | The base currency to get account balance in. Defaults to Australian Dollar (AUD) |
accounts | array[object(Account)] | Yes | List of accounts |
Account
Attribute | Type | Mandatory | Description |
---|---|---|---|
accountToken | string | Yes | Account token |
Response
Schema
Attribute | Type | Mandatory | Description |
---|---|---|---|
status | APIStatus | Yes | Response status |
response | object(Response) | Yes |
Response
Attribute | Type | Mandatory | Description |
---|---|---|---|
accounts | array[object(Account)] | Yes | List of accounts |
Account
Attribute | Type | Mandatory | Description |
---|---|---|---|
accountToken | string | Yes | Account token |
accountIdDisplay | string | Yes | Account number formatted for display |
accountType | string | Yes | Type of account |
category | string | Yes | |
nickname | string | No | Name as entered by the user |
balance | object(Balance) | Yes |
Balance
Attribute | Type | Mandatory | Description |
---|---|---|---|
resourceType | string | No | Values: AMOUNT, PURSE, LENDING |
balanceStatus | string | Yes | Values: OK, N/A, UNAVAILABLE |
amount | object(Amount) | No | Amount |
purse | array[object(Purse)] | No | |
lending | object(Lending) | No |
Amount
Attribute | Type | Mandatory | Description |
---|---|---|---|
currentBalance | object(Current Balance) | No | Current balance |
availableBalance | object(Available Balance) | Yes | Available balance |
baseCurrencyBalance | object(Base Currency Balance) | No | Balance in base currency |
Current Balance
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
amount | APIAmountString | Yes | Amount |
Available Balance
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
amount | APIAmountString | Yes | Amount |
Base Currency Balance
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
amount | APIAmountString | Yes | Amount |
Purse
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
currentBalance | APINTCAmountString | Yes | Current balance |
availableBalance | APINTCAmountString | Yes | Available balance |
Lending
Attribute | Type | Mandatory | Description |
---|---|---|---|
securityAmount | object(Security Amount) | Yes | Security amount |
loanBalance | object(Loan Balance) | Yes | Loan balance |
availableFunds | object(Available Fund) | Yes | Available funds |
facilityLimit | object(Facility Limit) | Yes | Facility limit |
marketValue | object(Market Value) | Yes | Market value |
Security Amount
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
amount | APIAmountString | Yes | Amount |
Loan Balance
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
amount | APIAmountString | Yes | Amount |
Available Fund
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
amount | APIAmountString | Yes | Amount |
Facility Limit
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
amount | APIAmountString | Yes | Amount |
Market Value
Attribute | Type | Mandatory | Description |
---|---|---|---|
currency | APICurrencyString | Yes | Currency |
amount | APIAmountString | Yes | Amount |