findBank

Parameters

Parameter Type Required Definition
iban String false This is optional. The endpoint requires one or the other
swift_bic SwiftBic false This is optional. The endpoint requires one or the other
clabe CLABE false This is optional. The endpoint requires one or the other
routing_code BankRoutingCode false Requires country
country ISO3166_1 false Use with routing_code
address String false This is optional. The endpoint requires one or the other

You can use iban or swift_bic or clabe etc to identify, you don't need all of these😀

GraphQL Mutation: createBankDetails

GraphQL

mutation createBankDetails(
  $iban: String,
  $swift_bic: SwiftBic,
  $clabe: CLABE,
  $routing_code: BankRoutingCode,
  $country: ISO3166_1,
  $address: String
) {
  createBankDetails(
    iban: $iban,
    swift_bic: $swift_bic,
    clabe: $clabe,
    routing_code: $routing_code,
    country: $country,
    address: $address
  ) {
    id
    iban
    swift_bic
    clabe
    routing_code
    country
    address
  }
}

Query Example

Request

var axios = require('axios');

var data = JSON.stringify({
  query: `query findBank (
    $iban: String
    ) {
    findBank (
    iban: $iban
      ) {
        routing_code
        swift_bic
        bank_name
        bank_address1
        bank_address2
        bank_city
        bank_state_province_region
        bank_postal_code
        bank_country
        formatted_address
        formatted_address_html
    }
}`,
  variables: { iban: "BR1500000000000010932840814P2" }
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Sample Response

{
  "data": {
    "findBank": {
      "routing_code": "239136",
      "swift_bic": "AIBKGB2L",
      "bank_name": "AIB GROUP (UK) PLC T/A ALLIED IRISH BANK (GB)",
      "bank_address1": "VANTAGE POINT SPINNINGFIELDS HARDMA",
      "bank_address2": "N STREET",
      "bank_city": "MANCHESTER",
      "bank_state_province_region": "ENGLAND",
      "bank_postal_code": "M3 3HF",
      "bank_country": "GB",
      "formatted_address": "VANTAGE POINT SPINNINGFIELDS HARDMA \n N STREET",
      "formatted_address_html": "<div class=\"bank_find_details\">\n  <div class=\"line1\">AIB GROUP (UK) PLC T/A ALLIED IRISH BANK (GB)</div>\n  <div class=\"line2\">\n    <span class=\"bank_address1\">VANTAGE POINT SPINNINGFIELDS HARDMA</span>\n    \n  </div>\n  <div class=\"line3\">\n    <span class=\"bank_city\">MANCHESTER</span>\n    \n    <span class=\"bank_postal_code\">M3 3HF</span>\n    , <span class=\"bank_country\">GB</span>\n  </div>\n</div>"
    }
  }
}