NCC Code Validation

NCC (National Clearing Code) number is a six-digit number used to identify the individual branch of a New Zealand bank or financial institution. It’s much like a SWIFT code but for a New Zealand bank account.

A NCC code consists of 6 digits and contains the bank code (2 digits) and the branch code (4 digits).

For example, NCC code 010205:

When you send money using an invalid NCC code, the bank should reverse the transaction and return the money, but this might take some time and your bank may charge you a fee. Using our flexible and fast RESTful API you can validate a NCC code and receive all possible information about it - see whether it's valid and which bank, state and branch it belongs to, as well as branch city, address and postcode.

How to validate a NCC code

To start using our SWIFT codes API sign up here and create your API key. Pass this key either via x-api-key HTTP header or via api_key query param.

To validate a NCC code call /v1/nccs/{ncc_code} endpoint using HTTP client of your preference, i.e.:

curl 'https://swiftcodesapi.com/v1/nccs/010205' \
    --header 'X-Api-Key: your-api-key-here' \
    --header 'Accept: application/json'
# INSTALLATION
$ composer require guzzlehttp/guzzle
# REQUEST
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://swiftcodesapi.com/v1/nccs/010205', [
    'headers' => [
        'Accept' => 'application/json',
        'X-Api-Key' => 'your-api-key-here',
    ],
]);

echo $response->getBody();
# INSTALLATION
$ python -m pip install requests
# REQUEST
import requests

url = "https://swiftcodesapi.com/v1/nccs/010205"

headers = {
    "Accept": "application/json",
    "X-Api-Key": "your-api-key-here"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
# INSTALLATION
$ npm install node-fetch --save
// REQUEST
const fetch = require('node-fetch');

const url = 'https://swiftcodesapi.com/v1/nccs/010205';
const options = {method: 'GET', headers: {'Accept': 'application/json', 'X-Api-Key': 'your-api-key-here'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));)
const options = {method: 'GET', headers: {'Accept': 'application/json', 'X-Api-Key': 'your-api-key-here'}};

fetch('https://swiftcodesapi.com/v1/nccs/010205', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

The response should be:

{
    "success": true,
    "data": {
        "id": "010205",
        "branch_name": "ANZ Retail",
        "address": "170 Featherston street",
        "city": "Wellington",
        "postcode": "6011",
        "phone": "0800 269 296",
        "fax": "",
        "pob_number": "PO Box 18",
        "pob_location": "Shortland Street, Auckland",
        "pob_postcode": "1140",
        "bank": {
            "id": "dae732d9-535d-4dcd-9719-a0957a4afedd",
            "country_id": "NZ",
            "code": "01",
            "name": "ANZ Bank New Zealand"
        }
    }
}

You can find full documentation here.